English

Nearly Optimal Attention Coresets

Data Structures and Algorithms 2026-05-08 v1 Artificial Intelligence

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^{\rho+o(\rho)}/\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 ρ\rho. This outperforms the best known results for this problem. We also offer an improved lower bound showing that ε\varepsilon-coresets must have size Ω(deρ/ϵ)\Omega({\sqrt{d} e^{\rho}/\epsilon}).

Keywords

Cite

@article{arxiv.2605.05602,
  title  = {Nearly Optimal Attention Coresets},
  author = {Edo Liberty and Alexandr Andoni and Eldar Kleiner},
  journal= {arXiv preprint arXiv:2605.05602},
  year   = {2026}
}
R2 v1 2026-07-01T12:53:58.964Z