On The Computational Complexity of Self-Attention
Not on the map. Why?
Abstract (arXiv)
Transformer architectures have led to remarkable progress in many state-of-art applications. However, despite their successes, modern transformers rely on the self-attention mechanism, whose time- and space-complexity is quadratic in the length of the input. Several approaches have been proposed to speed up self-attention mechanisms to achieve sub-quadratic running time; however, the large majority of these works are not accompanied by rigorous error guarantees. In this work, we establish lower bounds on the computational complexity of self-attention in a number of scenarios. We prove that the time complexity of self-attention is necessarily quadratic in the input length, unless the Strong Exponential Time Hypothesis (SETH) is false. This argument holds even if the attention computation is performed only approximately, and for a variety of attention mechanisms. As a complement to our lower bounds, we show that it is indeed possible to approximate dot-product self-attention using finite Taylor series in linear-time, at the cost of having an exponential dependence on the polynomial order.
Key facts. Cited by 137 papers in the map (data through 7 Oct 2026). Builds on 33 of its 48 references that are in the map. First posted on arXiv 11 Sep 2022.
Builds on
33 of 48 references.
References · 33
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,337
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
21 more
- 2020Rethinking Attention with Performerscited by 1,584
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2021Transformers in Vision: A Surveycited by 1,009
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2021Random Feature Attentioncited by 350
- 2020The Lipschitz Constant of Self-Attentioncited by 171
- 2021SOFT: Softmax-free Transformer with Linear Complexitycited by 128
- 2021Skyformer: Remodel Self-Attention with Gaussian Kernel and Nystr"om Methodcited by 61
- 2021Leveraging redundancy in attention with Reuse Transformerscited by 33
- 2018Hardness of Approximate Nearest Neighbor Searchcited by 19
- 2014Edit Distance Cannot Be Computed in Strongly Subquadratic Time (unless SETH is false)cited by 18
- 2020Sub-Linear Memory: How to Make Performers SLiMcited by 18
- 2017On the Fine-Grained Complexity of Empirical Risk Minimization: Kernel Methods and Neural Networkscited by 16
- 2014Why walking the dog takes time: Frechet distance has no strongly subquadratic algorithms unless SETH failscited by 6
- 2015Quadratic Conditional Lower Bounds for String Problems and Dynamic Time Warpingcited by 6
- 2015If the Current Clique Algorithms are Optimal, so is Valiant's Parsercited by 4
- 2021Fine-Grained Complexity Theory: Conditional Lower Bounds for Computational Geometrycited by 3
- 2021Translating Hausdorff is Hard: Fine-Grained Lower Bounds for Hausdorff Distance Under Translationcited by 1
Built on by
Citing papers per year: 2022: 2; 2023: 13; 2024: 49; 2025: 42; 2026: 31.
137 papers.
Sort:
By area:
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 207
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 119
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
- 2024ThunderKittens: Simple, Fast, and Adorable AI Kernelscited by 34
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
- 2025PolaFormer: Polarity-aware Linear Attention for Vision Transformerscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 29
- 2024A Canonicalization Perspective on Invariant and Equivariant Learningcited by 25
- 2024LoLCATs: On Low-Rank Linearizing of Large Language Modelscited by 25
38 more
- 2024MVGamba: Unify 3D Content Generation as State Space Sequence Modelingcited by 23
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
- 2024Do Efficient Transformers Really Save Computation?cited by 20
- 2024SpeechPrune: Context-aware Token Pruning for Speech Information Retrievalcited by 20
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMscited by 18
- 2023Recurrent Action Transformer with Memorycited by 17
- 2024Nonparametric Modern Hopfield Modelscited by 16
- 2024TrafficGPT: Breaking the Token Barrier for Efficient Long Traffic Analysis and Generationcited by 15
- 2024MLPerf Power: Benchmarking the Energy Efficiency of Machine Learning Systems from Microwatts to Megawatts for Sustainable AIcited by 15
- 2024DyGMamba: Efficiently Modeling Long-Term Temporal Dependency on Continuous-Time Dynamic Graphs with State Space Modelscited by 14
- 2024Accelerating Retrieval-Augmented Generationcited by 14
- 2025CacheClip: Accelerating RAG with Effective KV Cache Reusecited by 14
- 2025TrimTokenator-LC: Towards Adaptive Visual Token Pruning for Large Multimodal Models with Long Contextscited by 14
- 2024Exploring the Synergies of Hybrid CNNs and ViTs Architectures for Computer Vision: A surveycited by 13
- 2024Tree Attention: Topology-aware Decoding for Long-Context Attention on GPU clusterscited by 13
- 2025The Token Tax: Systematic Bias in Multilingual Tokenizationcited by 13
- 2024MamMIL: Multiple Instance Learning for Whole Slide Images with State Space Modelscited by 12
- 2023Transformers in Reinforcement Learning: A Surveycited by 11
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2024Pretraining Decision Transformers with Reward Prediction for In-Context Multi-task Structured Bandit Learningcited by 10
- 2024Snakes and Ladders: Two Steps Up for VideoMambacited by 10
- 2024SIGMA: Selective Gated Mamba for Sequential Recommendationcited by 10
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Evictioncited by 10
- 2024Fundamental Limitations on Subquadratic Alternatives to Transformerscited by 9
- 2025Hadamard product in deep learning: Introduction, Advances and Challengescited by 9
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transformcited by 9
- 2025TrimTokenator: Towards Adaptive Visual Token Pruning for Large Multimodal Modelscited by 9
- 2024EchoMamba4Rec: Harmonizing Bidirectional State Space Models with Spectral Filtering for Advanced Sequential Recommendationcited by 7
- 2024Discrete Diffusion Language Model for Efficient Text Summarizationcited by 7
- 2024MambaRecon: MRI Reconstruction with Structured State Space Modelscited by 7
- 2024Chimera: A Lossless Decoding Method for Accelerating Large Language Models Inference by Fusing all Tokenscited by 6
- 2024TaylorShift: Shifting the Complexity of Self-Attention from Squared to Linear (and Back) using Taylor-Softmaxcited by 6
- 2024KuaiFormer: Transformer-Based Retrieval at Kuaishoucited by 6
- 2025DeepSeek-Inspired Exploration of RL-based LLMs and Synergy with Wireless Networks: A Surveycited by 6
- 2025Scaling Self-Supervised and Cross-Modal Pretraining for Volumetric CT Transformerscited by 6
- 2025Everything is Context: Agentic File System Abstraction for Context Engineeringcited by 6
- 2026WildCat: Near-Linear Attention in Theory and Practicecited by 6
- 2022MiniALBERT: Model Distillation via Parameter-Efficient Recursive Transformerscited by 5
50 most cited of 137 All 137 (JSON)
- 2026Efficiently Approximating Attention Is Hard29 Sep 2026
- 2026TopoCompress: Long Context Compression via Graph-Wired Semantic Trajectories31 Aug 2026
- 2026DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection23 Aug 2026
- 2026Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMs7 Jul 2026
- 2026One Layer's Trash is Another Layer's Treasure: Adaptive Layer-wise Visual Token Selection in LVLMs12 Jun 2026
- 2026GLACIER: A Multimodal Student-Teacher Foundation Model for Molecular Property Prediction9 Jun 2026
- 2026Large Models for Battery Prognostics and Health Management: A Review and Future Roadmap27 May 2026
- 2026Enhancing Visual Token Representations for Video Large Language Models via Training-Free Spatial-Temporal Pooling and Gridding21 May 2026
- 2026Training-Inference Consistent Segmented Execution for Long-Context LLMs12 May 2026
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction10 May 2026
- 2026FinMoji: A Framework for Emoji-driven Sentiment Analysis in Financial Social Media10 May 2026
- 2026LaplacianFormer:Rethinking Linear Attention with Laplacian Kernel22 Apr 2026
38 more
- 2026SPaRSe-TIME: Saliency-Projected Low-Rank Temporal Modeling for Efficient and Interpretable Time Series Prediction19 Apr 2026
- 2026Empirical Evaluation of PDF Parsing and Chunking for Financial Question Answering with RAG13 Apr 2026
- 2026Diagonal-Tiled Mixed-Precision Attention for Efficient Low-Bit MXFP Inference5 Apr 2026
- 2026Deep Generative Transformers for Probabilistic Time Series and Spatiotemporal Forecasting12 Mar 2026
- 2026On the Computational Hardness of Transformers11 Mar 2026
- 2026Permutation-Equivariant 2D State Space Models: Theory and Canonical Architecture for Multivariate Time Series7 Mar 2026
- 2026Benchmarking Compact VLMs for Clip-Level Surveillance Anomaly Detection Under Weak Supervision3 Mar 2026
- 2026MaBERT:A Padding Safe Interleaved Transformer Mamba Hybrid Encoder for Efficient Extended Context Masked Language Modeling3 Mar 2026
- 2026KVSlimmer: Theoretical Insights and Practical Optimizations for Asymmetric KV Merging1 Mar 2026
- 2026Token-UNet: A New Case for Transformers Integration in Efficient and Interpretable 3D UNets for Brain Imaging Segmentation23 Feb 2026
- 2026Effect of Patch Size on Fine-Tuning Vision Transformers in Two-Dimensional and Three-Dimensional Medical Image Classification20 Feb 2026
- 2026Reinforced Fast Weights with Next-Sequence Prediction18 Feb 2026
- 2026WildCat: Near-Linear Attention in Theory and Practice10 Feb 2026
- 2026XtraLight-MedMamba for Classification of Neoplastic Tubular Adenomas4 Feb 2026
- 2026Every Bit Counts: A Theoretical Study of Precision-Expressivity Tradeoffs in Quantized Transformers2 Feb 2026
- 2026Understanding vision transformer robustness through the lens of out-of-distribution detection1 Feb 2026
- 2026StepShield: When, Not Whether to Intervene on Rogue Agents29 Jan 2026
- 2026Barriers to Discrete Reasoning with Transformers: A Survey Across Depth, Exactness, and Bandwidth19 Jan 2026
- 2026MHA2MLA-VLM: Enabling DeepSeek's Economical Multi-Head Latent Attention across Vision-Language Models16 Jan 2026
- 2025Deep learning for pedestrians: backpropagation in Transformers29 Dec 2025
- 2025TrimTokenator-LC: Towards Adaptive Visual Token Pruning for Large Multimodal Models with Long Contexts28 Dec 2025
- 2025SSCATeR: Sparse Scatter-Based Convolution Algorithm with Temporal Data Recycling for Real-Time 3D Object Detection in LiDAR Point Clouds9 Dec 2025
- 2025Everything is Context: Agentic File System Abstraction for Context Engineering5 Dec 2025
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMs3 Dec 2025
- 2025CAMformer: Associative Memory is All You Need24 Nov 2025
- 2025Scaling Self-Supervised and Cross-Modal Pretraining for Volumetric CT Transformers21 Nov 2025
- 2025Small Language Models for Phishing Website Detection: Cost, Performance, and Privacy Trade-Offs19 Nov 2025
- 2025Predicting Task Performance with Context-aware Scaling Laws16 Oct 2025
- 2025Schema for In-Context Learning14 Oct 2025
- 2025PISA: A Pragmatic Psych-Inspired Unified Memory System for Enhanced AI Agency12 Oct 2025
- 2025CacheClip: Accelerating RAG with Effective KV Cache Reuse11 Oct 2025
- 2025Untangling Component Imbalance in Hybrid Linear Attention Conversion Methods7 Oct 2025
- 2025Elucidating the Design Space of FP4 training22 Sep 2025
- 2025AQUA: Attention via QUery mAgnitudes for Memory and Compute Efficient Inference in LLMs14 Sep 2025
- 2025Adaptive Token Merging for Efficient Transformer Semantic Communication at the Edge12 Sep 2025
- 2025Adaptive Pareto-Optimal Token Merging for Edge Transformer Models in Semantic Communication11 Sep 2025
- 2025Fast attention mechanisms: a tale of parallelism10 Sep 2025
- 2025The Token Tax: Systematic Bias in Multilingual Tokenization5 Sep 2025
50 newest of 137 All 137 (JSON)
- 2024MamMIL: Multiple Instance Learning for Whole Slide Images with State Space Modelscited by 12
- 2024Snakes and Ladders: Two Steps Up for VideoMambacited by 10
- 2024SIGMA: Selective Gated Mamba for Sequential Recommendationcited by 10
- 2024Fundamental Limitations on Subquadratic Alternatives to Transformerscited by 9
- 2024EchoMamba4Rec: Harmonizing Bidirectional State Space Models with Spectral Filtering for Advanced Sequential Recommendationcited by 7
- 2024MambaRecon: MRI Reconstruction with Structured State Space Modelscited by 7
- 2025MambaGlue: Fast and Robust Local Feature Matching With Mambacited by 5
- 2024DeMansia: Mamba Never Forgets Any Tokenscited by 0
- 2024SambaMixer: State of Health Prediction of Li-ion Batteries using Mamba State Space Modelscited by 0
- 2026XtraLight-MedMamba for Classification of Neoplastic Tubular Adenomascited by 0
- 2026MaBERT:A Padding Safe Interleaved Transformer Mamba Hybrid Encoder for Efficient Extended Context Masked Language Modelingcited by 0
- 2026MaBERT:A Padding Safe Interleaved Transformer Mamba Hybrid Encoder for Efficient Extended Context Masked Language Modeling3 Mar 2026
- 2026XtraLight-MedMamba for Classification of Neoplastic Tubular Adenomas4 Feb 2026
- 2025MambaGlue: Fast and Robust Local Feature Matching With Mamba1 Feb 2025
- 2024SambaMixer: State of Health Prediction of Li-ion Batteries using Mamba State Space Models31 Oct 2024
- 2024Fundamental Limitations on Subquadratic Alternatives to Transformers5 Oct 2024
- 2024MambaRecon: MRI Reconstruction with Structured State Space Models19 Sep 2024
- 2024SIGMA: Selective Gated Mamba for Sequential Recommendation21 Aug 2024
- 2024DeMansia: Mamba Never Forgets Any Tokens4 Aug 2024
- 2024Snakes and Ladders: Two Steps Up for VideoMamba27 Jun 2024
- 2024EchoMamba4Rec: Harmonizing Bidirectional State Space Models with Spectral Filtering for Advanced Sequential Recommendation4 Jun 2024
- 2024MamMIL: Multiple Instance Learning for Whole Slide Images with State Space Models8 Mar 2024
- 2024SpeechPrune: Context-aware Token Pruning for Speech Information Retrievalcited by 20
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMscited by 18
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Evictioncited by 10
- 2024Chimera: A Lossless Decoding Method for Accelerating Large Language Models Inference by Fusing all Tokenscited by 6
- 2025Compression Barriers for Autoregressive Transformerscited by 5
- 2025Adaptive Token Merging for Efficient Transformer Semantic Communication at the Edgecited by 5
- 2025Adaptive Pareto-Optimal Token Merging for Edge Transformer Models in Semantic Communicationcited by 2
- 2026TopoCompress: Long Context Compression via Graph-Wired Semantic Trajectoriescited by 1
- 2025AQUA: Attention via QUery mAgnitudes for Memory and Compute Efficient Inference in LLMscited by 0
- 2026TopoCompress: Long Context Compression via Graph-Wired Semantic Trajectories31 Aug 2026
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction10 May 2026
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMs3 Dec 2025
- 2025AQUA: Attention via QUery mAgnitudes for Memory and Compute Efficient Inference in LLMs14 Sep 2025
- 2025Adaptive Token Merging for Efficient Transformer Semantic Communication at the Edge12 Sep 2025
- 2025Adaptive Pareto-Optimal Token Merging for Edge Transformer Models in Semantic Communication11 Sep 2025
- 2025Compression Barriers for Autoregressive Transformers21 Feb 2025
- 2024SpeechPrune: Context-aware Token Pruning for Speech Information Retrieval16 Dec 2024
- 2024Chimera: A Lossless Decoding Method for Accelerating Large Language Models Inference by Fusing all Tokens24 Feb 2024
- 2025TrimTokenator-LC: Towards Adaptive Visual Token Pruning for Large Multimodal Models with Long Contextscited by 14
- 2025TrimTokenator: Towards Adaptive Visual Token Pruning for Large Multimodal Modelscited by 9
- 2026One Layer's Trash is Another Layer's Treasure: Adaptive Layer-wise Visual Token Selection in LVLMscited by 1
- 2026MHA2MLA-VLM: Enabling DeepSeek's Economical Multi-Head Latent Attention across Vision-Language Modelscited by 0
- 2026Effect of Patch Size on Fine-Tuning Vision Transformers in Two-Dimensional and Three-Dimensional Medical Image Classificationcited by 0
- 2026Enhancing Visual Token Representations for Video Large Language Models via Training-Free Spatial-Temporal Pooling and Griddingcited by 0
- 2026One Layer's Trash is Another Layer's Treasure: Adaptive Layer-wise Visual Token Selection in LVLMs12 Jun 2026
- 2026Enhancing Visual Token Representations for Video Large Language Models via Training-Free Spatial-Temporal Pooling and Gridding21 May 2026
- 2026Effect of Patch Size on Fine-Tuning Vision Transformers in Two-Dimensional and Three-Dimensional Medical Image Classification20 Feb 2026
- 2026MHA2MLA-VLM: Enabling DeepSeek's Economical Multi-Head Latent Attention across Vision-Language Models16 Jan 2026
- 2025TrimTokenator-LC: Towards Adaptive Visual Token Pruning for Large Multimodal Models with Long Contexts28 Dec 2025
- 2025TrimTokenator: Towards Adaptive Visual Token Pruning for Large Multimodal Models30 Aug 2025
- 2024MVGamba: Unify 3D Content Generation as State Space Sequence Modelingcited by 23
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2024Discrete Diffusion Language Model for Efficient Text Summarizationcited by 7
- 2024Faster Image2Video Generation: A Closer Look at CLIP Image Embedding's Impact on Spatio-Temporal Cross-Attentionscited by 4
- 2025WaveStitch: Flexible and Fast Conditional Time Series Generation with Diffusion Modelscited by 4
- 2025WaveStitch: Flexible and Fast Conditional Time Series Generation with Diffusion Models8 Mar 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2024Faster Image2Video Generation: A Closer Look at CLIP Image Embedding's Impact on Spatio-Temporal Cross-Attentions27 Jul 2024
- 2024Discrete Diffusion Language Model for Efficient Text Summarization25 Jun 2024
- 2024MVGamba: Unify 3D Content Generation as State Space Sequence Modeling10 Jun 2024
- 2025Schema for In-Context Learningcited by 4
- 2025Schema for In-Context Learning14 Oct 2025
- 2026StepShield: When, Not Whether to Intervene on Rogue Agents29 Jan 2026
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 207
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 119
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
- 2024ThunderKittens: Simple, Fast, and Adorable AI Kernelscited by 34
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
- 2025PolaFormer: Polarity-aware Linear Attention for Vision Transformerscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 29
- 2024A Canonicalization Perspective on Invariant and Equivariant Learningcited by 25
- 2024LoLCATs: On Low-Rank Linearizing of Large Language Modelscited by 25
12 most cited of 97 All 97 (JSON)
- 2026Efficiently Approximating Attention Is Hard29 Sep 2026
- 2026DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection23 Aug 2026
- 2026Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMs7 Jul 2026
- 2026GLACIER: A Multimodal Student-Teacher Foundation Model for Molecular Property Prediction9 Jun 2026
- 2026Large Models for Battery Prognostics and Health Management: A Review and Future Roadmap27 May 2026
- 2026Training-Inference Consistent Segmented Execution for Long-Context LLMs12 May 2026
- 2026FinMoji: A Framework for Emoji-driven Sentiment Analysis in Financial Social Media10 May 2026
- 2026LaplacianFormer:Rethinking Linear Attention with Laplacian Kernel22 Apr 2026
- 2026SPaRSe-TIME: Saliency-Projected Low-Rank Temporal Modeling for Efficient and Interpretable Time Series Prediction19 Apr 2026
- 2026Diagonal-Tiled Mixed-Precision Attention for Efficient Low-Bit MXFP Inference5 Apr 2026
- 2026Deep Generative Transformers for Probabilistic Time Series and Spatiotemporal Forecasting12 Mar 2026
- 2026On the Computational Hardness of Transformers11 Mar 2026
12 newest of 97 All 97 (JSON)