ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compression

Yuhang Zhan, Lisi Chen, Shuo Shang
7/31/2026
cs.CL

No confident code implementation found for this paper.

Abstract

KV cache compression is essential for efficient long-context inference. Existing eviction methods permanently discard unselected tokens and consequently remove their aggregate contribution to attention.

Show full abstract

Merging-based alternatives preserve more information but can perturb retained keys and values that should remain exact. We observe that the information omitted by cache eviction can be formulated as residual statistics in both the numerator and denominator of softmax attention. Based on this observation, we propose ResKV, which divides a fixed KV budget into an exact main cache and a compact residual cache that reconstructs the contribution of omitted tokens. ResKV lets main-cache tokens and residual entries participate in the same softmax normalization, so residual entries restore both attention numerator and denominator mass rather than acting as a post-hoc correction. A construction-time validation proxy determines residual allocation for each layer and KV head, while a decode-time dynamic gate adjusts residual contributions for individual queries. Comprehensive evaluations on LongBench and RULER, covering query-aware and query-agnostic settings, multiple backbones, cache budgets, and representative compression baselines, demonstrate broad improvements under the same retained KV budget while preserving the practical efficiency of compressed decoding, including peak memory usage and long-context decode throughput.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhan2026reskv,
  title  = {ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compression},
  author = {Yuhang Zhan and Lisi Chen and Shuo Shang},
  year   = {2026},
  eprint = {2607.29591},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.29591v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.29591.svg)](https://codeofpaper.com/paper/2607.29591)

Discussion