Enhancing Graph Neural Networks with Quantum Computed Encodings
Abstract
Transformers are increasingly employed for graph data, demonstrating competitive performance in diverse tasks. To incorporate graph information into these models, it is essential to enhance node and edge features with positional encodings. In this work, we propose novel families of positional encodings tailored for graph transformers. These encodings leverage the long-range correlations inherent in quantum systems, which arise from mapping the topology of a graph onto interactions between qubits in a quantum computer. Our inspiration stems from the recent advancements in quantum processing units, which offer computational capabilities beyond the reach of classical hardware. We prove that some of these quantum features are theoretically more expressive for certain graphs than the commonly used relative random walk probabilities. Empirically, we show that the performance of state-of-the-art models can be improved on standard benchmarks and large-scale datasets by computing tractable versions of quantum features. Our findings highlight the potential of leveraging quantum computing capabilities to potentially enhance the performance of transformers in handling graph data.
Benchmark Results
Tested on 6 datasets 11 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
Classic
| # | Model | MAE ↓ | Paper |
|---|---|---|---|
| 1 | TIGT | 0.0140
±0.0010 | |
| 2 | FloydNet | 0.0160 | |
| 3 | GSSC | 0.0190
±0.0010 | |
| 11 | GRIT | 0.0230
±0.0010 | This paper |
| 13 | GRIT 2-QiQRW | 0.0230
±0.0020 | This paper |
| 19 | SignNet | 0.0240
±0.0030 | This paper |
| 25 | GRIT 1-CQRW | 0.0250
±0.0030 | This paper |
| 22 | Graphormer | 0.0250 best reported | best today: FloydNet: A Learning Paradigm for Global Relational Reasoning (2026) |
| 23 | Graphormer-GD | 0.0250
±0.0040 | This paper |
| 29 | Graphormer-URPE | 0.0280
±0.0020 | This paper |
| 69 | GIN | 0.0880
±0.0020 | This paper |
| 78 | GAT | 0.1110
±0.0020 | prev best: Meta-Aggregator: Learning to Aggregate for 1-bit Graph Neural Networks (2021) |
| 79 | GCN | 0.1130
±0.0020 | prev best: Meta-Aggregator: Learning to Aggregate for 1-bit Graph Neural Networks (2021) |
| 80 | GraphSAGE | 0.1260
±0.0030 | prev best: Meta-Aggregator: Learning to Aggregate for 1-bit Graph Neural Networks (2021) |
OGB
| # | Model | MAE ↓ | Paper |
|---|---|---|---|
| 1 | DeMol | 0.0603 | |
| 2 | TGT-At | 0.0671 | |
| 3 | TGT-At (+RDKit) | 0.0683 | |
| 17 | GRIT 2-QiQRW | 0.0838 | This paper |
| 19 | GRIT (our run) | 0.0842 | This paper |
| 22 | GPS-medium | 0.0858 | This paper |
| 31 | Graphormer | 0.0864 | This paper |
| 53 | GRIT 1-CQRW | 0.0947 | This paper |
| 64 | GIN | 0.1195 | This paper |
| 65 | GCN | 0.1195 | prev best: Recipe for a General, Powerful, Scalable Graph Transformer (NeurIPS 2022) |
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) |
| 32 | GIN | 0.9833
±0.0011 best reported | best at pub: Graph-Coupled Oscillator Networks (ICML 2022) |
| 42 | GRIT 2-QiQRW | 0.9820
±0.0005 | This paper |
| 47 | EGT | 0.9817
±0.0009 | This paper |
| 48 | GRIT (our run) | 0.9816
±0.0005 | This paper |
| 57 | GRIT 1-CQRW | 0.9811
±0.0011 | This paper |
| 59 | GPS | 0.9808
±0.0011 best reported | best at pub: Recipe for a General, Powerful, Scalable Graph Transformer (NeurIPS 2022) Difference within reported uncertainty; not counted as underperformance. |
| 86 | GAT | 0.9755
±0.0003 best reported | best at pub: Formatting Instructions for ICLR 2021 Conference Submissions (2020) |
| 95 | GraphSAGE | 0.9731
±0.0010 | |
| 126 | MLP | 0.9534
±0.0014 | |
| 135 | GCN | 0.9405
±0.0005 best reported | best at pub: A Generalization of ViT/MLP-Mixer to Graphs (ICML 2022) |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | RandAlign | 0.7942
±0.0007 | |
| 2 | differential encoding | 0.7907
±0.0027 | |
| 3 | PPGT | 0.7856
±0.0070 | |
| 7 | GRIT | 0.7647
±0.0088 | This paper |
| 8 | GRIT 2-QiQRW | 0.7644
±0.0107 | This paper |
| 11 | GRIT 1-CQRW | 0.7635
±0.0070 | This paper |
| 40 | DGN | 0.7284
±0.0042 best reported | best at pub: From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness (ICLR 2021) Difference within reported uncertainty; not counted as underperformance. |
| 44 | GIN-AK+ | 0.7239
±0.0038 best reported | best at pub: From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness (ICLR 2021) best today: Improving Subgraph-GNNs via Edge-Level Ego-Network Encodings (TMLR 2023) Difference within reported uncertainty; not counted as underperformance. |
| 46 | GPS | 0.7236
±0.0032 best reported | best at pub: Recipe for a General, Powerful, Scalable Graph Transformer (NeurIPS 2022) Difference within reported uncertainty; not counted as underperformance. |
| 62 | GatedGCN | 0.7133
±0.0039 best reported | best at pub: Formatting Instructions for ICLR 2021 Conference Submissions (2020) |
| 82 | EGT | 0.6870
±0.0041 | This paper |
| 92 | GraphSAGE | 0.6690
±0.0020 | |
| 101 | GAT | 0.6611
±0.0098 best reported | best at pub: Formatting Instructions for ICLR 2021 Conference Submissions (2020) |
| 109 | GIN | 0.6510
±0.0050 best reported | best at pub: Beyond Low-pass Filtering: Graph Convolutional Networks with Automatic Filtering (2021) |
| 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 |
|---|---|---|---|
| 1 | GRPE-Small | 0.8159
±0.0019 | |
| 2 | TANGO-GPS | 0.8011
±0.0014 | |
| 3 | GRIT | 0.8003
±0.0028 | This paper |
| 4 | GRIT 2-QiQRW | 0.7978
±0.0017 | This paper |
| 6 | EGT | 0.7923
±0.0035 | This paper |
| 7 | GRIT 1-CQRW | 0.7890
±0.0011 | This paper |
| 22 | GPS | 0.7802
±0.0018 | This paper |
| 23 | K-Subgraph SAT | 0.7786
±0.0010 | This paper |
| 50 | SAN | 0.7669
±0.0065 | This paper |
| 54 | GatedGCN | 0.7608
±0.0020 best reported | best at pub: GRPE: Relative Positional Encoding for Graph Transformer (2022) |
| 67 | GAT | 0.7059
±0.0045 | This paper |
| 70 | GCN | 0.6903
±0.0137 best reported | best at pub: How Expressive are Transformers in Spectral Domain for Graphs? (TMLR 2022) best today: Recurrent Distance Filtering for Graph Representation Learning (ICML 2023) Difference within reported uncertainty; not counted as underperformance. |
| 79 | GIN | 0.6472
±0.0155 | This paper |
| 80 | GraphSAGE | 0.6388
±0.0011 | |
| 114 | MLP | 0.2097
±0.0000 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | DeepGraph (48) | 0.9066
±0.0006 | |
| 2 | GRIT (our run) | 0.9041
±0.0023 | This paper |
| 3 | GRIT 2-QiQRW | 0.9016
±0.0045 | This paper |
| 7 | GRIT 1-CQRW | 0.8720
±0.0004 | This paper |
| 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 | 0.8651
±0.0008 best reported | best at pub: IJCAI--23 Formatting Instructions (IJCAI 2023) |
| 88 | GCN | 0.8561
±0.0003 best reported | best at pub: GNNBenchmark (JMLR 2023) best today: Recurrent Distance Filtering for Graph Representation Learning (ICML 2023) |
| 89 | GIN | 0.8559
±0.0001 best reported | best at pub: Factorizable Graph Convolutional Networks (NeurIPS 2020) best today: GNNBenchmark (JMLR 2023) Difference within reported uncertainty; not counted as underperformance. |
| 107 | GAT | 0.7827
±0.0019 | This paper |
| 123 | MLP | 0.5052 | |
| 124 | GraphSAGE | 0.5052
±0.0000 |
