Aligning Transformers with Weisfeiler-Leman
Luis Müller, Christopher Morris
Abstract
Graph neural network architectures aligned with the -dimensional Weisfeiler--Leman (-WL) hierarchy offer theoretically well-understood expressive power. However, these architectures often fail to deliver state-of-the-art predictive performance on real-world graphs, limiting their practical utility. While recent works aligning graph transformer architectures with the -WL hierarchy have shown promising empirical results, employing transformers for higher orders of remains challenging due to a prohibitive runtime and memory complexity of self-attention as well as impractical architectural assumptions, such as an infeasible number of attention heads. Here, we advance the alignment of transformers with the -WL hierarchy, showing stronger expressivity results for each , making them more feasible in practice. In addition, we develop a theoretical framework that allows the study of established positional encodings such as Laplacian PEs and SPE. We evaluate our transformers on the large-scale PCQM4Mv2 dataset, showing competitive predictive performance with the state-of-the-art and demonstrating strong downstream performance when fine-tuning them on small-scale molecular datasets. Our code is available at https://github.com/luis-mueller/wl-transformers.
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 ff8ecd11-d7ea-44f0-8ae3-4d11a14a4ea7Cited by top-tier papers4
- Generalizable Insights for Graph Transformers in Theory and PracticeTimo Stoll, Luis Müller, Christopher MorrisNeurIPS 2025 · 2 citations
- On the Expressive Power of GNNs to Solve Linear SDPsChendi Qian, Christopher MorrisICML 2026 · 1 citation
- Random Search Neural Networks for Efficient and Expressive Graph LearningMichael Ito, Danai Koutra, Jenna WiensNeurIPS 2025 · 1 citation
- Primphormer: Efficient Graph Transformers with Primal RepresentationsMingzhen He, Ruikai Yang, Hanling Tian, Youmei Qiu et al.ICML 2025
Builds on19
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- 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
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 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
Related papers
- Towards Principled Graph TransformersLuis Müller, Daniel Kusuma, Blai Bonet, Christopher MorrisNeurIPS 2024 · 14 citations
- Weisfeiler and Leman go sparse: Towards scalable higher-order graph embeddingsChristopher Morris, Gaurav Rattan, Petra MutzelNeurIPS 2020 · 190 citations
- On the Stability of Expressive Positional Encodings for GraphsYinan Huang, William Lu, Joshua Robinson, Yu Yang et al.ICLR 2024 · 32 citations
- A Practical, Progressively-Expressive GNNLingxiao Zhao, Neil Shah, Leman AkogluNeurIPS 2022 · 28 citations
- Weisfeiler Leman for Euclidean Equivariant Machine LearningSnir Hordan, Tal Amir, Nadav DymICML 2024 · 11 citations
