Algorithm and Hardness for Dynamic Attention Maintenance in Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have made fundamental changes in human life. The attention scheme is one of the key components over all the LLMs, such as BERT, GPT-1, Transformers, GPT-2, 3, 3.5 and 4. Inspired by previous theoretical study of static version of the attention multiplication problem [Zandieh, Han, Daliri, and Karbasi arXiv 2023, Alman and Song arXiv 2023]. In this work, we formally define a dynamic version of attention matrix multiplication problem. There are matrices Q,K, V ∈ ℝn × d, they represent query, key and value in LLMs. In each iteration we update one entry in K or V. In the query stage, we receive (i,j) ∈ [n] × [d] as input, and want to answer (D-1 A V)i,j, where A:=exp(QK^top) ∈ ℝn × n is a square matrix and D := diag(A bf 1n) ∈ ℝn × n is a diagonal matrix. Here bf 1n denote a length-n vector that all the entries are ones. We provide two results: an algorithm and a conditional lower bound. bullet On one hand, inspired by the lazy update idea from [Demetrescu and Italiano FOCS 2000, Sankowski FOCS 2004, Cohen, Lee and Song STOC 2019, Brand SODA 2020], we provide a data-structure that uses O(nω(1,1,τ)-τ) amortized update time, and O(n1+τ) worst-case query time. bullet On the other hand, show that unless the hinted matrix vector multiplication conjecture [Brand, Nanongkai and Saranurak FOCS 2019] is false, there is no algorithm that can use both O(nω(1,1,τ) - τ- Omega(1)) amortized update time, and O(n1+τ-Omega(1)) worst query time. In conclusion, our algorithmic result is conditionally optimal unless hinted matrix vector multiplication conjecture is false.
Key facts. Cited by 37 papers in the map (data through 7 Oct 2026). First posted on arXiv 5 Apr 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 26; 2024: 6; 2025: 3; 2026: 2.
37 papers.
Sort:
By area:
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 247
- 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 112
- 2024ReLU2 Wins: Discovering Efficient Activation Functions for Sparse LLMscited by 66
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 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
- 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimensioncited by 37
- 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
- 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
25 more
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understandingcited by 29
- 2023How to Protect Copyright Data in Optimization of Large Language Models?cited 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
- 2023Solving Attention Kernel Regression Problem via Pre-conditionercited by 20
- 2024A Tighter Complexity Analysis of SparseGPTcited by 19
- 2023Beyond Classical Attention: Quantum Attention for Scalable Computationcited by 18
- 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
- 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
- 2023Efficient SGD Neural Network Training via Sublinear Activated Neuron Identificationcited by 11
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regressioncited by 9
- 2023The Expressibility of Polynomial based Attention Schemecited by 7
- 2023Convergence of Two-Layer Regression with Nonlinear Unitscited by 6
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformercited by 6
- 2023One Pass Streaming Algorithm for Super Long Token Attention Approximation in Sublinear Spacecited by 6
- 2023Structured and Fast Optimization: The Kronecker SGD Algorithmcited by 5
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperaturecited by 4
- 2024Binary Hypothesis Testing for Softmax Models and Leverage Score Modelscited by 1
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
- 2026Sublinear Time Quantum Algorithm for Attention Approximationcited by 1
- 2026Beyond Sparse Weights: When Is Attention Compressible?cited by 0
- 2026Beyond Sparse Weights: When Is Attention Compressible?21 Aug 2026
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperature20 May 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2024MagicPIG: LSH Sampling for Efficient LLM Generation21 Oct 2024
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Time23 Aug 2024
- 2024A Tighter Complexity Analysis of SparseGPT22 Aug 2024
- 2024Binary Hypothesis Testing for Softmax Models and Leverage Score Models9 May 2024
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Models7 Feb 2024
- 2024ReLU2 Wins: Discovering Efficient Activation Functions for Sparse LLMs6 Feb 2024
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regression26 Nov 2023
25 more
- 2023One Pass Streaming Algorithm for Super Long Token Attention Approximation in Sublinear Space24 Nov 2023
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformer22 Nov 2023
- 2023The Expressibility of Polynomial based Attention Scheme30 Oct 2023
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Time26 Oct 2023
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weights19 Oct 2023
- 2023Why Softmax Attention Outperforms Linear Attention18 Oct 2023
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computation6 Oct 2023
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Time14 Sep 2023
- 2023Solving Attention Kernel Regression Problem via Pre-conditioner28 Aug 2023
- 2023How to Protect Copyright Data in Optimization of Large Language Models?23 Aug 2023
- 2023GradientCoin: A Peer-to-Peer Decentralized Large Language Models21 Aug 2023
- 2023Convergence of Two-Layer Regression with Nonlinear Units16 Aug 2023
- 2023Zero-th Order Algorithm for Softmax Attention Optimization17 Jul 2023
- 2023Beyond Classical Attention: Quantum Attention for Scalable Computation16 Jul 2023
- 2023Efficient SGD Neural Network Training via Sublinear Activated Neuron Identification13 Jul 2023
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trick5 Jul 2023
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun 2023
- 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understanding8 Jun 2023
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Models4 Jun 2023
- 2023Structured and Fast Optimization: The Kronecker SGD Algorithm13 May 2023
- 2023Differentially Private Attention Computation8 May 2023
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regression1 May 2023
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regression26 Apr 2023
- 2023Attention Scheme Inspired Softmax Regression20 Apr 2023
- 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimension10 Apr 2023
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 247
- 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 112
- 2024ReLU2 Wins: Discovering Efficient Activation Functions for Sparse LLMscited by 66
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 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
- 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimensioncited by 37
- 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
- 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
12 most cited of 34 All 34 (JSON)
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streams4 Oct 2025
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperature20 May 2025
- 2024MagicPIG: LSH Sampling for Efficient LLM Generation21 Oct 2024
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Time23 Aug 2024
- 2024A Tighter Complexity Analysis of SparseGPT22 Aug 2024
- 2024Binary Hypothesis Testing for Softmax Models and Leverage Score Models9 May 2024
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Models7 Feb 2024
- 2024ReLU2 Wins: Discovering Efficient Activation Functions for Sparse LLMs6 Feb 2024
- 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regression26 Nov 2023
- 2023One Pass Streaming Algorithm for Super Long Token Attention Approximation in Sublinear Space24 Nov 2023
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformer22 Nov 2023
12 newest of 34 All 34 (JSON)