Plain Transformers Can be Powerful Graph Learners

Liheng Ma, Soumyasundar Pal, Yingxue Zhang, Philip H. S. Torr, Mark Coates

Main figure for Plain Transformers Can be Powerful Graph Learners

Abstract

Transformers have attained outstanding performance across various modalities, owing to their simple but powerful scaled-dot-product (SDP) attention mechanisms. Researchers have attempted to migrate Transformers to graph learning, but most advanced Graph Transformers (GTs) have strayed far from plain Transformers, exhibiting major architectural differences either by integrating message-passing or incorporating sophisticated attention mechanisms. These divergences hinder the easy adoption of training advances for Transformers developed in other domains. Contrary to previous GTs, this work demonstrates that the plain Transformer architecture can be a powerful graph learner. To achieve this, we propose to incorporate three simple, minimal, and easy-to-implement modifications to the plain Transformer architecture to construct our Powerful Plain Graph Transformers (PPGT): (1) simplified $L_2$ attention for measuring the magnitude closeness among tokens; (2) adaptive root-mean-square normalization to preserve token magnitude information; and (3) a simple MLP-based stem for graph positional encoding. Consistent with its theoretical expressivity, PPGT demonstrates noteworthy realized expressivity on the empirical graph expressivity benchmark, comparing favorably to more complicated alternatives such as subgraph GNNs and higher-order GNNs. Its empirical performance across various graph datasets also justifies the effectiveness of PPGT. This finding underscores the versatility of plain Transformer architectures and highlights their strong potential as a unified backbone for multimodal learning across language, vision, and graph domains.

Proposed method: PPGT

Benchmark Results

Tested on 7 datasets 15 baseline values reported too low Non-standard metric on 1 dataset

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

LRGB

#ModelMAE ↓Paper
1
GCN
actual #1 vs paper #31 30 places worse
0.2421 ±0.0016
best reported
actual #1 vs paper #31 30 places worse
paper 0.2460 ±0.0007
2
IPR-MPNN
0.2422 ±0.0007
3
TANGO-GPS
0.2422 ±0.0014
5
GIN
0.2429 ±0.0019
7
GatedGCN
actual #7 vs paper #57 50 places worse
0.2431 ±0.0020
best reported
actual #7 vs paper #57 50 places worse
paper 0.2477 ±0.0009
22
PPGT
0.2450 ±0.0017
This paper
32
GRIT
0.2460 ±0.0012
This paper
49
GINE
0.2473 ±0.0017
This paper
66
Exphormer
0.2481 ±0.0007
This paper
85
GPS
actual #85 vs paper #96 11 places worse
0.2500 ±0.0005
best reported
actual #85 vs paper #96 11 places worse
paper 0.2509 ±0.0010

Difference within reported uncertainty; not counted as underperformance.

paper 0.2509 ±0.0010 Δ at pub 0.0009 Δ today 0.0009
115
DRew
0.2536 ±0.0015
This paper
201
MLP
0.4351 ±0.0008
#ModelAP ↑Paper
1
S^2GCN
0.7311 ±0.0066
2
S4G
0.7293 ±0.0004
3
BuNN
0.7276 ±0.0065
4
GCN
actual #4 vs paper #49 45 places worse
0.7261 ±0.0011
best reported
actual #4 vs paper #49 45 places worse
paper 0.6860 ±0.0050
paper 0.6860 ±0.0050 Δ today 0.0401
13
DRew
0.7150 ±0.0044
This paper
26
GIN
0.7059 ±0.0089
34
GatedGCN
actual #34 vs paper #58 24 places worse
0.7006 ±0.0033
best reported
actual #34 vs paper #58 24 places worse
paper 0.6765 ±0.0047
paper 0.6765 ±0.0047 Δ today 0.0241
36
GRIT
0.6988 ±0.0082
This paper
43
PPGT
0.6961 ±0.0062
This paper
78
GINE
0.6621 ±0.0067
This paper
87
GPS
actual #87 vs paper #94 7 places worse
0.6562 ±0.0115
best reported
actual #87 vs paper #94 7 places worse
paper 0.6534 ±0.0090

Difference within reported uncertainty; not counted as underperformance.

paper 0.6534 ±0.0090 Δ at pub 0.0028
95
Exphormer
0.6527 ±0.0043
This paper
181
MLP
0.4060 ±0.0021
#ModelF1 ↑Paper
1
NeuralWalker
0.4912 ±0.0042
2
PPGT
0.4641 ±0.0033
This paper
3
CRaWl
0.4588 ±0.0079
14
GPS
0.4440 ±0.0065
This paper
19
Exphormer
actual #19 vs paper #33 14 places worse
0.4242 ±0.0044
best reported
actual #19 vs paper #33 14 places worse
paper 0.3960 ±0.0027
paper 0.3960 ±0.0027 Δ at pub 0.0282
41
GatedGCN
0.3880 ±0.0040
This paper
42
Gated-GCN
0.3880 ±0.0040
65
DRew
0.3314 ±0.0024
This paper
75
GINE
0.2718 ±0.0054
This paper
81
GCN
actual #81 vs paper #83 2 places worse
0.2380 ±0.0160
best reported
actual #81 vs paper #83 2 places worse
paper 0.2078 ±0.0031
paper 0.2078 ±0.0031 Δ at pub 0.0302
93
MLP
0.1140 ±0.0230

GNNBenchmark

#ModelAccuracy ↑Paper
1
Schrödinger
0.9913 ±0.0004
2
CNN
0.9907 ±0.0007
3
MPNN
0.9895 ±0.0006
9
PPGT
0.9861 ±0.0010
This paper
11
GatedGCN
actual #11 vs paper #90 79 places worse
0.9855 ±0.0002
best reported
actual #11 vs paper #90 79 places worse
paper 0.9734 ±0.0014
paper 0.9734 ±0.0014 Δ at pub 0.0121
19
CKGCN
0.9842 ±0.0015
This paper
32
GIN
actual #32 vs paper #110 78 places worse
0.9833 ±0.0011
best reported
actual #32 vs paper #110 78 places worse
paper 0.9648 ±0.0025
best at pub: Graph-Coupled Oscillator Networks (ICML 2022)
paper 0.9648 ±0.0025 Δ at pub 0.0075 Δ today 0.0184
47
EGT
0.9817 ±0.0009
This paper
56
GRIT
0.9811 ±0.0011
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
74
CRaW1
0.9794 ±0.0005
This paper
75
PNA
0.9794 ±0.0012
This paper
86
GAT
actual #86 vs paper #121 35 places worse
0.9755 ±0.0003
best reported
actual #86 vs paper #121 35 places worse
paper 0.9554 ±0.0021
paper 0.9554 ±0.0021 Δ at pub 0.0202
95
GraphSAGE
0.9731 ±0.0010
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
paper 0.9071 ±0.0022 Δ at pub 0.0335
#ModelAccuracy ↑Paper
1
RandAlign
0.7942 ±0.0007
2
differential encoding
0.7907 ±0.0027
3
PPGT
0.7856 ±0.0070
This paper
7
GRIT
0.7647 ±0.0088
This paper
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
40
DGN
actual #40 vs paper #40
0.7284 ±0.0042
best reported
actual #40 vs paper #40
paper 0.7284 ±0.0042

Difference within reported uncertainty; not counted as underperformance.

paper 0.7284 ±0.0042 Δ at pub 0.0000
41
CKGCN
0.7278 ±0.0044
This paper
44
GIN-AK+
actual #44 vs paper #50 6 places worse
0.7239 ±0.0038
best reported
actual #44 vs paper #50 6 places worse
paper 0.7219 ±0.0013

Difference within reported uncertainty; not counted as underperformance.

paper 0.7219 ±0.0013 Δ at pub 0.0020
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
actual #62 vs paper #90 28 places worse
0.7133 ±0.0039
best reported
actual #62 vs paper #90 28 places worse
paper 0.6731 ±0.0031
paper 0.6731 ±0.0031 Δ at pub 0.0402
81
CRaW1
0.6901 ±0.0026
This paper
82
EGT
0.6870 ±0.0041
This paper
92
GraphSAGE
0.6690 ±0.0020
101
GAT
actual #101 vs paper #112 11 places worse
0.6611 ±0.0098
best reported
actual #101 vs paper #112 11 places worse
paper 0.6422 ±0.0046
paper 0.6422 ±0.0046 Δ at pub 0.0189
109
GIN
actual #109 vs paper #129 20 places worse
0.6510 ±0.0050
best reported
actual #109 vs paper #129 20 places worse
paper 0.5525 ±0.0153
paper 0.5525 ±0.0153 Δ at pub 0.0985
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

CLUSTER

Global leaderboard →
Non-default metric. This paper reports W. Accuracy; the dataset default is Accuracy. Values below use W. Accuracy only.

Sorted by W. Accuracy. Highlighted rows are from other papers.

#ModelW. Accuracy ↑Paper
1
PPGT
0.8003 ±0.0011
This paper
2
GRIT
0.8003 ±0.0028
This paper
3
EGT
0.7923 ±0.0035
This paper
4
CKGCN
0.7900 ±0.0014
This paper
5
GPS
0.7802 ±0.0018
This paper
6
K-Subgraph SAT
0.7786 ±0.0010
This paper
7
SAN
0.7669 ±0.0065
This paper
8
GatedGCN
0.7384 ±0.0033
This paper
9
GAT
0.7059 ±0.0045
This paper
10
GCN
0.6850 ±0.0098
This paper
11
GIN
0.6472 ±0.0155
This paper
#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
4
PPGT
0.8975 ±0.0003
This paper
5
CKGCN
0.8866 ±0.0014
This paper
6
GRIT
actual #6 vs paper #7 1 place worse
0.8722 ±0.0003
best reported
actual #6 vs paper #7 1 place worse
paper 0.8720 ±0.0008

Difference within reported uncertainty; not counted as underperformance.

paper 0.8720 ±0.0008 Δ at pub 0.0002
19
GIN-AK+
0.8685 ±0.0006
This paper
21
K-Subgraph SAT
0.8685 ±0.0004
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
actual #66 vs paper #91 25 places worse
0.8651 ±0.0008
best reported
actual #66 vs paper #91 25 places worse
paper 0.8557 ±0.0009
best at pub: IJCAI--23 Formatting Instructions (IJCAI 2023)
paper 0.8557 ±0.0009 Δ at pub 0.0094
88
GCN
actual #88 vs paper #116 28 places worse
0.8561 ±0.0003
best reported
actual #88 vs paper #116 28 places worse
paper 0.7189 ±0.0033
paper 0.7189 ±0.0033 Δ at pub 0.1372
89
GIN
actual #89 vs paper #94 5 places worse
0.8559 ±0.0001
best reported
actual #89 vs paper #94 5 places worse
paper 0.8539 ±0.0014
best at pub: Factorizable Graph Convolutional Networks (NeurIPS 2020)
best today: GNNBenchmark (JMLR 2023)

Difference within reported uncertainty; not counted as underperformance.

paper 0.8539 ±0.0014 Δ at pub 0.0020 Δ today 0.0020
107
GAT
0.7827 ±0.0019
This paper
123
MLP
0.5052
124
GraphSAGE
0.5052 ±0.0000
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 today — OK at publication; today's leaderboard best is elsewhere