mlsanityData to 7 Oct 2026

Algorithm and Hardness for Dynamic Attention Maintenance in Large Language Models

arXiv 2304.02207 ↗First posted 5 Apr 2023cs.DS cs.CCcited by 37

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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 26; 2024: 6; 2025: 3; 2026: 2.

37 papers.

Sort:

By area:

  1. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
  2. 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 247
  3. 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 112
  4. 2024ReLU2 Wins: Discovering Efficient Activation Functions for Sparse LLMscited by 66
  5. 2023Attention Scheme Inspired Softmax Regressioncited by 49
  6. 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
  7. 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
  8. 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimensioncited by 37
  9. 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
  10. 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
  11. 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
  12. 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
25 more
  1. 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
  2. 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understandingcited by 29
  3. 2023How to Protect Copyright Data in Optimization of Large Language Models?cited by 26
  4. 2023Differentially Private Attention Computationcited by 25
  5. 2023GradientCoin: A Peer-to-Peer Decentralized Large Language Modelscited by 23
  6. 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
  7. 2023Solving Attention Kernel Regression Problem via Pre-conditionercited by 20
  8. 2024A Tighter Complexity Analysis of SparseGPTcited by 19
  9. 2023Beyond Classical Attention: Quantum Attention for Scalable Computationcited by 18
  10. 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
  11. 2023Why Softmax Attention Outperforms Linear Attentioncited by 15
  12. 2023Efficient SGD Neural Network Training via Sublinear Activated Neuron Identificationcited by 11
  13. 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
  14. 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
  15. 2023Local Convergence of Approximate Newton Method for Two Layer Nonlinear Regressioncited by 9
  16. 2023The Expressibility of Polynomial based Attention Schemecited by 7
  17. 2023Convergence of Two-Layer Regression with Nonlinear Unitscited by 6
  18. 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformercited by 6
  19. 2023One Pass Streaming Algorithm for Super Long Token Attention Approximation in Sublinear Spacecited by 6
  20. 2023Structured and Fast Optimization: The Kronecker SGD Algorithmcited by 5
  21. 2025Subquadratic Algorithms and Hardness for Attention with Any Temperaturecited by 4
  22. 2024Binary Hypothesis Testing for Softmax Models and Leverage Score Modelscited by 1
  23. 2025Towards Sampling Data Structures for Tensor Products in Turnstile Streamscited by 1
  24. 2026Sublinear Time Quantum Algorithm for Attention Approximationcited by 1
  25. 2026Beyond Sparse Weights: When Is Attention Compressible?cited by 0