# Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction

*Ngoc Bui, Trung Hieu Nguyen, Arman Cohan, Rex Ying*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152145) · [Open on the map](../papers.html#p152145)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [KV Cache Optimization](../pgroup/283.md) · Type: new method · Keywords: KV cache eviction, long-context inference, attention dilution, token utility, global retention

Areas: [Memory](../areas/memory.md) › Model Memory Optimization › KV Cache Optimization; [Long Context](../areas/longcontext.md) › Long-context mechanisms › KV cache eviction

## Summary
The paper introduces a global retention-based KV eviction method that learns each token's future utility under a unified memory budget, reducing KV memory while improving long-context reasoning performance.

## Explained to a 5-year-old
When a computer reads a long story, it saves little notes about what it sees. It stores all these notes in a big memory called the KV cache, but that uses a lot of space. The new idea is to learn which notes are important and keep only those, throwing away the ones that are not needed. By keeping only the useful notes, the computer can still understand the story while using less memory. This helps the computer work faster and remember better on long texts and pictures.

## Explained to a 5-year-old, longer
A computer needs to remember things while it reads a long story or looks at pictures. It makes tiny notes for each part of the story, called key-value pairs, and puts them in a special memory area. This memory area is called the KV cache, and it can become very big if the story is long. The new idea is to teach the computer which notes are useful and which are not. It uses simple gates to give each note a score that shows how important it might be later. All the scores are combined so that the computer can decide what to keep together. The computer then keeps only the most useful notes and forgets the rest to save space. By doing this, the computer still understands the story well, even though it remembers fewer notes. This also works for pictures and text together, helping the computer see and read better. The method also has a theory that says keeping good notes helps the computer focus on what matters. In tests, the computer used less memory and performed as well as or better than before. This makes it easier to run the computer on smaller devices without losing quality.

## For a technical reader
The paper addresses the memory bottleneck of key-value (KV) caches used in long-context inference for language and vision-language models. It proposes a learnable eviction policy that scores each cached token by its predicted future utility, using lightweight gates and a shared projection to align scores across layers and heads. By retaining only the most useful tokens under a global budget, the method reduces KV memory usage while preserving or even improving generation quality compared to full-cache attention. Theoretical analysis justifies the approach, showing that selective retention mitigates attention dilution and that geometric retention provides a query-agnostic utility proxy. Experiments on standard long-context benchmarks demonstrate substantial memory savings and performance on par with or better than full-cache baselines.

## Problem
Long-context inference suffers from high memory and compute due to storing all key-value pairs in a KV cache. Existing cache eviction techniques trade off memory for accuracy, often hurting performance, while full-cache attention can be suboptimal because irrelevant tokens dilute useful evidence.

## Method
The approach learns each token's future utility under a unified memory budget using lightweight retention gates that assign scores to cached KV entries. A shared final scoring projection calibrates these scores across layers and heads, enabling a single global eviction policy where tokens compete for cache capacity. Theoretical analysis shows that retaining useful tokens reduces attention dilution, and geometric retention is used as a query-agnostic proxy for future utility.

## Results
The approach substantially reduces KV memory usage while matching or exceeding the performance of full-cache inference on long-context language and vision-language benchmarks.

## Contributions
It provides a learnable, globally calibrated KV eviction policy that improves long-context reasoning, offers theoretical justification for token retention, and demonstrates strong empirical gains over existing eviction methods.

## Research questions this paper is counted under

- [How can we compress or evict key-value cache entries to reduce memory usage without degrading LLM performance?](../q/21.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/152145)
