Rethinking Graph Transformers with Spectral Attention
Devin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau, Prudencio Tossou
Abstract
In recent years, the Transformer architecture has proven to be very successful in sequence processing, but its application to other data structures, such as graphs, has remained limited due to the difficulty of properly defining positions. Here, we present the (SAN), which uses a learned positional encoding (LPE) that can take advantage of the full Laplacian spectrum to learn the position of each node in a given graph. This LPE is then added to the node features of the graph and passed to a fully-connected Transformer. By leveraging the full spectrum of the Laplacian, our model is theoretically powerful in distinguishing graphs, and can better detect similar sub-structures from their resonance. Further, by fully connecting the graph, the Transformer does not suffer from over-squashing, an information bottleneck of most GNNs, and enables better modeling of physical phenomenons such as heat transfer and electric interaction. When tested empirically on a set of 4 standard datasets, our model performs on par or better than state-of-the-art GNNs, and outperforms any attention-based model by a wide margin, becoming the first fully-connected architecture to perform well on graph benchmarks.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
268 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Recipe for a General, Powerful, Scalable Graph Transformer cites Distance Encoding: Design Provably More Powerful Neural Networks for Graph Representation Learning
- Recipe for a General, Powerful, Scalable Graph Transformer cites Do Transformers Really Perform Badly for Graph Representation?
- Recipe for a General, Powerful, Scalable Graph Transformer cites Structure-Aware Transformer for Graph Representation Learning
- Recipe for a General, Powerful, Scalable Graph Transformer cites Graph Neural Networks with Learnable Structural and Positional Representations
- Recipe for a General, Powerful, Scalable Graph Transformer cites Principal Neighbourhood Aggregation for Graph Nets
- Simplifying and Empowering Transformers for Large-Graph Representations cites Recipe for a General, Powerful, Scalable Graph Transformer
- Simplifying and Empowering Transformers for Large-Graph Representations cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- Simplifying and Empowering Transformers for Large-Graph Representations cites Structure-Aware Transformer for Graph Representation Learning
- O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformers cites Are Transformers universal approximators of sequence-to-sequence functions?
- Distance Encoding: Design Provably More Powerful Neural Networks for Graph Representation Learning cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- Do Transformers Really Perform Badly for Graph Representation? cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- Do Transformers Really Perform Badly for Graph Representation? cites Distance Encoding: Design Provably More Powerful Neural Networks for Graph Representation Learning
- Do Transformers Really Perform Badly for Graph Representation? cites Principal Neighbourhood Aggregation for Graph Nets
- Structure-Aware Transformer for Graph Representation Learning cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- Structure-Aware Transformer for Graph Representation Learning cites Distance Encoding: Design Provably More Powerful Neural Networks for Graph Representation Learning
- Structure-Aware Transformer for Graph Representation Learning cites Do Transformers Really Perform Badly for Graph Representation?
- Structure-Aware Transformer for Graph Representation Learning cites Graph Neural Networks with Learnable Structural and Positional Representations
- Structure-Aware Transformer for Graph Representation Learning cites Principal Neighbourhood Aggregation for Graph Nets
- Graph Neural Networks with Learnable Structural and Positional Representations cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
- Graph Neural Networks with Learnable Structural and Positional Representations cites Distance Encoding: Design Provably More Powerful Neural Networks for Graph Representation Learning
- Graph Neural Networks with Learnable Structural and Positional Representations cites Principal Neighbourhood Aggregation for Graph Nets
- Principal Neighbourhood Aggregation for Graph Nets cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
Cited by top-tier papers268
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Graph Neural Networks with Learnable Structural and Positional RepresentationsVijay Prakash Dwivedi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio et al.ICLR 2022 · 464 citations
- Structure-Aware Transformer for Graph Representation LearningDexiong Chen, Leslie O'Bray, Karsten M. BorgwardtICML 2022 · 349 citations
- Simplifying and Empowering Transformers for Large-Graph RepresentationsQitian Wu, Wentao Zhao, Chenxiao Yang, Hengrui Zhang et al.NeurIPS 2023 · 318 citations
Builds on6
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Principal Neighbourhood Aggregation for Graph NetsGabriele Corso, Luca Cavalleri, Dominique Beaini, Pietro Liò et al.NeurIPS 2020 · 914 citations
- Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi et al.ICLR 2020 · 481 citations
- Distance Encoding: Design Provably More Powerful Neural Networks for Graph Representation LearningPan Li, Yanbang Wang, Hongwei Wang, Jure LeskovecNeurIPS 2020 · 391 citations
- O(n) Connections are Expressive Enough: Universal Approximability of Sparse TransformersChulhee Yun, Yin-Wen Chang, Srinadh Bhojanapalli, Ankit Singh Rawat et al.NeurIPS 2020 · 111 citations
Related papers
- Rotary Position Encodings for GraphsIsaac Reid, Arijit Sehanobish, Cederik Höfs, Bruno Mlodozeniec et al.ICML 2026
- On the Stability of Expressive Positional Encodings for GraphsYinan Huang, William Lu, Joshua Robinson, Yu Yang et al.ICLR 2024 · 32 citations
- Transformers over Directed Acyclic GraphsYuankai Luo, Veronika Thost, Lei ShiNeurIPS 2023 · 43 citations
- Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph ProductsGuy Bar-Shalom, Beatrice Bevilacqua, Haggai MaronICML 2024 · 13 citations
- Graph External Attention Enhanced TransformerJianqing Liang, Min Chen, Jiye LiangICML 2024 · 11 citations
