Improved Algorithms for Kernel Matrix-Vector Multiplication Under Sparsity Assumptions
Not on the map. Why?
Abstract (arXiv)
Motivated by the problem of fast processing of attention matrices, we study fast algorithms for computing matrix-vector products for asymmetric Gaussian Kernel matrices K∈ ℝn× n. K's columns are indexed by a set of n keys k1,k2ldots, kn∈ ℝd, rows by a set of n queries q1,q2,ldots,qn∈ ℝd , and its i,j entry is Kij = e-|qi-kj|22/2σ2 for some bandwidth parameter σ>0. Given a vector x∈ ℝn and error parameter ε>0, our task is to output a y∈ ℝn such that |Kx-y|2≤ ε |x|2 in time subquadratic in n and linear in d. Our algorithms rely on the following modelling assumption about the matrices K: the sum of the entries of K scales linearly in n, as opposed to worst case quadratic growth. We validate this assumption experimentally, for Gaussian kernel matrices encountered in various settings such as fast attention computation in LLMs. We obtain the first subquadratic-time algorithm that works under this assumption, for unrestricted vectors.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 21 of its 29 references that are in the map. First posted on arXiv 31 Jul 2025.
Builds on
21 of 29 references.
References · 21
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2020Rethinking Attention with Performerscited by 1,584
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2022On The Computational Complexity of Self-Attentioncited by 137
9 more
- 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 128
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
- 2018Hashing-Based-Estimators for Kernel Density in High Dimensionscited by 31
- 2020Kernel Density Estimation through Density Constrained Near Neighbor Searchcited by 26
- 2017On the Fine-Grained Complexity of Empirical Risk Minimization: Kernel Methods and Neural Networkscited by 16
- 2021DEANN: Speeding up Kernel-Density Estimation using Approximate Nearest Neighbor Searchcited by 8
- 2021Faster Kernel Matrix Algebra via Density Estimationcited by 7
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2025Even Faster Kernel Matrix Linear Algebra via Density Estimationcited by 1
- 2026Sublinear Time Quantum Algorithm for Attention Approximationcited by 1
- 2026New Bounds for Kernel Sums via Fast Spherical Embeddingscited by 0
- 2026Positional LSH: Binary Block Matrix Approximation for Attention with Linear Biasescited by 0
- 2026Positional LSH: Binary Block Matrix Approximation for Attention with Linear Biases10 May 2026
- 2026New Bounds for Kernel Sums via Fast Spherical Embeddings2 May 2026
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025Even Faster Kernel Matrix Linear Algebra via Density Estimation2 Oct 2025