cs.DSMay 7, 2026

Nearly Optimal Attention Coresets

Authors: Edo LibertyAlexandr AndoniEldar Kleiner

Abstract

We consider the problem of estimating the Attention mechanism in small space, and prove the existence of coresets for it of nearly optimal size. Specifically, we show that for any set of unit-norm keys and values (K,V)(K,V) in Rd\mathbb{R}^d, there exists a subset (K,V)(K',V') of size at most O(deρ+o(ρ)/ε)O({\sqrt{d} e^{ρ+o(ρ)}/\varepsilon}) such that

Attn(q,K,V)Attn(q,K,V)ε\left\| \operatorname{Attn}(q,K,V)- \operatorname{Attn}(q,K',V') \right\| \le \varepsilon

simultaneously for all queries whose norm is bounded by ρρ. This outperforms the best known results for this problem. We also offer an improved lower bound showing that ε\varepsilon-coresets must have size Ω(deρ/ε)Ω({\sqrt{d} e^ρ/ε}).

Explore similar work

CardsList
  1. Towards Tight Bounds for Streaming Attention

    Jun 5, 2026Justin Y. Chen, Ying Feng, Piotr Indyk +3Key-Value Cache CompressionTop-K

  2. Approaching I/O-optimality for Approximate Attention

    May 22, 2026Pál András Papp, Aleksandros Sobczyk, Anastasios ZouziasQuadratic AttentionMatrix Multiplication