Streaming Attention Approximation via Discrepancy Theory
Ekaterina Kochetkova, Kshiteej Sheth, Insu Han, Amir Zandieh, Michael Kapralov

TL;DR
This paper introduces BalanceKV, a streaming algorithm for attention approximation in large language models that balances theoretical guarantees with empirical performance improvements for long-context token generation.
Contribution
The paper presents BalanceKV, a novel streaming algorithm based on geometric process and vector balancing theory, with proven lower bounds and practical advantages.
Findings
BalanceKV achieves strong theoretical approximation guarantees.
Empirical results show improved performance on long-context benchmarks.
BalanceKV outperforms existing attention approximation methods.
Abstract
Large language models (LLMs) have achieved impressive success, but their high memory requirements present challenges for long-context token generation. In this paper we study the streaming complexity of attention approximation, a key computational primitive underlying token generation. Our main contribution is BalanceKV, a streaming algorithm for -approximating attention computations based on geometric process for selecting a balanced collection of Key and Value tokens as per Banaszczyk's vector balancing theory. We complement our algorithm with space lower bounds for streaming attention computation. Besides strong theoretical guarantees, BalanceKV exhibits empirically validated performance improvements over existing methods, both for attention approximation and end-to-end performance on various long context benchmarks.
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
Taxonomy
TopicsAdvanced Data Compression Techniques · Advanced Data Storage Technologies · Video Coding and Compression Technologies
MethodsSoftmax · Attention Is All You Need
