ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compression
Yuhang Zhan, Lisi Chen, Shuo Shang
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. 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.
Create a lesson
Related papers
S4R: Selective Sampling, Subspaces, and Sparse Reconstruction for Compressed Long-Context KV Caching
Shared title terminology · Jialong Han, You Wu, Kewei Tu
RoCoKV: Accelerating LLM Inference Serving through Uncertainty and Redundancy Aware KV Cache Compression
Shared title terminology · Payman Behnam, Elaheh Sobhani, Saad Amin et al.
Keyless Attention: Value-Space Routing and Value-Only Caching for Efficient Transformers
Shared title terminology · Xin Gao, Xingming Xu
LongCat Recall Sparse Attention: Co-Designing Key Organization and Retrieval for Long-Context Inference
Shared title terminology · Hao Zhang, Bin Xiao, Kefeng Zhang
Separating Automation Gains from Agent Contributions in AI-Assisted Model Validation
Shared title terminology · M. Ahmadi Achachlouei
How Language Models Compress and Compare: Understanding Selection with Token Covariance Maps
Shared title terminology · Moshe Eliasof