A Generalization of ViT/MLP-Mixer to Graphs
Abstract
Graph Neural Networks (GNNs) have shown great potential in the field of graph representation learning. Standard GNNs define a local message-passing mechanism which propagates information over the whole graph domain by stacking multiple layers. This paradigm suffers from two major limitations, over-squashing and poor long-range dependencies, that can be solved using global attention but significantly increases the computational cost to quadratic complexity. In this work, we propose an alternative approach to overcome these structural limitations by leveraging the ViT/MLP-Mixer architectures introduced in computer vision. We introduce a new class of GNNs, called Graph ViT/MLP-Mixer, that holds three key properties. First, they capture long-range dependency and mitigate the issue of over-squashing as demonstrated on Long Range Graph Benchmark and TreeNeighbourMatch datasets. Second, they offer better speed and memory efficiency with a complexity linear to the number of nodes and edges, surpassing the related Graph Transformer and expressive GNN models. Third, they show high expressivity in terms of graph isomorphism as they can distinguish at least 3-WL non-isomorphic graphs. We test our architecture on 4 simulated datasets and 7 real-world benchmarks, and show highly competitive results on all of them. The source code is available for reproducibility at:.
Benchmark Results
Tested on 6 datasets 5 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
MoleculeNet
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | HIMP | 0.8740
±0.0050 | |
| 2 | GINE w/ VN | 0.8720
±0.0030 | |
| 3 | NaiveGINe+ K=3 w/ VN | 0.8700
±0.0040 | |
| 5 | GINE | 0.8668
±0.0077 best reported | best at pub: Graph convolutions that can finally model local structure (2020) |
| 14 | GCN | 0.8400
±0.0040 best reported | best at pub: Graph convolutions that can finally model local structure (2020) |
| 24 | GIN | 0.8290
±0.0069 | |
| 45 | GatedGCN | 0.8070
±0.0110 best reported | best today: Deep Prompt Tuning for Graph Transformers (2023) |
| 89 | GatedGCN-MLP-Mixer | 0.7910
±0.0040 | This paper |
| 97 | GINE-MLP-Mixer | 0.7868
±0.0043 | This paper |
| 102 | GatedGCN-ViT | 0.7857
±0.0028 | This paper |
| 103 | GINE-ViT | 0.7851
±0.0077 | This paper |
| 108 | GraphTrans-ViT | 0.7835
±0.0032 | This paper |
| 115 | GCN-ViT | 0.7820
±0.0096 | This paper |
| 116 | GraphTrans-MLP-Mixer | 0.7817
±0.0040 | This paper |
| 117 | GCN-MLP-Mixer | 0.7816
±0.0075 | This paper |
| 174 | GraphTrans | 0.7646
±0.0055 | This paper |
LRGB
| # | Model | MAE ↓ | Paper |
|---|---|---|---|
| 1 | GCN | 0.2421
±0.0016 | |
| 2 | IPR-MPNN | 0.2422
±0.0007 | |
| 3 | TANGO-GPS | 0.2422
±0.0014 | |
| 5 | GIN | 0.2429
±0.0019 | |
| 63 | GraphTrans-MLP-Mixer | 0.2480
±0.0013 | This paper |
| 72 | GCN-MLP-Mixer | 0.2486
±0.0041 | This paper |
| 80 | GINE-MLP-Mixer | 0.2494
±0.0007 | This paper |
| 96 | GatedGCN-MLP-Mixer | 0.2508
±0.0007 | This paper |
| 201 | MLP | 0.4351
±0.0008 |
| # | Model | AP ↑ | Paper |
|---|---|---|---|
| 1 | S^2GCN | 0.7311
±0.0066 | |
| 2 | S4G | 0.7293
±0.0004 | |
| 3 | BuNN | 0.7276
±0.0065 | |
| 4 | GCN | 0.7261
±0.0011 | |
| 41 | Graph MLP-Mixer | 0.6970
±0.0080 | This paper |
| 44 | Graph ViT | 0.6942
±0.0075 | This paper |
| 65 | SUN | 0.6730
±0.0078 | This paper |
| 87 | GPS | 0.6562
±0.0115 | This paper |
| 89 | SAN+RWSE | 0.6562
±0.0075 best reported | best at pub: LRGB (NeurIPS 2022) best today: Multiresolution Graph Transformers and Wavelet Positional Encoding for Learning Hierarchical Structures (2023) Difference within reported uncertainty; not counted as underperformance. |
| 107 | GNN-AK+ | 0.6480
±0.0089 | This paper |
| 116 | SAN+LapPE | 0.6384
±0.0121 | This paper |
| 181 | MLP | 0.4060
±0.0021 |
GNNBenchmark
| # | Model | Accuracy ↑ | 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 best reported | best at pub: Formatting Instructions for ICLR 2021 Conference Submissions (2020) |
| 17 | GatedGCN-ViT | 0.9846
±0.0009 | This paper |
| 32 | GIN | 0.9833
±0.0011 | |
| 33 | GatedGCN-MLP-Mixer | 0.9832
±0.0004 | This paper |
| 43 | GINE-ViT | 0.9820
±0.0005 | This paper |
| 58 | GINE-MLP-Mixer | 0.9809
±0.0004 | This paper |
| 79 | GraphTrans | 0.9782
±0.0012 | This paper |
| 89 | GraphTrans-MLP-Mixer | 0.9742
±0.0011 | This paper |
| 99 | GraphTrans-ViT | 0.9725
±0.0023 | This paper |
| 105 | GINE | 0.9705
±0.0023 | This paper |
| 119 | GCN-ViT | 0.9600
±0.0015 | This paper |
| 126 | MLP | 0.9534
±0.0014 | |
| 128 | GCN-MLP-Mixer | 0.9516
±0.0027 | This paper |
| 135 | GCN | 0.9269
±0.0023 | prev best: Formatting Instructions for ICLR 2021 Conference Submissions (2020) |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | RandAlign | 0.7942
±0.0007 | |
| 2 | differential encoding | 0.7907
±0.0027 | |
| 3 | PPGT | 0.7856
±0.0070 | |
| 32 | GraphTrans-MLP-Mixer | 0.7396
±0.0033 | This paper |
| 53 | GraphTrans-ViT | 0.7211
±0.0055 | This paper |
| 60 | GatedGCN-ViT | 0.7158
±0.0009 | This paper |
| 62 | GatedGCN | 0.7133
±0.0039 best reported | best at pub: Formatting Instructions for ICLR 2021 Conference Submissions (2020) |
| 67 | GatedGCN-MLP-Mixer | 0.7060
±0.0022 | This paper |
| 71 | GINE-ViT | 0.6967
±0.0040 | This paper |
| 84 | GINE-MLP-Mixer | 0.6833
±0.0022 | This paper |
| 87 | GraphTrans | 0.6809
±0.0020 | This paper |
| 92 | GraphSAGE | 0.6690
±0.0020 | |
| 115 | GCN-ViT | 0.6367
±0.0027 | This paper |
| 119 | GINE | 0.6131
±0.0035 | This paper |
| 120 | GCN-MLP-Mixer | 0.6111
±0.0017 | This paper |
| 124 | GCN | 0.5839
±0.0073 best reported | best at pub: From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness (ICLR 2021) |
| 126 | MLP | 0.5634
±0.0018 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 30 | Graph ViT/MLP-Mixer | 1.0000 | This paper |
| 8 | GCN | 1.0000 best reported | best today: GNNBenchmark (JMLR 2023) |
| 1 | PPGN | 1.0000 | |
| 2 | RW-AgentNet | 1.0000 | |
| 3 | AgentNet | 1.0000 | |
| 35 | GraphSAGE | 0.9993
±0.0047 | |
| 36 | GatedGCN | 0.9960
±0.0108 best reported | best today: GNNBenchmark (JMLR 2023) |
| 94 | Graphtransformer | 0.0000 | This paper |
| 93 | GINE | 0.0000 | This paper |
