Efficient Content-Based Sparse Attention with Routing Transformers
Open accessThe DOI matches its Crossref record; 42 of the 46 references it cites were found in a registry or an index.
Abstract
Self-attention has recently been adopted for a wide range of sequence modeling problems. Despite its effectiveness, self-attention suffers from quadratic computation and memory requirements with respect to sequence length. Successful approaches to reduce this complexity focused on attending to local sliding windows or a small set of locations independent of content. Our work proposes to learn dynamic sparse attention patterns that avoid allocating computation and memory to attend to content unrelated to the query of interest. This work builds upon two lines of research: It combines the modeling flexibility of prior work on content-based sparse attention with the efficiency gains from approaches based on local, temporal sparse attention. Our model, the Routing Transformer, endows self-attention with a sparse routing module based on online k-means while reducing the overall complexity of attention to O( n 1.5 d) from O( n 2 d) for sequence length n and hidden dimension d. We show that our model outperforms comparable sparse attention models on language modeling on Wikitext-103 (15.8 vs 18.3 perplexity), as well as on image generation on ImageNet-64 (3.43 vs 3.44 bits/dim) while using fewer self-attention layers. Additionally, we set a new state-of-the-art on the newly released PG-19 data-set, obtaining a test perplexity of 33.2 with a 22 layer Routing Transformer model trained on sequences of length 8192. We open-source the code for Routing Transformer in Tensorflow. 1
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Approximate attention methods have attempted to address this problem by trading off model quality to reduce the compute complexity, but often do not achieve wall-clock speedup.”
From FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness (2022) · cites this paper as [74]
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404
Self-citationAdam: A Method for Stochastic Optimization
Kingma, D. P., & Ba, J. (2014) · arXiv · doi:10.48550/arxiv.1412.6980 · Cited by 98,946
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325
Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation
Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014) · Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.3115/v1/d14-1179 · Cited by 25,545 · cited 1×
“In particular, (Bahdanau et al., 2014; Cho et al., 2014; Vaswani et al., 2017) relied on attention to drastically improve the state-of-the art in machine translation.”
BackgroundEffective Approaches to Attention-based Neural Machine Translation
Luong, T., Pham, H., & Manning, C. D. (2015) · Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d15-1166 · Cited by 8,382
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
Xu, K., Ba, J., Kiros, R., Cho, K., Courville, A., Salakhutdinov, R., Zemel, R., & Bengio, Y. (2015) · arXiv · doi:10.48550/arxiv.1502.03044 · Cited by 8,248
XLNet: Generalized Autoregressive Pretraining for Language Understanding
Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., & Le, Q. V. (2019) · arXiv · doi:10.48550/arxiv.1906.08237 · Cited by 6,687
Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation
Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014) · arXiv · doi:10.48550/arxiv.1406.1078 · Cited by 3,317 · cited 1×
“In particular, (Bahdanau et al., 2014; Cho et al., 2014; Vaswani et al., 2017) relied on attention to drastically improve the state-of-the art in machine translation.”
BackgroundTransformer-XL: Attentive language models beyond a fixed-length context
Dai, Z., Yang, Z., Yang, Y., Carbonell, J., Le, Q., & Salakhutdinov, R. (2019) · Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/p19-1285 · Cited by 3,169
Self-Attention with Relative Position Representations
Shaw, P., Uszkoreit, J., & Vaswani, A. (2018) · Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers) · doi:10.18653/v1/n18-2074 · Cited by 2,505
Self-citation
Research works printed but not linked: 14
- Rami Al-Rfou, Dokook Choe, Noah Constant, Mandy Guo, and Llion Jones. 2019. Characterlevel language modeling with deeper selfattention. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 33, pages 3159-3166.
- Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015 .
- Xi Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. 2018. Pixelsnail: An improved autoregressive generative model. In International Conference on Machine Learning , pages 864-872.
- Chung-Cheng Chiu* and Colin Raffel*. 2018. Monotonic chunkwise attention. In International Conference on Learning Representations .
- Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Ian Simon, Curtis Hawthorne, Noam Shazeer, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. 2018. Music transformer: Generating music with long-term structure. In International Conference on Learning Representations .
- Navdeep Jaitly, Quoc V Le, Oriol Vinyals, Ilya Sutskever, David Sussillo, and Samy Bengio. 2016. An online sequence-to-sequence model using partial conditioning. In Advances in Neural Information Processing Systems , pages 5067-5075.
- Durk P Kingma and Prafulla Dhariwal. 2018. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems , pages 10215-10224.
- Guillaume Lample, Alexandre Sablayrolles, Marc'Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. 2019. Large memory layers with product keys. In Advances in Neural Information Processing Systems , pages 8548-8559.
- Peter J Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, and Noam Shazeer. 2018. Generating wikipedia by summarizing long sequences. In International Conference on Learning Representations .
- André F. T. Martins and Julia Kreutzer. 2017. Learning what's easy: Fully differentiable neural easy-first taggers. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing , pages 349-362, Copenhagen, Denmark. Association for Computational Linguistics.
- Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings . OpenReview.net.
- Jack Rae and Ali Razavi. 2020. Do transformers need deep long-range memory? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics , pages 7524-7529, Online. Association for Computational Linguistics.
- Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier, and Timothy P. Lillicrap. 2020. Compressive transformers for longrange sequence modelling. In International Conference on Learning Representations .
- Hinton, and Jeff Dean. 2017. Outrageously large neural networks: The sparsely-gated mixture-ofexperts layer. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings . OpenReview.net.
Cited by
Items 601–613 of 613
Xu, W., Zhang, Y., Zhu, R., Wu, X., Wang, Z., Li, W., Wang, J., Du, C., Gao, Y., Gao, Z., et al. (2026) · IEEE Transactions on Very Large Scale Integration (VLSI) Systems · doi:10.1109/tvlsi.2026.3729783
“Some approaches emphasize algorithmic optimization to lower computational demand or reduce memory usage [11], [12], [13], [14], [15], [16], whereas others concentrate on specialized hardware designs to accelerate attention processing [17], [18], [19], [20], [21].”
Structure-Guided Masked Autoencoders for Ultra-High Resolution Scientific Image UnderstandingPreprint
Zhang, E., Wu, D., Zhong, R., Ma, C., Lyngaas, I., Ziabari, A. K., Wang, X., Chen, P., Luo, T., Endo, T., et al. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2609.30682
“Linear approximation methods reduce complexity through techniques like spectral attention [16, 3, 35], low-rank approx-4 imation [13, 28], sparse attention matrix sampling [12, 33, 47, 2, 63], or infrequent self-attention updates [61, 43].”
Pixel-Level Transformers in Remote Sensing: A Canopy Height Case StudyPreprint
Ligensa, S., Pauls, J., Schrödter, K., Fayad, I., & Gieseke, F. C. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2609.37809
“Dynamic (i.e., data-dependent) patterns include clustering the tokens via locality-sensitive hashing [22, 43] or 𝑘 -means [3, 36, 43], and only calculating attention among tokens of the same cluster.”
Exploiting Thermal Self-Similarity for Robust Blind Super-Resolution of Real-World Infrared Images
Lee, D., Lee, S., & Kim, S. (2026) · IEEE Access · doi:10.1109/access.2026.3738649
“During training, the centers are refined within each image by a few k -means update steps, and accumulated across images into a single, global set by an exponential moving average [33], [50].”
The Evolution of Attention in Large Language Models: Mechanisms, Trade-offs, and Emerging TrendsPreprint
Tan, Z., Shen, J., Li, Y., Liu, Y., Wu, Y., & Ye, J. (2026) · arXiv · doi:10.48550/arxiv.2609.39661
On the Trade-off Between Information Loss and Generalization in Sparse AttentionPreprint
Fan, Z., & Tan, Z. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2610.04424
“…paradigms have emerged: low-rank approximation (e.g., Linformer [4]) and attention sparsification, which includes static patterns (e.g., Longformer [5]) and content-based dynamic routing (e.g., Routing Transformer [6]), offering a more flexible trade-off between efficiency and performance.”
Blink completeness assessment using CNN–based feature extraction and transformer temporal modeling
de la Cruz, G., Luaces, O., & Remeseiro, B. (2026) · Applied Soft Computing · doi:10.1016/j.asoc.2026.116645
Fine-Grained Visual Grounding Through Token-Level Attention
Guo, T., Li, J., Zhou, Y., Jiang, Y., & Liu, H. (2026) · Smart innovation, systems and technologies · doi:10.1007/978-3-032-30756-9_22
Balanced and efficient federated inference of large language models
Zhang, L., Tao, Q., Zhou, Z., Zhang, Y., Wang, Y., & Tong, Y. (2026) · Frontiers of Computer Science · doi:10.1007/s11704-026-60010-4
ADAPT-BIO: A Biologically Inspired Adaptive Sparse Attention Framework for Efficient Transformers
Singh, J. P., Benjwal, K., & Ghosh, D. (2026) · IEEE Access · doi:10.1109/access.2026.3747112
“Instead of approximating the attention function, Routing Transformer [39] enhances efficiency by clustering tokens that share similar semantics via content-based routing.”
AB-Attention: Accurate Block Attention for Accelerating Video Diffusion TransformersPreprint
Xu, B., Zhang, M., Zhang, Z., Yang, X., Ma, Y., Wang, W., Wang, H., Zhou, P., & Zhao, W. (2026) · arXiv · doi:10.48550/arxiv.2610.39663
SparseGDN: Chunk Sparse in Linear AttentionPreprint
Zhuang, J., Zhao, P., Tang, J., & Hu, H. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2610.41420
“The quadratic cost of self-attention has motivated recurrence, structured sparsity, low-rank projection, hashing, routing, and kernelized approximations [3, 7–9, 24, 39, 53, 54, 63].”
Luna: Linear Unified Nested Attention
Ma, X., Kong, X., Wang, S., Zhou, C., May, J., Ma, H., & Zettlemoyer, L. (2021) · arXiv · doi:10.48550/arxiv.2106.01540
“, 2018), and attention with learnable patterns (Kitaev et al., 2020; Tay et al., 2020a; Roy et al., 2021).”
BackgroundMethodInfluential
Metadata
- Authors
- Roy, A., Saffar, M., Vaswani, A., & Grangier, D.
- Affiliations
- Google (United States) (US)
- Venue
- Transactions of the Association for Computational Linguistics
- Publisher
- MIT Press
- Published
- 2021-02
- Volume
- 9
- Pages
- 53-68
- ISSN
- 2307-387X (ISSN-L)
- OpenAlex
- W2997517014
- Semantic Scholar
- fdadfb4b43f41d6b0264423b7deb016ff761c4e9
- Cited by
- 509
- References
- 46
- Citations by year
- 2026: 56 · 2025: 79 · 2024: 91 · 2023: 105 · 2022: 77 · 2021: 76
- FWCI
- 30.83
- Type
- journal article
- Language
- en
- Open access
- diamond
- doi.org
- Licence
- cc-by
- Locations
- Transactions of the Association for Computational Linguistics (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion)
- arXiv (Cornell University)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
- Keywords
- sparse attention, self-attention, computational efficiency, memory efficiency, language modeling, image generation, long sequence modeling
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.