TRANSMISSION // 2610.03198v3

A selective way to compress AI’s working memory

Source published

KV² selects a small set of informative prompt tokens, then uses them to score what an AI should retain. Tests show its clearest gains at very tight cache budgets, with important limits to the memory savings measured so far.

AI-generated conceptual illustration for A selective way to compress AI’s working memory
AI-generated conceptual illustration; not documentary evidence.

Long-context AI systems can spend substantial memory storing the information they may need to answer later questions. A new method, KV², tries to make that stored context smaller without scoring every token through a full reconstruction pass. Its strongest reported results come when the cache is compressed to just a few percent of its original size—but the study has not yet demonstrated equivalent savings during real-world decoding.

When an AI model reads a long prompt, it stores intermediate information in a key-value (KV) cache. Later, as it generates an answer, the model can refer to this stored state instead of processing the entire prompt again. The cache grows with the length of the context, making it a significant memory cost—especially when one prepared context must support many different questions.

That reuse creates a challenge: before the questions arrive, which parts of the prompt should the model keep? A lightweight scoring method is relatively cheap but may choose poorly. A reconstruction-based method can score tokens by how useful they are for reproducing the original context, but doing so across the entire prompt takes extra computation.

In the preprint KV²: A Self-Refining KV Cache, Johannes Wesch, Danni Liu and Jan Niehues propose a middle course: reconstruct selectively. A lightweight proxy scorer first identifies a small set of potentially informative tokens. The method then reprocesses those selected tokens as queries against the full cache. Their attention to cached positions provides the final scores used to decide what to retain. The proxy proposes candidates; the second stage makes the eviction decision.

The authors divide long prompts into chunks, keep a small set of initial “sink” tokens, and combine the scores from each chunk to select entries under a target cache budget. Their default proxy is KeyDiff. The method can also run additional rounds, using scores from one round to guide the next, although the authors treat this iterative refinement as an optional extension rather than the usual setting.

Where the results are strongest

The researchers tested KV² on RULER, a benchmark of long-context tasks; a Needle-in-a-Haystack test, which asks whether a fact can be found within a distractor-filled document; and LongBench, a varied collection of long-context tasks. Experiments mainly used Llama-3.1-8B-Instruct and Qwen3-8B, with comparisons against KeyDiff, Expected Attention and KVzip. The question was added after compression, so the cache was not tailored to that specific question—though some prompts included task instructions and examples.

Across these tests, the method’s advantage over the compared approaches generally grew as the retained cache became very small. On RULER at 16K context length, the paper reports that for Qwen3-8B with a 2% cache budget, KV²’s average score was more than 40 percentage points above the next-best baseline. On LongBench, it had the highest average scores at 2% and 5% budgets for both main models. At 10%, it remained slightly ahead, but the authors say that margin is small and not conclusive. The clearest benefits appeared in tasks where useful evidence was concentrated in a relatively small number of locations; performance was less favorable when useful information was spread broadly.

The selective approach also used less runtime and peak memory than full-context reconstruction during the compression stage in the tested setup. This does not establish that it makes model responses faster or reduces deployed memory by the same amount. The implementation uses masks to hide entries rather than physically compacting the cache, so the full cache remains resident. Turning a nominal retention budget into actual memory savings requires a compact serving system, which the paper identifies as future work.

What remains uncertain

These findings come from a limited set of models, benchmarks and experimental configurations, not from a broad deployment study. Some results, such as the InfiniteBench extension, use only a 10% subsample. The authors also find that outcomes depend on the proxy scorer: KeyDiff works best among the tested options, so another proxy could change the results. At severe compression, KV² is more robust on some tasks, not uniformly successful; the paper notes that distractor-heavy cases and tasks needing broadly distributed information remain difficult.

The work is an arXiv preprint, a research manuscript that may not have undergone peer review. Its claims should therefore be read as reported experimental results, not settled evidence of practical production benefits. The central proposal is promising but specific: carefully chosen reconstruction queries can improve cache selection under tight budgets without replaying every token. Whether that advantage translates into reliable, physical memory and decoding-time savings awaits implementation and further testing.

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.