
NB
Ngoc Bui, Hieu Trung Nguyen, Arman Cohan, Rex Ying
· 1 min read
ResearcharXiv cs.LG
Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction
arXiv:2605.09649v2 Announce Type: replace
Abstract: The key-value (KV) cache is a major bottleneck in long-context inference, where memory and computation grow with sequence length. Existing KV eviction methods reduce this cost but typically degrade performance relative to full-cache inference. Our key insight is that full-cache attention is not always optimal: in long contexts, irrelevant tokens can dilute attention away from useful evidence, so selective, learnable eviction can improve generation rather than merely approximate the full cache. We introduce a global retention-based KV eviction method that learns each token's future utility under a unified memory budget. Lightweight retention gates assign utility scores to cached KV entries, and a shared final scoring projection encourages score comparability across all layers and heads. This enables a single global eviction policy in which tokens from different layers, heads, and modalities compete directly for cache capacity. We further provide theoretical analysis showing that preferentially retaining useful tokens can reduce attention dilution, and we justify geometric retention as a query-agnostic proxy for future utility. Across long-context language and vision-language benchmarks, our method substantially reduces KV memory while maintaining performance close to full-cache inference. These results suggest that learned, globally ranked KV eviction is not only a compression technique, but also a potential mechanism for improving long-context performance.
Original source
This story was published by arXiv cs.LG and written by Ngoc Bui, Hieu Trung Nguyen, Arman Cohan, Rex Ying. SyncAI.news shows a preview; the complete article is on the publisher's site.
Read the full story on arxiv.org


