NeurIPS 2022

Representing Long-Range Context for Graph Neural Networks with Global Attention

Zhanghao Wu, Paras Jain, Matthew A. Wright, Azalia Mirhoseini, Joseph E. Gonzalez, Ion Stoica

Main figure for Representing Long-Range Context for Graph Neural Networks with Global Attention

Abstract

Graph neural networks are powerful architectures for structured datasets. However, current methods struggle to represent long-range dependencies. Scaling the depth or width of GNNs is insufficient to broaden receptive fields as larger GNNs encounter optimization instabilities such as vanishing gradients and representation oversmoothing, while pooling-based approaches have yet to become as universally useful as in computer vision. In this work, we propose the use of Transformer-based self-attention to learn long-range pairwise relationships, with a novel ``readout'' mechanism to obtain a global graph embedding. Inspired by recent computer vision results that find position-invariant attention performant in learning long-range relationships, our method, which we call GraphTrans, applies a permutation-invariant Transformer module after a standard GNN module. This simple architecture leads to state-of-the-art results on several graph classification tasks, outperforming methods that explicitly encode graph structure. Our results suggest that purely-learning-based approaches without graph structure may be suitable for learning high-level, long-range relationships on graphs. Code for GraphTrans is available at.

Proposed method: GraphTrans

Benchmark Results

Tested on 2 datasets

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

TU Dortmund

#ModelAccuracy ↑Paper
1
WL-MLP
0.9954
2
GIN
0.9934
3
GCN
0.9727
131
GraphSAGE
0.8200 ±0.0100
151
alon_bottleneck_2021
0.8150 ±0.0120
This paper
224
Errica2020A
0.8000 ±0.0140
This paper
415
SortPool
actual #415 vs paper #440 25 places worse
0.7496 ±0.0134
best reported
actual #415 vs paper #440 25 places worse
paper 0.7380 ±0.0100

Difference within reported uncertainty; not counted as underperformance.

paper 0.7380 ±0.0100 Δ at pub 0.0019 Δ today 0.0116
435
SAGPool_g
0.7420 ±0.0120
This paper
463
Set2Set
actual #463 vs paper #502 39 places worse
0.7170 ±0.0073
best reported
actual #463 vs paper #502 39 places worse
paper 0.6860 ±0.0190
paper 0.6860 ±0.0190 Δ at pub 0.0290 Δ today 0.0310
509
SAGPool_h
actual #509 vs paper #509
0.6755 ±0.0103
best reported
actual #509 vs paper #509
paper 0.6750 ±0.0110

Difference within reported uncertainty; not counted as underperformance.

paper 0.6750 ±0.0110 Δ today 0.0005

OGB

#ModelF1 ↑Paper
1
GMN
0.2060 ±0.0020
2
DirGraphSSM
0.2050 ±0.0023
3
Graph-Mamba
0.2030 ±0.0023
21
GraphTrans
0.1830 ±0.0024
This paper
23
DAGNN (SOTA)
0.1751 ±0.0049
This paper
27
Transformer
0.1670 ±0.0015
This paper
30
GCN-virtual
0.1595 ±0.0018
This paper
31
GIN-virtual
0.1581 ±0.0020
This paper
32
PNA
0.1570 ±0.0032
This paper
35
GCN
actual #35 vs paper #35
0.1510 ±0.0020
best reported
actual #35 vs paper #35
paper 0.1507 ±0.0018

Difference within reported uncertainty; not counted as underperformance.

paper 0.1507 ±0.0018 Δ today 0.0003
37
GIN
0.1495 ±0.0023
This paper
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers) Best today — OK at publication; today's leaderboard best is elsewhere