NeurIPS 2022

Recipe for a General, Powerful, Scalable Graph Transformer

Ladislav Rampášek, Mikhail Galkin, Vijay Prakash Dwivedi, A. Luu, Guy Wolf, D. Beaini

Main figure for Recipe for a General, Powerful, Scalable Graph Transformer

Abstract

We propose a recipe on how to build a general, powerful, scalable (GPS) graph Transformer with linear complexity and state-of-the-art results on a diverse set of benchmarks. Graph Transformers (GTs) have gained popularity in the field of graph representation learning with a variety of recent publications but they lack a common foundation about what constitutes a good positional or structural encoding, and what differentiates them. In this paper, we summarize the different types of encodings with a clearer definition and categorize them as being local, global or relative. The prior GTs are constrained to small graphs with a few hundred nodes, here we propose the first architecture with a complexity linear in the number of nodes and edges $O(N+E)$ by decoupling the local real-edge aggregation from the fully-connected Transformer. We argue that this decoupling does not negatively affect the expressivity, with our architecture being a universal function approximator on graphs. Our GPS recipe consists of choosing 3 main ingredients: (i) positional/structural encoding, (ii) local message-passing mechanism, and (iii) global attention mechanism. We provide a modular framework GraphGPS is available at:. that supports multiple types of encodings and that provides efficiency and scalability both in small and large graphs. We test our architecture on 16 benchmarks and show highly competitive results in all of them, show-casing the empirical benefits gained by the modularity and the combination of different strategies.

Benchmark Results

Tested on 7 datasets 3 baseline values reported too low

Tables show presented results in global context (best 3 papers + GCN + MLP).

OGB

#ModelMAE ↓Paper
1
DeMol
0.0603
2
TGT-At
0.0671
3
TGT-At (+RDKit)
0.0683
24
GTs
0.0858
This paper
29
EGT
actual #29 vs paper #33 4 places worse
0.0862
best reported
actual #29 vs paper #33 4 places worse
paper 0.0869
31
Graphormer
actual #31 vs paper #31
0.0864
actual #31 vs paper #31
paper 0.0864
paper 0.0864 Δ at pub 0.0464
35
GRPE
actual #35 vs paper #38 3 places worse
0.0876
best reported
actual #35 vs paper #38 3 places worse
paper 0.0890
50
GPS-small
0.0938
This paper
59
GIN-virtual
0.1083
This paper
61
GCN-virtual
actual #61 vs paper #61
0.1152
best reported
actual #61 vs paper #61
paper 0.1153
65
GCN
actual #65 vs paper #75 10 places worse
0.1379
actual #65 vs paper #75 10 places worse
paper 0.1379
paper 0.1379 Δ at pub 0.0019 Δ today 0.0184
64
GIN
actual #64 vs paper #64
0.1195
actual #64 vs paper #64
paper 0.1195
paper 0.1195 Δ at pub 0.0023

LRGB

#ModelMRR ↑Paper
1
FloydNet
0.6143
2
Exphormer
0.4737 ±0.0024
3
Exphormer + LapPE
0.4737 ±0.0024
5
GPS
actual #5 vs paper #62 57 places worse
0.4703 ±0.0014
best reported
actual #5 vs paper #62 57 places worse
paper 0.3337 ±0.0006
paper 0.3337 ±0.0006 Δ today 0.1366
8
GatedGCN
actual #8 vs paper #77 69 places worse
0.4670 ±0.0004
best reported
actual #8 vs paper #77 69 places worse
paper 0.3218 ±0.0011
paper 0.3218 ±0.0011 Δ today 0.1452
15
GINE
actual #15 vs paper #78 63 places worse
0.4617 ±0.0005
best reported
actual #15 vs paper #78 63 places worse
paper 0.3180 ±0.0027
paper 0.3180 ±0.0027 Δ today 0.1437
16
GIN
0.4617 ±0.0005
28
GCN
actual #28 vs paper #76 48 places worse
0.4526 ±0.0006
best reported
actual #28 vs paper #76 48 places worse
paper 0.3234 ±0.0006
paper 0.3234 ±0.0006 Δ today 0.1292
61
SAN+LapPE
0.3350 ±0.0003
This paper
62
SAN+RWSE
0.3341 ±0.0006
This paper
75
GatedGCN+RWSE
0.3242 ±0.0008
This paper
80
Transformer+LapPE
0.3174 ±0.0020
This paper

GNNBenchmark

#ModelAccuracy ↑Paper
1
Schrödinger
0.9913 ±0.0004
2
CNN
0.9907 ±0.0007
3
MPNN
0.9895 ±0.0006
11
GatedGCN
0.9855 ±0.0002
32
GIN
0.9833 ±0.0011
47
EGT
0.9817 ±0.0009
This paper
59
GPS
actual #59 vs paper #61 2 places worse
0.9808 ±0.0011
best reported
actual #59 vs paper #61 2 places worse
paper 0.9805 ±0.0013

Difference within reported uncertainty; not counted as underperformance.

paper 0.9805 ±0.0013 Δ today 0.0003
73
CRaWl
0.9794 ±0.0005
This paper
75
PNA
0.9794 ±0.0012
This paper
126
MLP
0.9534 ±0.0014
135
GCN
actual #135 vs paper #138 3 places worse
0.9405 ±0.0005
best reported
actual #135 vs paper #138 3 places worse
paper 0.9071 ±0.0022
#ModelAccuracy ↑Paper
1
RandAlign
0.7942 ±0.0007
2
differential encoding
0.7907 ±0.0027
3
PPGT
0.7856 ±0.0070
38
PNA
actual #38 vs paper #67 29 places worse
0.7311 ±0.0011
best reported
actual #38 vs paper #67 29 places worse
paper 0.7035 ±0.0063
paper 0.7035 ±0.0063 Δ at pub 0.0276
46
GPS
actual #46 vs paper #49 3 places worse
0.7236 ±0.0032
best reported
actual #46 vs paper #49 3 places worse
paper 0.7230 ±0.0036

Difference within reported uncertainty; not counted as underperformance.

paper 0.7230 ±0.0036 Δ today 0.0006
62
GatedGCN
0.7133 ±0.0039
80
CRaWl
0.6901 ±0.0026
This paper
82
EGT
0.6870 ±0.0041
This paper
92
GraphSAGE
0.6690 ±0.0020
124
GCN
actual #124 vs paper #128 4 places worse
0.5839 ±0.0073
best reported
actual #124 vs paper #128 4 places worse
paper 0.5571 ±0.0038
paper 0.5571 ±0.0038 Δ at pub 0.0268
126
MLP
0.5634 ±0.0018
#ModelAccuracy ↑Paper
1
GRPE-Small
0.8159 ±0.0019
2
TANGO-GPS
0.8011 ±0.0014
3
GRIT
0.8003 ±0.0028
22
GPS
0.7802 ±0.0018
This paper
54
GatedGCN
0.7608 ±0.0020
70
GCN
0.6903 ±0.0137
114
MLP
0.2097 ±0.0000
#ModelAccuracy ↑Paper
1
DeepGraph (48)
0.9066 ±0.0006
2
GRIT (our run)
0.9041 ±0.0023
3
GRIT 2-QiQRW
0.9016 ±0.0045
19
GIN-AK+
0.8685 ±0.0006
This paper
24
EGT
0.8682 ±0.0002
This paper
50
GPS
0.8669 ±0.0006
This paper
51
DGN
0.8668 ±0.0003
This paper
58
SAN
0.8658 ±0.0004
This paper
66
GatedGCN
0.8651 ±0.0008
88
GCN
0.8561 ±0.0003
123
MLP
0.5052

Other Graph Benchmarks

#ModelAccuracy ↑Paper
1
GMN
0.9415 ±0.0020
2
DirGraphSSM
0.9409 ±0.0023
3
DAG+SAT-plus
0.9407 ±0.0020
7
Transformer
0.9350 ±0.0060
This paper
13
Performer
0.9264
This paper
16
BigBird
0.9234
This paper
22
GIN
0.8898 ±0.0055
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported result worse than the best known when published (best reported in green) Best at pub — reported value improved over the best known when published Improved at pub — later paper surpassed this result Best today — OK at publication; today's leaderboard best is elsewhere