Lune

ICML2024Top-tier venue

Aligning Transformers with Weisfeiler-Leman

Luis Müller, Christopher Morris

Abstract

Graph neural network architectures aligned with the kk-dimensional Weisfeiler--Leman (kk-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 kk-WL hierarchy have shown promising empirical results, employing transformers for higher orders of kk 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 kk-WL hierarchy, showing stronger expressivity results for each kk, 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 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.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Generalizable Insights for Graph Transformers in Theory and Practice cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Generalizable Insights for Graph Transformers in Theory and Practice cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Generalizable Insights for Graph Transformers in Theory and Practice cites Language Models are Few-Shot Learners
  • Open Graph Benchmark: Datasets for Machine Learning on Graphs cites Strategies for Pre-training Graph Neural Networks
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Language Models are Few-Shot Learners
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • Primphormer: Efficient Graph Transformers with Primal Representations cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Random Search Neural Networks for Efficient and Expressive Graph Learning cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Generalizable Insights for Graph Transformers in Theory and PracticeTimo Stoll, Luis Müller, Christopher MorrisNeurIPS 2025 · 2 citations
  2. On the Expressive Power of GNNs to Solve Linear SDPsChendi Qian, Christopher MorrisICML 2026 · 1 citation
  3. Random Search Neural Networks for Efficient and Expressive Graph LearningMichael Ito, Danai Koutra, Jenna WiensNeurIPS 2025 · 1 citation
  4. Primphormer: Efficient Graph Transformers with Primal RepresentationsMingzhen He, Ruikai Yang, Hanling Tian, Youmei Qiu et al.ICML 2025

Builds on19

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. 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
  3. 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
  4. Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
  5. Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 citations

Related papers

  1. Towards Principled Graph TransformersLuis Müller, Daniel Kusuma, Blai Bonet, Christopher MorrisNeurIPS 2024 · 14 citations
  2. A Practical, Progressively-Expressive GNNLingxiao Zhao, Neil Shah, Leman AkogluNeurIPS 2022 · 28 citations
  3. Weisfeiler and Leman go sparse: Towards scalable higher-order graph embeddingsChristopher Morris, Gaurav Rattan, Petra MutzelNeurIPS 2020 · 190 citations
  4. On the Stability of Expressive Positional Encodings for GraphsYinan Huang, William Lu, Joshua Robinson, Yu Yang et al.ICLR 2024 · 32 citations
  5. Weisfeiler Leman for Euclidean Equivariant Machine LearningSnir Hordan, Tal Amir, Nadav DymICML 2024 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines