Training Tensor Attention Efficiently: From Cubic to Almost Linear Time
Not on the map. Why?
Abstract (arXiv)
Tensor Attention, a multi-view attention that is able to capture high-order correlations among multiple modalities, can overcome the representational limitations of classical matrix attention. However, the O(n3) time complexity of tensor attention poses a significant obstacle to its utilization in transformers, where n is the input sequence length. In this work, we prove that the backward gradient of tensor attention training can be computed in almost linear time n1+o(1), the same complexity as its forward computation under the bounded entries assumption. We provide a closed-form solution for the gradient and propose a fast computation method utilizing polynomial approximation methods and tensor algebraic techniques. Furthermore, we prove the necessity and tightness of our assumption through hardness analysis, showing that slightly weakening it renders the gradient problem unsolvable in truly subcubic time. Our theoretical results establish the feasibility of efficient higher-order transformer training and may facilitate practical applications of tensor attention architectures.
Key facts. Cited by 29 papers in the map (data through 7 Oct 2026). Builds on 60 of its 99 references that are in the map. First posted on arXiv 26 May 2024.
Builds on
60 of 99 references.
References · 60
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2023Visual Instruction Tuningcited by 7,792
- 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,069
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Improved Baselines with Visual Instruction Tuningcited by 4,362
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,337
- 2022BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generationcited by 4,310
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023Qwen Technical Reportcited by 3,273
- 2023MiniGPT-4: Enhancing Vision-Language Understanding with Advanced Large Language Modelscited by 2,689
38 more
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023Qwen-VL: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyondcited by 2,179
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2020Rethinking Attention with Performerscited by 1,584
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2023A Survey on Evaluation of Large Language Modelscited by 1,227
- 2023LLaMA-Adapter: Efficient Fine-tuning of Language Models with Zero-init Attentioncited by 776
- 2023Large Language Modelscited by 774
- 2023LLaMA-Adapter V2: Parameter-Efficient Visual Instruction Modelcited by 602
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
- 2019CamemBERT: a Tasty French Language Modelcited by 368
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
- 2024Massive Activations in Large Language Modelscited by 277
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 243
- 2024MM1: Methods, Analysis & Insights from Multimodal LLM Pre-trainingcited by 230
- 2023Large Language Models in Finance: A Surveycited by 223
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
- 2024Monitoring AI-Modified Content at Scale: A Case Study on the Impact of ChatGPT on AI Conference Peer Reviewscited by 160
- 2022On The Computational Complexity of Self-Attentioncited by 137
- 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 133
- 2023Representational Strengths and Limitations of Transformerscited by 132
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 119
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 97
- 2017Recovery Guarantees for One-hidden-layer Neural Networkscited by 94
- 2019A Tensorized Transformer for Language Modelingcited by 85
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
- 2023A Short Survey of Viewing Large Language Models in Legal Aspectcited by 51
- 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
- 2017Tensor Robust Principal Component Analysis: Exact Recovery of Corrupted Low-Rank Tensors via Convex Optimizationcited by 35
- 2022Linear Complexity Randomized Self-attention Mechanismcited by 31
50 most cited of 60 All 60 (JSON)
Built on by
Citing papers per year: 2024: 16; 2025: 13.
29 papers.
Sort:
By area:
- 2024Why Larger Language Models Do In-context Learning Differently?cited by 44
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)cited by 39
- 2024Do Large Language Models Have Compositional Ability? An Investigation into Limitations and Scalabilitycited by 39
- 2024Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer Modelscited by 31
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descentcited by 21
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexitycited by 21
- 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
- 2025Your Vision-Language Model Can't Even Count to 20: Exposing the Failures of VLMs in Compositional Countingcited by 17
17 more
- 2024Provable Differentially Private Computation of the Cross-Attention Mechanismcited by 14
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2024Towards Infinite-Long Prefix in Transformercited by 10
- 2025On Computational Limits of FlowAR Models: Expressivity and Efficiencycited by 10
- 2024Modern Hopfield Networks Require Chain-of-Thought to Solve mathsfNC1-Hard Problemscited by 9
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flowscited by 9
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transformcited by 9
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapsecited by 7
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
- 2024Differentially Private Kernel Density Estimationcited by 2
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decodingcited by 2
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspectivecited by 0
- 2025Can Language Models Compose Skills In-Context?cited by 0
- 2025How Smoothing is N-simplicial Attention?cited by 0
- 2025How Smoothing is N-simplicial Attention?17 Dec 2025
- 2025Can Language Models Compose Skills In-Context?27 Oct 2025
- 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
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapse22 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
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flows12 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
17 more
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 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
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descent15 Oct 2024
- 2024HSR-Enhanced Sparse Attention Acceleration14 Oct 2024
- 2024Looped ReLU MLPs May Be All You Need as Practical Programmable Computers12 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
- 2024Do Large Language Models Have Compositional Ability? An Investigation into Limitations and Scalability22 Jul 2024
- 2024Provable Differentially Private Computation of the Cross-Attention Mechanism20 Jul 2024
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)1 Jul 2024
- 2024Towards Infinite-Long Prefix in Transformer20 Jun 2024
- 2024Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer Models5 Jun 2024
- 2024Why Larger Language Models Do In-context Learning Differently?30 May 2024
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)cited by 39
- 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
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flowscited by 9
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flows12 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
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)1 Jul 2024
- 2024Why Larger Language Models Do In-context Learning Differently?cited by 44
- 2024Do Large Language Models Have Compositional Ability? An Investigation into Limitations and Scalabilitycited by 39
- 2024Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer Modelscited by 31
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descentcited by 21
- 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
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2024Towards Infinite-Long Prefix in Transformercited by 10
- 2025On Computational Limits of FlowAR Models: Expressivity and Efficiencycited by 10
12 most cited of 21 All 21 (JSON)
- 2025How Smoothing is N-simplicial Attention?17 Dec 2025
- 2025Can Language Models Compose Skills In-Context?27 Oct 2025
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspective7 Oct 2025
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapse22 May 2025
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transform17 May 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
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 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
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descent15 Oct 2024
12 newest of 21 All 21 (JSON)