Graph Foundational Model
Graph Transformer
Graphormer
Translating text transformer idea in graph
1
2
4
3
5
1
2
4
3
5
Translating text transformer idea in graph
Multi-Head Attention
No Change
Residual Connection
No Change
Adding non-Linearity
No Change
Layer Normalization
No Change
Scaled Dot Product
No Change
Translating text transformer idea in graph
Positional Embedding
Change
Position of a word in text is indicated by the ordinal value
Position of a node in graph is indicated by the connections
Centrality of node 🡪 Centrality Encoding
“Spatial” position of node 🡪 Structure Encoding
Encoding Structural Information
Features of Edges 🡪 Edge Encoding
Graphormer: Architecture
Graphormer : Spatial Encoding
Graphormer : Centrality Encoding
Graphormer : Centrality Encoding
1
2
4
3
5
6
8
7
| | |
0 | | |
1 | | |
2 | | |
3 | | |
4 | | |
5 | | |
9
Trainable
Graphormer : Spatial Encoding
1
2
4
3
5
6
8
7
9
| |
0 | |
1 | |
2 | |
3 | |
| |
More attention to nearby nodes - less attention to distant nodes
Graphormer : Edge Encoding
Graphormer : Edge Encoding
Graphormer : Edge Encoding
1
2
4
3
5
6
8
7
Graphormer : Transformer Encoder
Graphormer : Special Virtual Node
[VNode]
This will get mixed up with nodes that are one-hop SPD apart
Solution:
Graphormer : Results
GRAPH-BERT
General View of Graph Pre-Training
Pre-Training Task
Pre-Training Loss
Entire Graph
Subgraph
sampling
Subgraph Minibatch
Linkless graph
Start Embedding
Final Embedding
Back propagation & Parameter update
GRAPH-BERT Architecture
Linkless Sub-Graph Batching
Top-k intimacy sampling
Graph Isomorphism
Source: Wikipedia
The Weisfeiler-Lehman Isomorphism Test
Iteratively refine the labels of the nodes
The Weisfeiler-Lehman (1-WL) Isomorphism Test
Not isomorphic but end up with same color profile
The Weisfeiler-Lehman Isomorphism Test
Does it sound familiar?
Does it sound familiar?
The Weisfeiler-Lehman Isomorphism Test
https://en.wikipedia.org/wiki/Weisfeiler_Leman_graph_isomorphism_test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
The Weisfeiler-Lehman Isomorphism Test
Terminate
The Weisfeiler-Lehman Isomorphism Test
WL Test says two graphs may be isomorphic
7 | 8 | 9 |
2 | 1 | 2 |
7 | 8 | 9 |
2 | 1 | 2 |
Weisfeiler-Lehman Absolute Role Embedding
Intimacy based Relative Positional Embedding
Hop based Relative Distance Embedding
Transformer Layer
Graph-BERT Pre-Training