PreprintCited by 7Topic ModelingNatural Language Processing TechniquesAdvanced Neural Network Applications

Simple linear attention language models balance the recall-throughput tradeoff

Open access
Arora, Simran, Eyuboglu, Sabri, Zhang, Michael, Timalsina, Aman, Alberti, Silas, Zinsley, Dylan, Zou, James, Rudra, Atri +1 more·2024·arXiv

Abstract

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.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2402.18668

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.

A few free checks a day · papers already verified open instantly · results are public

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 measured
  • The 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

  1. 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.
  2. 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
  3. 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
  4. Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Re- former: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020. · arXiv
  5. 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
  6. 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.
  7. Silas Alberti, Niclas Dern, Laura Thesing, and Gitta Ku- tyniok. Sumformer: Universal approximation for efficient transformers. arXiv preprint arXiv:2307.02301, 2023. · arXiv
  8. Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Met- zler. Efficient transformers: A survey. ACM Computing Surveys, 55(6):1-28, 2022.
  9. 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.
  10. 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.
  11. Alexandre De Brebisson and Pascal Vincent. An exploration of softmax alternatives belonging to the spherical loss family. arXiv preprint arXiv:1511.05042, 2015. · arXiv
  12. Emmanuel Candes, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? arXiv:0912.3599, 2009. · arXiv
  13. Zhenhai Zhu and Rau Soricut. H-transformer-1d: Fast onedimensional hierarchical attention for sequences. n Annual Meeting of the Association for Computational Linguistics, 2021.
  14. 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
  15. Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. · arXiv
  16. Biao Zhang and Rico Sennrich. Root mean square layer nor- malization. Advances in Neural Information Processing Systems, 32, 2019.
  17. 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

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)
OpenAlex
W4401157551
Cited by
5
References
0
Citations by year
2025: 2 · 2024: 3
Type
posted content
Language
en
Open access
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