Simple linear attention language models balance the recall-throughput tradeoff
Open accessAbstract
Recent work has shown that attention-based language models excel at recall, the ability to ground generations in tokens previously seen in context. However, the efficiency of attention-based models is bottle-necked during inference by the KV-cache's aggressive memory consumption. In this work, we explore whether we can improve language model efficiency (e.g. by reducing memory consumption) without compromising on recall. By applying experiments and theory to a broad set of architectures, we identify a key tradeoff between a model's state size and recall ability. We show that efficient alternatives to attention (e.g. H3, Mamba, RWKV) maintain a fixed-size recurrent state, but struggle at recall. We propose BASED a simple architecture combining linear and sliding window attention. By varying BASED window size and linear attention feature dimension, we can dial the state size and traverse the pareto frontier of the recall-memory tradeoff curve, recovering the full quality of attention on one end and the small state size of attention-alternatives on the other. We train language models up to 1.3b parameters and show that BASED matches the strongest sub-quadratic models (e.g. Mamba) in perplexity and outperforms them on real-world recall-intensive tasks by 6.22 accuracy points. Implementations of linear attention are often less efficient than optimized standard attention implementations. To make BASED competitive, we develop IO-aware algorithms that enable 24x higher throughput on language generation than FlashAttention-2, when generating 1024 tokens using 1.3b parameter models. Code for this work is provided at: https://github.com/HazyResearch/based.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
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?
Different settings for α_t and φ(·) recover different variants of linear attention with Hebbian rule.
“Given different settings for 𝛼 𝑡 (i.e., either is 1, learnable, channel-wise, and/or input-dependent) and also 𝜙 (·) (i.e., identity, polynomial kernels, etc.), the above recurrence recovers different variants of linear attention with Hebbian rule (Katharopoulos et al. 2020; Sun et al. 2023; Arora et al. 2024; Beck et al. 2024; Kacham et al. 2024; Peng et al. 2024).”
From Nested Learning: The Illusion of Deep Learning Architectures (2025) · cites this paper as Arora et al. 2024
Section 4.1 compares identity and other feature maps, and Appendix A.1.1 discusses polynomial feature maps and the recurrent form of linear attention. Appendix C describes input-independent and input-dependent decay, but our copy does not establish that the full set of α_t settings in the citing sentence—including learnable and channel-wise settings—recovers variants under a Hebbian-rule recurrence. Page numbers were not available in the indexed passages. (LLM, conf=0.83)
Experimental — accuracy not yet measuredThe same experimental setups from Nguyen et al. (2024) were followed, and the reported results of baselines by Arora et al. (2024) were re-used.
“We follow the same experimental setups from Nguyen et al. (2024), and re-use the reported results of baselines by Arora et al. (2024).”
From Titans: Learning to Memorize at Test Time (2025) · cites this paper as Arora et al. (2024)
The minimal-transformed version of the benchmarks from Arora et al. (2024) allows evaluation of non-instruction-tuned models.
“To evaluate in-context recall, we adopted the minimal-transformed version of the benchmarks from Arora et al. (2024) to allow evaluation of non-instruction-tuned models.”
From MesaNet: Sequence Modeling by Locally Optimal Test-Time Training (2025) · cites this paper as Arora et al. (2024)
The state in linear attention is a compressed key-value memory, and long contexts force many associations to share the same finite space, making exact retrieval difficult.
“The state is a compressed key-value memory, and long contexts force many associations to share the same finite space, making exact retrieval difficult [2, 3, 4, 5, 6, 7].”
From Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention (2026) · cites this paper as [4]
The Hebbian rule formulation is equivalent to kernel linear attentions.
“The formulation for (Hebbian Rule) is equivalent to kernel linear attentions”
From ATLAS: Learning to Optimally Memorize the Context at Test Time (2025) · cites this paper as Arora, Eyuboglu, Zhang, et al. 2024
The Preliminaries and Related Work and A.1.1 sections describe kernel linear attention and its recurrent form, but neither identifies that form as a Hebbian rule or states an equivalence. Searches for “Hebbian” and for an associative-memory equivalence found no passage addressing that connection. (LLM, conf=0.73)
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.
Cites
No references could be resolved yet.
Research works printed but not linked: 17
- Simran Arora, Sabri Eyuboglu, Aman Timalsina, Isys John- son, Michael Poli, James Zou, Atri Rudra, and Christo- pher Ré. Zoology: Measuring and improving recall in efficient language models. International Conference on Learning Representations, 2023a.
- Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bern- stein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021. · arXiv
- Laura Weidinger, John Mellor, Maribeth Rauh, Conor Grif- fin, Jonathan Uesato, Po-Sen Huang, Myra Cheng, Mia Glaese, Borja Balle, Atoosa Kasirzadeh, et al. Ethical and social risks of harm from language models. arXiv preprint arXiv:2112.04359, 2021. · arXiv
- Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Re- former: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020. · arXiv
- Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768, 2020. · arXiv
- Chen Zhu, Wei Ping, Chaowei Xiao, Mohammad Shoeybi, Tom Goldstein, Anima Anandkumar, and Bryan Catan- zaro. Long-short transformer: Efficient transformers for language and vision. Advances in neural information processing systems, 34:17723-17736, 2021.
- Silas Alberti, Niclas Dern, Laura Thesing, and Gitta Ku- tyniok. Sumformer: Universal approximation for efficient transformers. arXiv preprint arXiv:2307.02301, 2023. · arXiv
- Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Met- zler. Efficient transformers: A survey. ACM Computing Surveys, 55(6):1-28, 2022.
- Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nyströmformer: A nyström-based algorithm for approxi- mating self-attention. In Proceedings of the AAAI Confer- ence on Artificial Intelligence, volume 35, pages 14138- 14148, 2021.
- Yifan Chen, Qi Zeng, Heng Ji, and Yun Yang. Sky- former: Remodel self-attention with gaussian kernel and nystr\"om method. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, 2021b.
- Alexandre De Brebisson and Pascal Vincent. An exploration of softmax alternatives belonging to the spherical loss family. arXiv preprint arXiv:1511.05042, 2015. · arXiv
- Emmanuel Candes, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? arXiv:0912.3599, 2009. · arXiv
- Zhenhai Zhu and Rau Soricut. H-transformer-1d: Fast onedimensional hierarchical attention for sequences. n Annual Meeting of the Association for Computational Linguistics, 2021.
- Zhen Qin, Xiaodong Han, Weixuan Sun, Dongxu Li, Ling- peng Kong, Nick Barnes, and Yiran Zhong. The devil in linear transformer. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 7025-7041, Abu Dhabi, United Arab Emirates, December 2022b. Association for Computational Lin- guistics. doi: 10.18653/v1/2022.emnlp-main.473. · DOI
- Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. · arXiv
- Biao Zhang and Rico Sennrich. Root mean square layer nor- malization. Advances in Neural Information Processing Systems, 32, 2019.
- James W Cooley and John W Tukey. An algorithm for the machine calculation of complex fourier series. Mathe- matics of computation, 19(90):297-301, 1965.
Cited by
Sorted by citations
Titans: Learning to Memorize at Test Time
Behrouz, A., Zhong, P., & Mirrokni, V. (2025) · arXiv · doi:10.48550/arxiv.2501.00663 · Cited by 24 · see citing works
“…for longer sequences, various studies focused on I/O aware implementations of attention [65, 66], designing more efficient attention mechanisms by sparsifying the attention matrix [67–69, 92, 69, 93], approximating the softmax [70], or developing kernel-based (linear) attentions [8, 71, 9, 72].”
Nested Learning: The Illusion of Deep Learning Architectures
Behrouz, A., Razaviyayn, M., Zhong, P., & Mirrokni, V. (2025) · arXiv · doi:10.48550/arxiv.2512.24695 · Cited by 1 · see citing works
Mamba-3: Improved Sequence Modeling using State Space Principles
Lahoti, A., Li, K. Y., Chen, B., Wang, C., Bick, A., Kolter, J. Z., Dao, T., & Gu, A. (2026) · arXiv · doi:10.48550/arxiv.2603.15569 · Cited by 1 · see citing works
“…( 𝐷𝑁𝑅, 𝐷 → 𝑁𝑅 )( W 𝐵 , U ) C = contract ( 𝐷𝑁𝑅, 𝐷 → 𝑁𝑅 )( W 𝐶 , U ) , Intermediate output Y ′ is obtained by the residual function 𝜙 , Y ′ ← 𝜙 ( Y 𝑡 , Z ) , where 𝜙 ( Y 𝑡 , Z ) : = Y ⊙ SiLU ( Z 𝑡 ) in Finally, the layer output O ∈ R is computed via the following down projections:”
Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention
Hatamizadeh, A., Choi, Y., & Kautz, J. (2026) · arXiv
“The state is a compressed key-value memory, and long contexts force many associations to share the same finite space, making exact retrieval difficult [2, 3, 4, 5, 6, 7].”
MesaNet: Sequence Modeling by Locally Optimal Test-Time Training
von Oswald, J., Scherrer, N., Kobayashi, S., Versari, L., Yang, S., Mittal, S., Schlegel, M., Maile, K., Schimpf, Y., Sieberling, O., et al. (2025) · arXiv
“To gauge the ability to recall in-context information, we follow Arora et al. [4] and Yang et al. [111] and evaluate models on SWDE [65], SQUAD [82], FDA [3], TQA [55], NQ [58] and DROP [29].”
InfluentialATLAS: Learning to Optimally Memorize the Context at Test Time
Behrouz, A., Li, Z., Kacham, P., Daliri, M., Deng, Y., Zhong, P., Razaviyayn, M., & Mirrokni, V. (2025) · arXiv · doi:10.48550/arxiv.2505.23735
“…the success of these improved models in a diverse set of downstream benchmarks, they often struggle with long context understanding, in-context retrieval, and extrapolation to longer sequences (Arora, Eyuboglu, Zhang, et al. 2024; Table 1: A summary of the recent modern recurrent neural networks.”
Cartridges: Lightweight and general-purpose long context representations via self-study
Eyuboglu, S., Ehrlich, R., Arora, S., Guha, N., Zinsley, D., Liu, E., Tennien, W., Rudra, A., Zou, J., Mirhoseini, A., et al. (2025) · arXiv · doi:10.48550/arxiv.2506.06266
Self-citation
- Authors
- Arora, S., Eyuboglu, S., Zhang, M., Timalsina, A., Alberti, S., Zinsley, D., Zou, J., Rudra, A., & Ré, C.
- Affiliations
- Stanford University (US)
- University at Buffalo, State University of New York (US)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2024
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2402.18668
- OpenAlex
- W4401157551
- Cited by
- 5
- References
- 0
- Citations by year
- 2025: 2 · 2024: 3
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- public-domain
- creativecommons.org/publicdomain/zero/1.0/legalcode
- Locations
- arXiv (Cornell University) (submittedVersion, public-domain)
- arXiv (Cornell University) (public-domain)
- 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
- linear attention, sliding window attention, inference throughput, H3+, Mamba, RWKV, efficient language models
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