Fundamental Limitations on Subquadratic Alternatives to Transformers
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
Other references · 50
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2023GPT-4 Technical Reportcited by 18,396
- 2020End-to-End Object Detection with Transformerscited by 7,414
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Rethinking Attention with Performerscited by 1,601
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
38 more
- 2017Spectrally-normalized margin bounds for neural networkscited by 686
- 2014Distributed Representations of Sentences and Documentscited by 678
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
- 2014On the Number of Linear Regions of Deep Neural Networkscited by 381
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2020Synthesizer: Rethinking Self-Attention in Transformer Modelscited by 205
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
- 2022On The Computational Complexity of Self-Attentioncited by 139
- 2023Representational Strengths and Limitations of Transformerscited by 133
- 2023What Formal Languages Can Transformers Express? A Surveycited by 124
- 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 113
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 102
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2022Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexitycited by 93
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2024Transformers, parallel computation, and logarithmic depthcited by 79
- 2022Formal Algorithms for Transformerscited by 72
- 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
- 2015Optimal Data-Dependent Hashing for Approximate Near Neighborscited by 44
- 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
- 2024On Computational Limits of Modern Hopfield Models: A Fine-Grained Complexity Analysiscited by 41
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)cited by 40
- 2024Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer Modelscited by 31
- 2019Statistical Analysis of Nearest Neighbor Methods for Anomaly Detectioncited by 29
- 2018Hardness of Approximate Nearest Neighbor Searchcited by 19
- 2014Edit Distance Cannot Be Computed in Strongly Subquadratic Time (unless SETH is false)cited by 18
- 2016Optimal Hashing-based Time-Space Trade-offs for Approximate Near Neighborscited by 18
- 2018On The Hardness of Approximate and Exact (Bichromatic) Maximum Inner Productcited by 12
- 2014Popular conjectures imply strong lower bounds for dynamic problemscited by 6
- 2018On Closest Pair in Euclidean Metric: Monochromatic is as Hard as Bichromaticcited by 6
- 2020Contextual Document Similarity for Content-based Literature Recommender Systemscited by 5
- 2015Probabilistic Polynomials and Hamming Nearest Neighborscited by 3
- 2018More Consequences of Falsifying SETH and the Orthogonal Vectors Conjecturecited by 3
- 2021Practical Near Neighbor Search via Group Testingcited by 3
- 2024Finer-Grained Hardness of Kernel Density Estimationcited by 2
- 2017On the Fine-grained Complexity of One-Dimensional Dynamic Programmingcited by 1
Built on by
Citing papers per year: 2024: 1; 2025: 6; 2026: 2.
9 papers.
- 2024KV Shifting Attention Enhances Language Modelingcited by 8
- 2025Compression Barriers for Autoregressive Transformerscited by 5
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperaturecited by 5
- 2025The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architecturescited by 4
- 2025Fast attention mechanisms: a tale of parallelismcited by 3
- 2025Two Heads Are Better than One: Simulating Large Transformers with Small Onescited by 2
- 2025Block Sparse Flash Attentioncited by 2
- 2026On the Computational Hardness of Transformerscited by 0
- 2026Three Tokens Force Exponential Feature Rank in Nonnegative Kernel Attentioncited by 0
- 2026Three Tokens Force Exponential Feature Rank in Nonnegative Kernel Attention11 Aug 2026
- 2026On the Computational Hardness of Transformers11 Mar 2026
- 2025Block Sparse Flash Attention7 Dec 2025
- 2025The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures6 Oct 2025
- 2025Fast attention mechanisms: a tale of parallelism10 Sep 2025
- 2025Two Heads Are Better than One: Simulating Large Transformers with Small Ones13 Jun 2025
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperature20 May 2025
- 2025Compression Barriers for Autoregressive Transformers21 Feb 2025
- 2024KV Shifting Attention Enhances Language Modeling29 Nov 2024
Similar, not cited
Close in wording, no citation either way
- 2022Efficient Long Sequence Modeling via State Space Augmented Transformer
- 2024Do Efficient Transformers Really Save Computation?
- 2025SCOUT: Toward Sub-Quadratic Attention via Segment Compression for Optimized Utility in Transformers
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models
- 2023AttMEMO : Accelerating Transformers with Memoization on Big Memory Systems
- 2026On Subquadratic Architectures: From Applications to Principles
- 2026Bridging KV-Cache Quantization and Linear Attention: From Theory to Pretrained Weight Migration
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention