Lune

ICML2022Top-tier venue

From block-Toeplitz matrices to differential equations on graphs: towards a general theory for scalable masked Transformers

Krzysztof Choromanski, Han Lin, Haoxian Chen, Tianyi Zhang, Arijit Sehanobish, Valerii Likhosherstov, Jack Parker-Holder, Tamás Sarlós, Adrian Weller, Thomas Weingarten

Abstract

In this paper we provide, to the best of our knowledge, the first comprehensive approach for incorporating various masking mechanisms into Transformers architectures in a scalable way. We show that recent results on linear causal attention (Choromanski et al., 2021) and log-linear RPE-attention (Luo et al., 2021) are special cases of this general mechanism. However by casting the problem as a topological (graph-based) modulation of unmasked attention, we obtain several results unknown before, including efficient d-dimensional RPE-masking and graph-kernel masking. We leverage many mathematical techniques ranging from spectral analysis through dynamic programming and random walks to new algorithms for solving Markov processes on graphs. We provide a corresponding empirical evaluation.

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.

21 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

  • Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention cites Reformer: The Efficient Transformer
  • Recipe for a General, Powerful, Scalable Graph Transformer cites Reformer: The Efficient Transformer
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention cites Reformer: The Efficient Transformer
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention cites Language Models are Few-Shot Learners
  • Polynormer: Polynomial-Expressive Graph Transformer in Linear Time cites Recipe for a General, Powerful, Scalable Graph Transformer
  • Polynormer: Polynomial-Expressive Graph Transformer in Linear Time cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • GIMLET: A Unified Graph-Text Model for Instruction-Based Molecule Zero-Shot Learning cites Language Models are Few-Shot Learners
  • On Oversquashing in Graph Neural Networks Through the Lens of Dynamical Systems cites Recipe for a General, Powerful, Scalable Graph Transformer
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers21

  1. 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
  2. GIMLET: A Unified Graph-Text Model for Instruction-Based Molecule Zero-Shot LearningHaiteng Zhao, Shengchao Liu, Chang Ma, Hannan Xu et al.NeurIPS 2023 · 97 citations
  3. Polynormer: Polynomial-Expressive Graph Transformer in Linear TimeChenhui Deng, Zichao Yue, Zhiru ZhangICLR 2024 · 81 citations
  4. Comparing Graph Transformers via Positional EncodingsMitchell Black, Zhengchao Wan, Gal Mishne, Amir Nayyeri et al.ICML 2024 · 27 citations
  5. On Oversquashing in Graph Neural Networks Through the Lens of Dynamical SystemsAlessio Gravina, Moshe Eliasof, Claudio Gallicchio, Davide Bacciu et al.AAAI 2025 · 22 citations

Builds on13

  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. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  4. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  5. Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan et al.AAAI 2021 · 675 citations

Related papers

  1. On the Emergence of Position Bias in TransformersXinyi Wu, Yifei Wang, Stefanie Jegelka, Ali JadbabaieICML 2025 · 1 citation
  2. Stable, Fast and Accurate: Kernelized Attention with Relative Positional EncodingShengjie Luo, Shanda Li, Tianle Cai, Di He et al.NeurIPS 2021 · 66 citations
  3. Linear Transformer Topological Masking with Graph Random FeaturesIsaac Reid, Kumar Avinava Dubey, Deepali Jain, William F. Whitney et al.ICLR 2025
  4. Log-Linear AttentionHan Guo, Songlin Yang, Tarushii Goel, Eric P. Xing et al.ICLR 2026 · 41 citations
  5. StableMask: Refining Causal Masking in Decoder-only TransformerQingyu Yin, Xuzheng He, Xiang Zhuang, Yu Zhao et al.ICML 2024 · 23 citations
Dusk over the sea between two cliffs drawn in fine vertical lines