A Mathematical Theory of Top-$k$ Sparse Attention via Total Variation Distance
Abstract
We develop a unified mathematical framework for certified Top- attention truncation that quantifies approximation error at both the distribution and output levels. For a single attention distribution and its Top- truncation , we show that the total-variation distance coincides with the discarded softmax tail mass and satisfies , yielding sharp Top--specific bounds in place of generic inequalities. From this we derive non-asymptotic deterministic bounds -- from a single boundary gap through multi-gap and blockwise variants -- that control using only the ordered logits. Using an exact head-tail decomposition, we prove that the output error factorizes as with , yielding a new head-tail diameter bound and refinements linking the error to . Under an i.i.d. Gaussian score model we derive closed-form tail masses and an asymptotic rule for the minimal ensuring , namely . Experiments on bert-base-uncased and synthetic logits confirm the predicted scaling of and show that certified Top- can reduce scored keys by 2-4 on average while meeting the prescribed total-variation budget.
Keywords
Cite
@article{arxiv.2512.07647,
title = {A Mathematical Theory of Top-$k$ Sparse Attention via Total Variation Distance},
author = {Georgios Tzachristas and Lei Deng and Ioannis Tzachristas and Gong Zhang and Renhai Chen},
journal= {arXiv preprint arXiv:2512.07647},
year = {2025}
}