mlsanityData to 14 Oct 2026

Fundamental Limitations on Subquadratic Alternatives to Transformers

arXiv 2410.04271 ↗First posted 5 Oct 2024cs.LG cs.CC cs.CLcited by 9

On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language

Abstract (arXiv)

The Transformer architecture is widely deployed in many popular and impactful Large Language Models. At its core is the attention mechanism for calculating correlations between pairs of tokens. Performing an attention computation takes quadratic time in the input size, and had become the time bottleneck for transformer operations. In order to circumvent this, researchers have used a variety of approaches, including designing heuristic algorithms for performing attention computations faster, and proposing alternatives to the attention mechanism which can be computed more quickly. For instance, state space models such as Mamba were designed to replace attention with an almost linear time alternative. In this paper, we prove that any such approach cannot perform important tasks that Transformer is able to perform (assuming a popular conjecture from fine-grained complexity theory). We focus on document similarity tasks, where one is given as input many documents and would like to find a pair which is (approximately) the most similar. We prove that Transformer is able to perform this task, and we prove that this task cannot be performed in truly subquadratic time by any algorithm. Thus, any model which can be evaluated in subquadratic time - whether because of subquadratic-time heuristics for attention, faster attention replacements like Mamba, or any other reason - cannot perform this task. In other words, in order to perform tasks that (implicitly or explicitly) involve document similarity, one may as well use Transformer and cannot avoid its quadratic running time.

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 51 of its 80 references that are in the map. First posted on arXiv 5 Oct 2024.

Builds on

51 of 80 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec

Other references · 50

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2023GPT-4 Technical Reportcited by 18,396
  6. 2020End-to-End Object Detection with Transformerscited by 7,414
  7. 2020Longformer: The Long-Document Transformercited by 3,413
  8. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
  9. 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
  10. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  11. 2020Rethinking Attention with Performerscited by 1,601
  12. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
38 more
  1. 2017Spectrally-normalized margin bounds for neural networkscited by 686
  2. 2014Distributed Representations of Sentences and Documentscited by 678
  3. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  4. 2014On the Number of Linear Regions of Deep Neural Networkscited by 381
  5. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
  6. 2022Transformers Learn Shortcuts to Automatacited by 268
  7. 2020Synthesizer: Rethinking Self-Attention in Transformer Modelscited by 205
  8. 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
  9. 2022On The Computational Complexity of Self-Attentioncited by 139
  10. 2023Representational Strengths and Limitations of Transformerscited by 133
  11. 2023What Formal Languages Can Transformers Express? A Surveycited by 124
  12. 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 113
  13. 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
  14. 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 102
  15. 2023Fast Attention Requires Bounded Entriescited by 102
  16. 2022Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexitycited by 93
  17. 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
  18. 2024Transformers, parallel computation, and logarithmic depthcited by 79
  19. 2022Formal Algorithms for Transformerscited by 72
  20. 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
  21. 2015Optimal Data-Dependent Hashing for Approximate Near Neighborscited by 44
  22. 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
  23. 2024On Computational Limits of Modern Hopfield Models: A Fine-Grained Complexity Analysiscited by 41
  24. 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)cited by 40
  25. 2024Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer Modelscited by 31
  26. 2019Statistical Analysis of Nearest Neighbor Methods for Anomaly Detectioncited by 29
  27. 2018Hardness of Approximate Nearest Neighbor Searchcited by 19
  28. 2014Edit Distance Cannot Be Computed in Strongly Subquadratic Time (unless SETH is false)cited by 18
  29. 2016Optimal Hashing-based Time-Space Trade-offs for Approximate Near Neighborscited by 18
  30. 2018On The Hardness of Approximate and Exact (Bichromatic) Maximum Inner Productcited by 12
  31. 2014Popular conjectures imply strong lower bounds for dynamic problemscited by 6
  32. 2018On Closest Pair in Euclidean Metric: Monochromatic is as Hard as Bichromaticcited by 6
  33. 2020Contextual Document Similarity for Content-based Literature Recommender Systemscited by 5
  34. 2015Probabilistic Polynomials and Hamming Nearest Neighborscited by 3
  35. 2018More Consequences of Falsifying SETH and the Orthogonal Vectors Conjecturecited by 3
  36. 2021Practical Near Neighbor Search via Group Testingcited by 3
  37. 2024Finer-Grained Hardness of Kernel Density Estimationcited by 2
  38. 2017On the Fine-grained Complexity of One-Dimensional Dynamic Programmingcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 6; 2026: 2.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2022Efficient Long Sequence Modeling via State Space Augmented Transformer
  2. 2024Do Efficient Transformers Really Save Computation?
  3. 2025SCOUT: Toward Sub-Quadratic Attention via Segment Compression for Optimized Utility in Transformers
  4. 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models
  5. 2023AttMEMO : Accelerating Transformers with Memoization on Big Memory Systems
  6. 2026On Subquadratic Architectures: From Applications to Principles
  7. 2026Bridging KV-Cache Quantization and Linear Attention: From Theory to Pretrained Weight Migration
  8. 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention