Fast Attention Requires Bounded Entries
Not on the map. Why?
Abstract (arXiv)
In modern machine learning, inner product attention computation is a fundamental task for training large language models such as Transformer, GPT-1, BERT, GPT-2, GPT-3 and ChatGPT. Formally, in this problem, one is given as input three matrices Q, K, V ∈ [-B,B]n × d, and the goal is to construct the matrix Att(Q,K,V) := diag(A bf 1n)-1 A V ∈ ℝn × d, where A = exp(QK^top/d) is the `attention matrix', and exp is applied entry-wise. Straightforward methods for this problem explicitly compute the n × n attention matrix A, and hence require time Omega(n2) even when d = no(1) is small. In this paper, we investigate whether faster algorithms are possible by implicitly making use of the matrix A. We present two results, showing that there is a sharp transition at B = Theta(√log n). bullet If d = O(log n) and B = o(√log n), there is an n1+o(1) time algorithm to approximate Att(Q,K,V) up to 1/poly(n) additive error. bullet If d = O(log n) and B = Theta (√log n), assuming the Strong Exponential Time Hypothesis from fine-grained complexity theory, it is impossible to approximate Att(Q,K,V) up to 1/poly(n) additive error in truly subquadratic time n2 - Omega(1). This gives a theoretical explanation for the phenomenon observed in practice that attention computation is much more efficient when the input matrices have smaller entries.
Key facts. Cited by 102 papers in the map (data through 14 Oct 2026). Builds on 25 of its 44 references that are in the map. First posted on arXiv 26 Feb 2023.
Builds on
25 of 44 references.
References · 25
- 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
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Reformer: The Efficient Transformercited by 1,668
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2019Q8BERT: Quantized 8Bit BERTcited by 300
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 213
- 2022On The Computational Complexity of Self-Attentioncited by 139
13 more
- 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 130
- 2021Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Modelscited by 76
- 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
- 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
- 2018Hashing-Based-Estimators for Kernel Density in High Dimensionscited by 33
- 2020Kernel Density Estimation through Density Constrained Near Neighbor Searchcited by 29
- 2020Algorithms and Hardness for Linear Algebra on Geometric Graphscited by 22
- 2018Hardness of Approximate Nearest Neighbor Searchcited by 19
- 2022Optimal-Degree Polynomial Approximations for Exponentials and Gaussian Kernel Density Estimationcited by 19
- 2017On the Fine-Grained Complexity of Empirical Risk Minimization: Kernel Methods and Neural Networkscited by 16
- 2018On Closest Pair in Euclidean Metric: Monochromatic is as Hard as Bichromaticcited by 6
- 2018Multi-Resolution Hashing for Fast Pairwise Summationscited by 2
- 2020Metric Transforms and Low Rank Matrices via Representation Theory of the Real Hyperrectanglecited by 1
Built on by
Citing papers per year: 2023: 38; 2024: 29; 2025: 25; 2026: 10.
102 papers.
Sort:
By area:
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 252
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
- 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 111
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2025On the Emergence of Position Bias in Transformerscited by 59
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2024On the Role of Attention Masks and LayerNorm in Transformerscited by 48
- 2023An Over-parameterized Exponential Regressioncited by 45
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
38 more
- 2024Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Modelscited by 38
- 2024Outlier-Efficient Hopfield Layers for Large Transformer-Based Modelscited by 38
- 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimensioncited by 37
- 2023PolySketchFormer: Fast Transformers via Sketching Polynomial Kernelscited by 36
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
- 2024Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer Modelscited by 31
- 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understandingcited by 30
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Timecited by 30
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 30
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2023How to Protect Copyright Data in Optimization of Large Language Models?cited by 26
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2023Differentially Private Attention Computationcited by 25
- 2023GradientCoin: A Peer-to-Peer Decentralized Large Language Modelscited by 23
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
- 2024SubGen: Token Generation in Sublinear Time and Memorycited by 21
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexitycited by 21
- 2023Solving Attention Kernel Regression Problem via Pre-conditionercited by 20
- 2024Do Efficient Transformers Really Save Computation?cited by 20
- 2024A Tighter Complexity Analysis of SparseGPTcited by 19
- 2024Looped ReLU MLPs May Be All You Need as Practical Programmable Computerscited by 19
- 2024HSR-Enhanced Sparse Attention Accelerationcited by 19
- 2023Beyond Classical Attention: Quantum Attention for Scalable Computationcited by 18
- 2025Your Vision-Language Model Can't Even Count to 20: Exposing the Failures of VLMs in Compositional Countingcited by 18
- 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
- 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
- 2024Provable Differentially Private Computation of the Cross-Attention Mechanismcited by 14
- 2024RoPE Attention Can Be Trained in Almost Linear Timecited by 13
- 2023A Unified Scheme of ResNet and Softmaxcited by 12
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 12
- 2023Efficient SGD Neural Network Training via Sublinear Activated Neuron Identificationcited by 11
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2025On Computational Limits of FlowAR Models: Expressivity and Efficiencycited by 10
- 2023Federated Empirical Risk Minimization via Second-Order Methodcited by 9
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regressioncited by 9
- 2024Fundamental Limitations on Subquadratic Alternatives to Transformerscited by 9
50 most cited of 102 All 102 (JSON)
- 2026Efficiently Approximating Attention Is Hard29 Sep 2026
- 2026Beyond Sparse Weights: When Is Attention Compressible?21 Aug 2026
- 2026The risk of KV cache compression1 Jul 2026
- 2026Approaching I/O-optimality for Approximate Attention22 May 2026
- 2026Nearly Optimal Attention Coresets7 May 2026
- 2026Tracking High-order Evolutions via Cascading Low-rank Fitting13 Apr 2026
- 2026On the Computational Hardness of Transformers11 Mar 2026
- 2026WildCat: Near-Linear Attention in Theory and Practice10 Feb 2026
- 2026Every Bit Counts: A Theoretical Study of Precision-Expressivity Tradeoffs in Quantized Transformers2 Feb 2026
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025Unifying Learning Dynamics and Generalization in Transformers Scaling Law26 Dec 2025
- 2025Block Sparse Flash Attention7 Dec 2025
38 more
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspective7 Oct 2025
- 2025Your Vision-Language Model Can't Even Count to 20: Exposing the Failures of VLMs in Compositional Counting6 Oct 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Even Faster Kernel Matrix Linear Algebra via Density Estimation2 Oct 2025
- 2025Fast attention mechanisms: a tale of parallelism10 Sep 2025
- 2025Too Easily Fooled? Prompt Injection Breaks LLMs on Frustratingly Simple Multiple-Choice Questions16 Aug 2025
- 2025Towards High-Order Mean Flow Generative Models: Feasibility, Expressivity, and Provably Efficient Criteria9 Aug 2025
- 2025Improved Algorithms for Kernel Matrix-Vector Multiplication Under Sparsity Assumptions31 Jul 2025
- 2025Two Heads Are Better than One: Simulating Large Transformers with Small Ones13 Jun 2025
- 2025Minimalist Softmax Attention Provably Learns Constrained Boolean Functions26 May 2025
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapse22 May 2025
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperature20 May 2025
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transform17 May 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decoding14 Mar 2025
- 2025Attention Condensation via Sparsity Induced Regularized Training3 Mar 2025
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approaches3 Mar 2025
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?24 Feb 2025
- 2025On Computational Limits of FlowAR Models: Expressivity and Efficiency23 Feb 2025
- 2025Compression Barriers for Autoregressive Transformers21 Feb 2025
- 2025Low-Rank Thinning17 Feb 2025
- 2025On the Emergence of Position Bias in Transformers4 Feb 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2024RoPE Attention Can Be Trained in Almost Linear Time23 Dec 2024
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexity9 Dec 2024
- 2024Modern Hopfield Networks Require Chain-of-Thought to Solve mathsfNC1-Hard Problems7 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2024kNN Attention Demystified: A Theoretical Exploration for Scalable Transformers6 Nov 2024
- 2024MagicPIG: LSH Sampling for Efficient LLM Generation21 Oct 2024
- 2024Part-Whole Relational Fusion Towards Multi-Modal Scene Understanding19 Oct 2024
- 2024Advancing the Understanding of Fixed Point Iterations in Deep Neural Networks: A Detailed Analytical Study15 Oct 2024
- 2024HSR-Enhanced Sparse Attention Acceleration14 Oct 2024
- 2024Looped ReLU MLPs May Be All You Need as Practical Programmable Computers12 Oct 2024
- 2024LevAttention: Time, Space, and Streaming Efficient Algorithm for Heavy Attentions7 Oct 2024
- 2024Fundamental Limitations on Subquadratic Alternatives to Transformers5 Oct 2024
- 2024Differentially Private Kernel Density Estimation3 Sep 2024
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Time23 Aug 2024
- 2024A Tighter Complexity Analysis of SparseGPT22 Aug 2024
50 newest of 102 All 102 (JSON)
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
- 2024SubGen: Token Generation in Sublinear Time and Memorycited by 21
- 2025Compression Barriers for Autoregressive Transformerscited by 5
- 2026The risk of KV cache compressioncited by 4
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decodingcited by 2
- 2026Beyond Sparse Weights: When Is Attention Compressible?cited by 0
- 2026Beyond Sparse Weights: When Is Attention Compressible?21 Aug 2026
- 2026The risk of KV cache compression1 Jul 2026
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decoding14 Mar 2025
- 2025Compression Barriers for Autoregressive Transformers21 Feb 2025
- 2024SubGen: Token Generation in Sublinear Time and Memory8 Feb 2024
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun 2023
- 2024Provable Differentially Private Computation of the Cross-Attention Mechanismcited by 14
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2025Towards High-Order Mean Flow Generative Models: Feasibility, Expressivity, and Provably Efficient Criteriacited by 5
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2026Tracking High-order Evolutions via Cascading Low-rank Fittingcited by 0
- 2026Tracking High-order Evolutions via Cascading Low-rank Fitting13 Apr 2026
- 2025Towards High-Order Mean Flow Generative Models: Feasibility, Expressivity, and Provably Efficient Criteria9 Aug 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2024Provable Differentially Private Computation of the Cross-Attention Mechanism20 Jul 2024
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 252
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
- 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 111
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2025On the Emergence of Position Bias in Transformerscited by 59
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2024On the Role of Attention Masks and LayerNorm in Transformerscited by 48
- 2023An Over-parameterized Exponential Regressioncited by 45
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2024Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Modelscited by 38
12 most cited of 87 All 87 (JSON)
- 2026Efficiently Approximating Attention Is Hard29 Sep 2026
- 2026Approaching I/O-optimality for Approximate Attention22 May 2026
- 2026Nearly Optimal Attention Coresets7 May 2026
- 2026On the Computational Hardness of Transformers11 Mar 2026
- 2026WildCat: Near-Linear Attention in Theory and Practice10 Feb 2026
- 2026Every Bit Counts: A Theoretical Study of Precision-Expressivity Tradeoffs in Quantized Transformers2 Feb 2026
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025Unifying Learning Dynamics and Generalization in Transformers Scaling Law26 Dec 2025
- 2025Block Sparse Flash Attention7 Dec 2025
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspective7 Oct 2025
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Even Faster Kernel Matrix Linear Algebra via Density Estimation2 Oct 2025
12 newest of 87 All 87 (JSON)