Token Sample Complexity of Attention
L\'ea Bohbot, Cyril Letrouit, Gabriel Peyr\'e, Fran\c{c}ois-Xavier Vialard

TL;DR
This paper introduces the concept of token-sample complexity to analyze how attention mechanisms in large language models converge at extreme sequence lengths, providing theoretical bounds and empirical validation.
Contribution
It establishes new convergence bounds for attention maps and token distributions, addressing limitations of previous analyses at large context sizes.
Findings
Attention map convergence rate is $C(R)/\sqrt{n}$ for compactly supported distributions.
Convergence rate for moments is $C'(R)/n^{eta}$ with $eta<rac{1}{2}$, depending on distribution support.
Experimental results on Gaussian data and BERT models validate theoretical predictions.
Abstract
As context windows in large language models continue to expand, it is essential to characterize how attention behaves at extreme sequence lengths. We introduce token-sample complexity: the rate at which attention computed on tokens converges to its infinite-token limit. We estimate finite- convergence bounds at two levels: pointwise uniform convergence of the attention map, and convergence of moments for the transformed token distribution. For compactly supported (and more generally sub-Gaussian) distributions, our first result shows that the attention map converges uniformly on a ball of radius at rate , where grows exponentially with . For large , this estimate loses practical value, and our second result addresses this issue by establishing convergence rates for the moments of the transformed distribution (the token output of the attention…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Machine Learning and Algorithms
