TMLR 2022

Rewiring with Positional Encodings for Graph Neural Networks

Rickard Brüel Gabrielsson, M. Yurochkin, J. Solomon

Main figure for Rewiring with Positional Encodings for Graph Neural Networks

Abstract

Several recent works use positional encodings to extend the receptive fields of graph neural network (GNN) layers equipped with attention mechanisms. These techniques, however, extend receptive fields to the complete graph, at substantial computational cost and risking a change in the inductive biases of conventional GNNs, or require complex architecture adjustments. As a conservative alternative, we use positional encodings to expand receptive fields to $r$-hop neighborhoods. More specifically, our method augments the input graph with additional nodes/edges and uses positional encodings as node and/or edge features. We thus modify graphs before inputting them to a downstream GNN model, instead of modifying the model itself. This makes our method model-agnostic, i.e., compatible with any of the existing GNN architectures. We also provide examples of positional encodings that are lossless with a one-to-one map between the original and the modified graphs. We demonstrate that extending receptive fields via positional encodings and a virtual fully-connected node significantly improves GNN performance and alleviates over-squashing using small $r$. We obtain improvements on a variety of models and datasets and reach competitive performance using traditional GNNs or graph Transformers.

Proposed method: Ours(100K)

Benchmark Results

Tested on 5 datasets

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

Classic

#ModelMAE ↓Paper
1
Ours(100K)
0.9200 ±0.0090
This paper
2
GatedGCN-PE/E(500K)
0.9960 ±0.0080
This paper
3
GatedGCN-E-PE
0.9960 ±0.0080
13
GCN
1.2800 ±0.0110
22
MLP
1.7440 ±0.0160

GNNBenchmark

#ModelAccuracy ↑Paper
1
Schrödinger
0.9913 ±0.0004
2
CNN
0.9907 ±0.0007
3
MPNN
0.9895 ±0.0006
7
Ours(100K)
0.9874 ±0.0006
This paper
11
GatedGCN
0.9855 ±0.0002
32
GIN
0.9833 ±0.0011
76
PNA(100K)
0.9794 ±0.0012
This paper
91
GatedGCN(100K)
0.9734 ±0.0014
This paper
96
GraphSage(100K)
0.9731 ±0.0010
This paper
111
GIN(100K)
0.9648 ±0.0025
This paper
122
GAT(100K)
0.9554 ±0.0021
This paper
126
MLP
0.9534 ±0.0014
138
MoNet(100K)
0.9081 ±0.0003
This paper
#ModelAccuracy ↑Paper
1
RandAlign
0.7942 ±0.0007
2
differential encoding
0.7907 ±0.0027
3
PPGT
0.7856 ±0.0070
35
Ours(100K)
0.7381 ±0.0019
This paper
62
GatedGCN
0.7133 ±0.0039
92
GraphSAGE
0.6690 ±0.0020
113
GAT(100K)
0.6422 ±0.0046
This paper
126
MLP
0.5634 ±0.0018
130
MoNet(100K)
0.5465 ±0.0052
This paper
#ModelAccuracy ↑Paper
1
GRPE-Small
0.8159 ±0.0019
2
TANGO-GPS
0.8011 ±0.0014
3
GRIT
0.8003 ±0.0028
30
Ours(100K)
0.7758 ±0.0015
This paper
54
GatedGCN
0.7608 ±0.0020
62
GatedGCN-PE/E(500K)
0.7409 ±0.0034
This paper
70
GCN
0.6903 ±0.0137
82
PNA(100K)
0.6302 ±0.0026
This paper
88
GIN(100K)
0.5838 ±0.0024
This paper
90
GAT(100K)
0.5773 ±0.0032
This paper
95
GraphSage(100K)
0.5045 ±0.0014
This paper
107
GraphTransformer(500K)
0.2712 ±0.0847
This paper
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
36
Ours(100K)
0.8676 ±0.0003
This paper
42
PNA(100K)
0.8673 ±0.0005
This paper
66
GatedGCN
0.8651 ±0.0008
70
GatedGCN-PE/E(500K)
0.8636 ±0.0013
This paper
88
GCN
0.8561 ±0.0003
90
GIN(100K)
0.8559 ±0.0001
This paper
93
MoNet(100K)
0.8548 ±0.0004
This paper
100
GatedGCN(100K)
0.8448 ±0.0012
This paper
113
GAT(100K)
0.7582 ±0.0182
This paper
122
GraphTransformer(500K)
0.5494 ±0.0374
This paper
123
MLP
0.5052
125
GraphSage(100K)
0.5052 ±0.0000
This paper
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers)