Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph Products
Abstract
In the realm of Graph Neural Networks (GNNs), two exciting research directions have recently emerged: Subgraph GNNs and Graph Transformers. In this paper, we propose an architecture that integrates both approaches, dubbed Subgraphormer, which combines the enhanced expressive power, message-passing mechanisms, and aggregation schemes from Subgraph GNNs with attention and positional encodings, arguably the most important components in Graph Transformers. Our method is based on an intriguing new connection we reveal between Subgraph GNNs and product graphs, suggesting that Subgraph GNNs can be formulated as Message Passing Neural Networks (MPNNs) operating on a product of the graph with itself. We use this formulation to design our architecture: first, we devise an attention mechanism based on the connectivity of the product graph. Following this, we propose a novel and efficient positional encoding scheme for Subgraph GNNs, which we derive as a positional encoding for the product graph. Our experimental results demonstrate significant performance improvements over both Subgraph GNNs and Graph Transformers on a wide range of datasets.
Benchmark Results
Tested on 1 dataset
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 | |
| 6 | Subgraphormer | 0.0200
±0.0020 best reported | best today: A Flexible, Equivariant Framework for Subgraph GNNs via Graph Products and Graph Coarsening (NeurIPS 2024) Difference within reported uncertainty; not counted as underperformance. |
| 5 | PPGN++(6) | 0.0200
±0.0010 | This paper |
| 9 | GNN-SSWL+ | 0.0220
±0.0010 | This paper |
| 21 | SUN | 0.0240
±0.0030 | This paper |
| 22 | Graphormer | 0.0250 best reported | best at pub: Enhancing Graph Neural Networks with Quantum Computed Encodings (2023) best today: FloydNet: A Learning Paradigm for Global Relational Reasoning (2026) |
| 23 | Graphormer-GD | 0.0250
±0.0040 | This paper |
| 30 | URPE | 0.0280
±0.0020 | This paper |
| 31 | NGNN | 0.0290
±0.0010 | This paper |
| 32 | DSS-GNN | 0.0290
±0.0030 | This paper |
| 51 | CIN (small) | 0.0440
±0.0030 | This paper |
| 69 | GIN | 0.0880
±0.0020 |
