Distinguished In Uniform: Self-Attention Vs. Virtual Nodes
Eran Rosenbluth, Jan Tönshoff, Martin Ritzert, Berke Kisin, Martin Grohe
Abstract
Graph Transformers (GTs) such as SAN and GPS are graph processing models that combine Message-Passing GNNs (MPGNNs) with global Self-Attention. They were shown to be universal function approximators, with two reservations: 1. The initial node features must be augmented with certain positional encodings. 2. The approximation is non-uniform: Graphs of different sizes may require a different approximating network. We first clarify that this form of universality is not unique to GTs: Using the same positional encodings, also pure MPGNNs and even 2-layer MLPs are non-uniform universal approximators. We then consider uniform expressivity: The target function is to be approximated by a single network for graphs of all sizes. There, we compare GTs to the more efficient MPGNN + Virtual Node architecture. The essential difference between the two model definitions is in their global computation method -- Self-Attention Vs Virtual Node. We prove that none of the models is a uniform-universal approximator, before proving our main result: Neither model's uniform expressivity subsumes the other's. We demonstrate the theory with experiments on synthetic data. We further augment our study with real-world datasets, observing mixed results which indicate no clear ranking in practice as well.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a8d8d5ab-2a96-4391-9cfd-ea8bfd43bfbdCited by top-tier papers10
- Probabilistic Graph Rewiring via Virtual NodesChendi Qian, Andrei Manolache, Christopher Morris, Mathias NiepertNeurIPS 2024 · 24 citations
- Deeper with Riemannian Geometry: Overcoming Oversmoothing and Oversquashing for Graph Foundation ModelsLi Sun, Zhenhao Huang, Ming Zhang, Philip S. YuNeurIPS 2025 · 10 citations
- Are Graph Transformers Necessary? Efficient Long-Range Message Passing with Fractal Nodes in MPNNsJeongwhan Choi, Seungjun Park, Sumin Park, Sung-Bae Cho et al.AAAI 2026 · 2 citations
- Learning Long Range Dependencies on Graphs via Random WalksDexiong Chen, Till Hendrik Schulz, Karsten M. BorgwardtICLR 2025
- Expressive Power of Graph Transformers via LogicVeeti Ahvonen, Maurice Funk, Damian Heiman, Antti Kuusisto et al.AAAI 2026
Builds on15
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 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
- Rethinking Graph Transformers with Spectral AttentionDevin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau et al.NeurIPS 2021 · 854 citations
Related papers
- Understanding Virtual Nodes: Oversquashing and Node HeterogeneityJoshua Southern, Francesco Di Giovanni, Michael M. Bronstein, Johannes F. LutzeyerICLR 2025
- Exphormer: Sparse Transformers for GraphsHamed Shirzad, Ameya Velingker, Balaji Venkatachalam, Danica J. Sutherland et al.ICML 2023 · 219 citations
- Can Classic GNNs Be Strong Baselines for Graph-level Tasks? Simple Architectures Meet ExcellenceYuankai Luo, Lei Shi, Xiao-Ming WuICML 2025
- DUALFormer: Dual Graph TransformerJiaming Zhuo, Yuwei Liu, Yintong Lu, Ziyi Ma et al.ICLR 2025
- What functions can Graph Neural Networks compute on random graphs? The role of Positional EncodingNicolas Keriven, Samuel VaiterNeurIPS 2023 · 24 citations
