Graph Foundational Model
Part – I
Foundation Models
Foundation Model
“A foundation model, also known as large AI model, is a machine learning or deep learning model that is trained on vast datasets so it can be applied across a wide range of use cases. Generative AI applications like Large Language Models are often examples of foundation models.”
-- Wikipedia
BERT
GPT
Amazon Titan
LLama
Claude
An architecture that can process sequences
Limitation of RNN Models
Attention Based Model: Transformer
https://www.youtube.com/watch?v=LWMzyfvuehA
The Attention Idea
Stanford NLP Course: CS224N
Attention treats each word’s representation as a query to access and incorporate information from a set of values.
The Self Attention Idea
Self-attention is encoder-encoder (or decoder-decoder) attention where each word attends to each other word within the input (or output).
Stanford NLP Course: CS224N
Attention Based Model: Transformer
The (Self) Attention Mechanism
Adding Non-Linear Activation
Making it Deep
Add Residual Connections
The Normalization Trick
Layer Normalization
Reduce variation by normalizing to zero mean and standard deviation of one within each layer
Scaled Dot Product Attention
Positional Encoding
Sense of position is lost
Multi-Head Attention
Decoder Design
Masked Multi-head Attention
Encoder-Decoder Multi-head Attention
The Transformer
Pre-Training and Transfer Learning
Transfer learning: Leverage feature representation from a pre-trained model
Using Pre-Trained Model
Using Pre-Trained Model
The BERT
Bi-Directional Context dependant word embedding
Example #1: we went to the river bank.
Example #2: I need to go to bank to make a deposit
BERT: Self Supervised Pre-Training
BERT: Self Supervised Pre-Training
Input: [CLS] the man went to [MASK] store [SEP] he bought a gallon � [MASK] milk [SEP]
Label: IsNext
Input: [CLS] the man went to [MASK] store [SEP] penguins are � flightless birds [SEP]
Label: NotNext
The BERT
BERT-base: 12 layers, 768 hidden size, 12 attention heads, 110M parameters
BERT-large: 24 layers, 1024 hidden size, 16 attention heads, 340M parameters
Training corpus: Wikipedia (2.5B) + BooksCorpus (0.8B)
Max sequence size: 512 word pieces (roughly 256 and 256 for two non-contiguous sequences)
Fine-Tuning BERT
Sentence-Level Tasks
Fine-Tuning BERT
Token-Level Tasks
Large Language Models (LLMs)
Large Language Models have shown emergent behaviour
Planet of the LLMs
Planet of the LLMs
Interacting with LLMs
In-Context Learning (ICL)
No Parameter Update
Interacting with LLMs
Classify the text into neutral, negative or positive.
Text: I think the vacation is okay.
Sentiment:
Zero-shot Prompting
Classify the text into neutral, negative or positive.
This is awesome! // Negative
This is bad! // Positive
Wow that movie was rad! // Positive
What a horrible show! //
Few-shot Prompting
Prompting
Interacting with LLMs
Prompting
Evolution of Language Processing
Statistical NLP
Deep NLP
Transformers
Pre-Training 🡪 Fine Tuning
Foundation Models
Probabilistic LM
HMM
CRF
Feature Extraction
CNN
RNN
GRU
LSTM
Task Specific
Self-Attention
Task Specific
Supervised
Word2vec
PT once, FT multiple times
BERT
GPT
GPT-X
Llama
Prompt Engineering
Evolution of Graph Processing
Statistical Network Analysis
Deep Graph Processing
Graph Transformers
Pre-Training 🡪 Fine Tuning
Foundation Models
Spectral analysis
Epidemic Models
PageRank
Feature Extraction
GCN
GraphSage
GAT
Graph Pooling
Task Specific
Self-Attention
Supervised
DeepWalk
PT once, FT multiple times
GraphBERT
Prompt Engineering
Will LLM phenomena happen in Graph ML?