Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in Transformers
Not on the map. Why?
Abstract (arXiv)
The self-attention mechanism is the key to the success of transformers in recent Large Language Models (LLMs). However, the quadratic computational cost O(n2) in the input sequence length n is a notorious obstacle for further improvement and scalability in longer contexts. In this work, we leverage the convolution-like structure of attention matrices to develop an efficient approximation method for attention computation using convolution matrices. We propose a mathsfconv basis system, analogous to the rank basis, and show that any lower triangular matrix can always be decomposed as a sum of structured convolution matrices in this basis. We then design a fast algorithm to approximate the attention matrix via a sum of such k convolution matrices. This allows us to compute the attention it inference via Fast Fourier Transforms (FFT) in O(knd log n) time, where d is the hidden dimension, and thus achieve almost linear time n1+o(1) in the practical scenario where kd = no(1). Furthermore, the attention it training forward and it backward gradient can be computed in n1+o(1) as well. We provide theoretical guarantees on the run time and approximation error and conduct preliminary experiments to evaluate its effectiveness. We hope our new paradigm for accelerating attention computation in transformer models can help their application to longer contexts.
Key facts. Cited by 32 papers in the map (data through 7 Oct 2026). Builds on 55 of its 120 references that are in the map. First posted on arXiv 8 May 2024.
Builds on
55 of 120 references.
References · 55
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023GPT-4 Technical Reportcited by 18,132
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
38 more
- 2018An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modelingcited by 1,447
- 2022In-context Learning and Induction Headscited by 930
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
- 2023Gemini: A Family of Highly Capable Multimodal Modelscited by 810
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
- 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 243
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
- 2024Monitoring AI-Modified Content at Scale: A Case Study on the Impact of ChatGPT on AI Conference Peer Reviewscited by 160
- 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 133
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2013Fast Training of Convolutional Networks through FFTscited by 89
- 2024Training-Free Long-Context Scaling of Large Language Modelscited by 61
- 2023A Short Survey of Viewing Large Language Models in Legal Aspectcited by 51
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2023Toeplitz Neural Network for Sequence Modelingcited by 43
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimensioncited by 37
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
- 2023PolySketchFormer: Fast Transformers via Sketching Polynomial Kernelscited by 33
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
- 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
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2023Differentially Private Attention Computationcited by 25
- 2023GradientCoin: A Peer-to-Peer Decentralized Large Language Modelscited by 23
- 2024Fourier Circuits in Neural Networks and Transformers: A Case Study of Modular Arithmetic with Multiple Inputscited by 22
- 2023Solving Attention Kernel Regression Problem via Pre-conditionercited by 20
- 2023Beyond Classical Attention: Quantum Attention for Scalable Computationcited by 18
- 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
- 2023Uncovering hidden geometry in Transformers via disentangling position and contextcited by 15
- 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
- 2023A Unified Scheme of ResNet and Softmaxcited by 12
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regressioncited by 9
50 most cited of 55 All 55 (JSON)
Built on by
Citing papers per year: 2024: 15; 2025: 16; 2026: 1.
32 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
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
- 2025Tensor Product Attention Is All You Needcited by 27
- 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
- 2024HSR-Enhanced Sparse Attention Accelerationcited by 19
20 more
- 2024RoPE Attention Can Be Trained in Almost Linear Timecited by 13
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Learning to Inference Adaptively for Multimodal Large Language Modelscited 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
- 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
- 2025Attention Mechanisms Perspective: Exploring LLM Processing of Graph-Structured Datacited by 7
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapsecited by 7
- 2025Breaking the Frozen Subspace: Importance Sampling for Low-Rank Optimization in LLM Pretrainingcited by 6
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformerscited by 3
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
- 2025CoVE: Compressed Vocabulary Expansion Makes Better LLM-based Recommender Systemscited 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
- 2025Can Language Models Compose Skills In-Context?cited by 0
- 2026Flow Perturbation++: Multi-Step Unbiased Jacobian Estimation for High-Dimensional Boltzmann Samplingcited by 0
- 2026Flow Perturbation++: Multi-Step Unbiased Jacobian Estimation for High-Dimensional Boltzmann Sampling29 Jan 2026
- 2025Can Language Models Compose Skills In-Context?27 Oct 2025
- 2025CoVE: Compressed Vocabulary Expansion Makes Better LLM-based Recommender Systems24 Jun 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
- 2025Attention Mechanisms Perspective: Exploring LLM Processing of Graph-Structured Data4 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
- 2025Learning to Inference Adaptively for Multimodal Large Language Models13 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
20 more
- 2025On Computational Limits of FlowAR Models: Expressivity and Efficiency23 Feb 2025
- 2025Breaking the Frozen Subspace: Importance Sampling for Low-Rank Optimization in LLM Pretraining9 Feb 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers18 Jan 2025
- 2025Tensor Product Attention Is All You Need11 Jan 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
- 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
- 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
- 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
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformers18 Aug 2024
- 2024Do Large Language Models Have Compositional Ability? An Investigation into Limitations and Scalability22 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
- 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
- 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
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
- 2025Tensor Product Attention Is All You Needcited by 27
- 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
- 2024HSR-Enhanced Sparse Attention Accelerationcited by 19
- 2024RoPE Attention Can Be Trained in Almost Linear Timecited by 13
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
12 most cited of 24 All 24 (JSON)
- 2026Flow Perturbation++: Multi-Step Unbiased Jacobian Estimation for High-Dimensional Boltzmann Sampling29 Jan 2026
- 2025Can Language Models Compose Skills In-Context?27 Oct 2025
- 2025CoVE: Compressed Vocabulary Expansion Makes Better LLM-based Recommender Systems24 Jun 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
- 2025Attention Mechanisms Perspective: Exploring LLM Processing of Graph-Structured Data4 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
- 2025Breaking the Frozen Subspace: Importance Sampling for Low-Rank Optimization in LLM Pretraining9 Feb 2025
- 2025Tensor Product Attention Is All You Need11 Jan 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
12 newest of 24 All 24 (JSON)