Lune

ICLR2025Top-tier venue

Improved Algorithms for Kernel Matrix-Vector Multiplication Under Sparsity Assumptions

Piotr Indyk, Michael Kapralov, Kshiteej Sheth, Tal Wagner

Abstract

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 ∈ R n×n . K's columns are indexed by a set of n keys k 1 , k 2 . . . , k n ∈ R d , rows by a set of n queries q 1 , q 2 , . . . , q n ∈ R d , and its i, j entry is

for some bandwidth parameter σ > 0. Given a vector x ∈ R n and error parameter ϵ > 0, our task is to output a y ∈ R 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Scatterbrain: Unifying Sparse and Low-rank Attention cites Big Bird: Transformers for Longer Sequences
  • Scatterbrain: Unifying Sparse and Low-rank Attention cites Rethinking Attention with Performers
  • Scatterbrain: Unifying Sparse and Low-rank Attention cites Reformer: The Efficient Transformer
  • Big Bird: Transformers for Longer Sequences cites Reformer: The Efficient Transformer
  • Rethinking Attention with Performers cites Reformer: The Efficient Transformer
  • Sublinear Time Quantum Algorithm for Attention Approximation cites Big Bird: Transformers for Longer Sequences
  • Sublinear Time Quantum Algorithm for Attention Approximation cites Rethinking Attention with Performers
  • Sublinear Time Quantum Algorithm for Attention Approximation cites Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention
  • Sublinear Time Quantum Algorithm for Attention Approximation cites Reformer: The Efficient Transformer
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention cites Rethinking Attention with Performers
  • Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention cites Reformer: The Efficient Transformer
  • New Bounds for Kernel Sums via Fast Spherical Embeddings cites Rethinking Attention with Performers
  • New Bounds for Kernel Sums via Fast Spherical Embeddings cites Even Faster Kernel Matrix Linear Algebra via Density Estimation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Sublinear Time Quantum Algorithm for Attention ApproximationZhao Song, Jianfei Xue, Jiahao Zhang, Lichen ZhangICLR 2026 · 2 citations
  2. Even Faster Kernel Matrix Linear Algebra via Density EstimationRikhav Shah, Sandeep Silwal, Haike XuICML 2026 · 1 citation
  3. New Bounds for Kernel Sums via Fast Spherical EmbeddingsTal WagnerICML 2026

Builds on10

  1. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
  2. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  3. Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan et al.AAAI 2021 · 675 citations
  4. Scatterbrain: Unifying Sparse and Low-rank AttentionBeidi Chen, Tri Dao, Eric Winsor, Zhao Song et al.NeurIPS 2021 · 165 citations
  5. Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song et al.ICLR 2021 · 122 citations

Related papers

  1. Fast Attention Requires Bounded EntriesJosh Alman, Zhao SongNeurIPS 2023 · 115 citations
  2. Faster Kernel Matrix Algebra via Density EstimationArturs Backurs, Piotr Indyk, Cameron Musco, Tal WagnerICML 2021 · 10 citations
  3. Subquadratic Algorithms and Hardness for Attention with Any TemperatureShreya Gupta, Boyang Huang, Barna Saha, Yinzhan Xu et al.ICLR 2026 · 5 citations
  4. Metric Transforms and Low Rank Representations of Kernels for Fast AttentionTimothy Chu, Josh Alman, Gary L. Miller, Shyam Narayanan et al.NeurIPS 2024 · 4 citations
  5. LevAttention: Time, Space and Streaming Efficient Algorithm for Heavy AttentionsRavindran Kannan, Chiranjib Bhattacharyya, Praneeth Kacham, David P. WoodruffICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines