Specformer: Spectral Graph Neural Networks Meet Transformers
Abstract
Spectral graph neural networks (GNNs) learn graph representations via spectral-domain graph convolutions. However, most existing spectral graph filters are scalar-to-scalar functions, i.e., mapping a single eigenvalue to a single filtered value, thus ignoring the global pattern of the spectrum. Furthermore, these filters are often constructed based on some fixed-order polynomials, which have limited expressiveness and flexibility. To tackle these issues, we introduce Specformer, which effectively encodes the set of all eigenvalues and performs self-attention in the spectral domain, leading to a learnable set-to-set spectral filter. We also design a decoder with learnable bases to enable non-local graph convolution. Importantly, Specformer is equivariant to permutation. By stacking multiple Specformer layers, one can build a powerful spectral GNN. On synthetic datasets, we show that our Specformer can better recover ground-truth spectral filters than other spectral GNNs. Extensive experiments of both node-level and graph-level tasks on real-world graph datasets show that our Specformer outperforms state-of-the-art GNNs and learns meaningful spectrum patterns. Code and data are available at.
Benchmark Results
Tested on 1 dataset 2 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
OGB
| # | Model | MAE ↓ | Paper |
|---|---|---|---|
| 1 | DeMol | 0.0603 | |
| 2 | TGT-At | 0.0671 | |
| 3 | TGT-At (+RDKit) | 0.0683 | |
| 22 | GPS-medium | 0.0858 | This paper |
| 29 | EGT | 0.0862 best reported | |
| 31 | Graphormer | 0.0864 | This paper |
| 35 | GRPE | 0.0876 best reported | best at pub: Recipe for a General, Powerful, Scalable Graph Transformer (NeurIPS 2022) |
| 50 | GPS-small | 0.0938 | This paper |
| 58 | GIN-VN | 0.1083 | This paper |
| 60 | GCN-VN | 0.1152 best reported | best at pub: GRPE: Relative Positional Encoding for Graph Transformer (2022) |
| 65 | GCN | 0.1195 best reported | best at pub: Recipe for a General, Powerful, Scalable Graph Transformer (NeurIPS 2022) best today: Enhancing Graph Neural Networks with Quantum Computed Encodings (2023) |
| 64 | GIN | 0.1195 | This paper |
