NeurIPS 2024

Even Sparser Graph Transformers

Hamed Shirzad, Honghao Lin, Balaji Venkatachalam, A. Velingker, David Woodruff, Danica J. Sutherland

Main figure for Even Sparser Graph Transformers

Abstract

Graph Transformers excel in long-range dependency modeling, but generally require quadratic memory complexity in the number of nodes in an input graph, and hence have trouble scaling to large graphs. Sparse attention variants such as Exphormer can help, but may require high-degree augmentations to the input graph for good performance, and do not attempt to sparsify an already-dense input graph. As the learned attention mechanisms tend to use few of these edges, such high-degree connections may be unnecessary. We show (empirically and with theoretical backing) that attention scores on graphs are usually quite consistent across network widths, and use this observation to propose a two-stage procedure, which we call Spexphormer: first, train a narrow network on the full augmented graph. Next, use only the active connections to train a wider network on a much sparser graph. We establish theoretical conditions when a narrow network's attention scores can match those of a wide network, and show that Spexphormer achieves good performance with drastically reduced memory requirements on various graph datasets. Code can be found at.

Benchmark Results

Tested on 10 datasets 4 baseline values reported too low

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

Classic

#ModelAccuracy ↑Paper
1
GraphTARIF
0.9703 ±0.0019
2
GAT
0.9669 ±0.0014
3
GAT+T
0.9660 ±0.0007
7
SAGE
0.9643 ±0.0027
23
Exphormer
actual #23 vs paper #37 14 places worse
0.9536 ±0.0017
actual #23 vs paper #37 14 places worse
paper 0.9536 ±0.0017

Improvement within reported uncertainty; not highlighted.

paper 0.9536 ±0.0017 Δ at pub 0.0001
41
SPEXPHORMER
0.9533 ±0.0049
This paper
46
EXPHORMER + GCN
0.9527 ±0.0042
This paper
361
GraphSAINT
0.9172 ±0.0013
This paper
390
MLP
0.9128 ±0.0063
#ModelAccuracy ↑Paper
1
GraphTARIF
0.9461 ±0.0017
2
GCN
0.9412 ±0.0008
3
GAT
0.9398 ±0.0022
8
SAGE
0.9351 ±0.0006
33
Exphormer
actual #33 vs paper #46 13 places worse
0.9180 ±0.0035
best reported
actual #33 vs paper #46 13 places worse
paper 0.9116 ±0.0026
42
EXPHORMER + GCN
0.9159 ±0.0031
This paper
50
SPEXPHORMER
0.9109 ±0.0008
This paper
83
GraphSAINT
0.9022 ±0.0015
This paper
320
MLP
0.8463
#ModelAccuracy ↑Paper
1
GrokFormer
0.9831 ±0.0018
2
PolyFormer
0.9808 ±0.0027
3
SGFormer
0.9796 ±0.0081
9
GCN
0.9774 ±0.0035
27
Exphormer
actual #27 vs paper #46 19 places worse
0.9720 ±0.0010
best reported
actual #27 vs paper #46 19 places worse
paper 0.9640 ±0.0020
paper 0.9640 ±0.0020 Δ at pub 0.0049 Δ today 0.0080
29
EXPHORMER + GCN
0.9716 ±0.0013
This paper
37
SPEXPHORMER
0.9670 ±0.0005
This paper
46
GraphSAINT
0.9643 ±0.0005
This paper
58
MLP
0.9597 ±0.0007
#ModelAccuracy ↑Paper
1
GCN
0.9302 ±0.0011
2
RSE + RGCN (70b)
0.8852 ±0.0019
3
LEMP+T
0.8825
9
SAGE
0.8771
35
SPEXPHORMER
actual #35 vs paper #170 135 places worse
0.8453 ±0.0015
best reported
actual #35 vs paper #170 135 places worse
paper 0.7820 ±0.0014
117
Exphormer
actual #117 vs paper #171 54 places worse
0.7938 ±0.0062
best reported
actual #117 vs paper #171 54 places worse
paper 0.7819 ±0.0029
158
EXPHORMER + GCN
0.7854 ±0.0049
This paper
237
MLP
0.7469 ±0.0085

Heterophilic Graphs

#ModelAccuracy ↑Paper
1
DiGGR
0.4535 ±0.0353
2
TRIGON
0.4402 ±0.0028
3
DoG
0.4320 ±0.0120
42
MLP
0.4026 ±0.0108
58
GloGNN
actual #58 vs paper #166 108 places worse
0.3959 ±0.0029
best reported
actual #58 vs paper #166 108 places worse
paper 0.3640 ±0.0160
paper 0.3640 ±0.0160 Δ at pub 0.0319
67
Exphormer
0.3901 ±0.0069
This paper
68
GraphSAGE
0.3899 ±0.0085
73
Exphormer+GAT
0.3868 ±0.0038
This paper
76
SPEXPHORMER
0.3859 ±0.0081
This paper
110
GraphGPS
actual #110 vs paper #129 19 places worse
0.3710 ±0.0150
actual #110 vs paper #129 19 places worse
paper 0.3710 ±0.0150

Improvement within reported uncertainty; not highlighted.

paper 0.3710 ±0.0150 Δ at pub 0.0109
136
NodeFormer
actual #136 vs paper #136
0.3690 ±0.0100
actual #136 vs paper #136
paper 0.3690 ±0.0100

Improvement within reported uncertainty; not highlighted.

paper 0.3690 ±0.0100 Δ at pub 0.0062

Heterophily Benchmark

#ModelAccuracy ↑Paper
1
Dir-Poly
0.9451 ±0.0022
2
D-CDE
0.9387 ±0.0041
3
LargeScaleNet
0.9358 ±0.0024
26
GraphSAGE
0.9106 ±0.0027
38
Exphormer+GAT
0.8903 ±0.0037
This paper
37
Exphormer
actual #37 vs paper #65 28 places worse
0.8903 ±0.0037
best reported
actual #37 vs paper #65 28 places worse
paper 0.8491 ±0.0025
paper 0.8491 ±0.0025 Δ at pub 0.0412 Δ today 0.0412
53
SPEXPHORMER
0.8754 ±0.0014
This paper
135
MLP
0.6665 ±0.0047
#ModelAccuracy ↑Paper
1
UniGAP
0.6375 ±0.0110
2
H2GCN + HalfHop
0.5961 ±0.0100
3
GraphSAGE + HalfHop
0.5897 ±0.0150
12
SAGE
0.5569 ±0.0023
33
Exphormer+GAT
0.5351 ±0.0046
This paper
32
Exphormer
actual #32 vs paper #132 100 places worse
0.5351 ±0.0046
best reported
actual #32 vs paper #132 100 places worse
paper 0.4680 ±0.0053
paper 0.4680 ±0.0053 Δ at pub 0.0671 Δ today 0.0671
84
MLP
0.5058
85
SPEXPHORMER
0.5048 ±0.0034
This paper
#ModelROC-AUC ↑Paper
1
BuNN
0.9899 ±0.0016
2
DC-GNN
0.9850 ±0.0021
3
Tango -GPS
0.9839 ±0.0054
42
GraphSAGE
0.9358 ±0.0005
59
Exphormer
actual #59 vs paper #59
0.9226 ±0.0056
actual #59 vs paper #59
paper 0.9226 ±0.0056
paper 0.9226 ±0.0056 Δ at pub 0.0152
77
Exphormer+GAT
0.9074 ±0.0053
This paper
79
SPEXPHORMER
0.9071 ±0.0017
This paper
156
MLP
0.5099 ±0.0147
#ModelROC-AUC ↑Paper
1
Polynormer-r
0.8591 ±0.0074
2
DC-GNN
0.8588 ±0.0081
3
TANGO-GPS
0.8566 ±0.0101
43
Exphormer+GAT
0.8377 ±0.0078
This paper
42
Exphormer
actual #42 vs paper #51 9 places worse
0.8377 ±0.0078
best reported
actual #42 vs paper #51 9 places worse
paper 0.8353 ±0.0028

Difference within reported uncertainty; not counted as underperformance.

paper 0.8353 ±0.0028 Δ at pub 0.0024 Δ today 0.0024
50
GCN
0.8364 ±0.0067
58
SPEXPHORMER
0.8334 ±0.0031
This paper
139
MLP
0.7362 ±0.0020
#ModelROC-AUC ↑Paper
1
NID_GAT
0.9703 ±0.0002
2
NID_GCN
0.9685 ±0.0010
3
UniGAP
0.8421 ±0.0080
16
GCN
0.7902 ±0.0060
84
Exphormer+GAT
0.7394 ±0.0106
This paper
83
Exphormer
actual #83 vs paper #86 3 places worse
0.7394 ±0.0106
best reported
actual #83 vs paper #86 3 places worse
paper 0.7335 ±0.0178

Difference within reported uncertainty; not counted as underperformance.

paper 0.7335 ±0.0178 Δ at pub 0.0059 Δ today 0.0059
87
SPEXPHORMER
0.7325 ±0.0041
This paper
96
MLP
0.7082 ±0.0010
SOTA performance (not significantly different from the best) 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 Best today — OK at publication; today's leaderboard best is elsewhere