通过学习恢复被丢弃的上下文信息,显著提升压缩缓存的性能。
RestoreKV: Recovering Full-Cache Behavior Under Aggressive Query-Agnostic KV Cache Eviction

- 在固定缓存预算下,用轻量级适配器重建被丢弃的上下文信息。
- 在5%缓存预算下,RULER-4K基准上准确率从38.2提升至73.2。
- 仅需0.4%参数更新,无需任务微调,适合大规模模型部署。
查询无关的KV缓存淘汰方法虽能压缩上下文并复用,但在紧约束下性能下降明显。现有方法主要优化保留哪些原始KV对,而本文提出RestoreKV,以学习方式在相同总缓存预算下实现被丢弃信息的恢复。核心思想是:虽然丢失的信息具上下文特异性,但生成其紧凑补全的机制可跨上下文共享。预填充后,少量恢复令牌通过单次LoRA适配通道访问完整缓存,生成上下文相关的恢复缓存。基础重要性评分与淘汰规则不变,后续解码中适配器禁用。RestoreKV通过从冻结全缓存模型进行参数高效自蒸馏训练,仅优化0.4%参数且无需任务特定调优。在四个骨干网络和四个长文本基准测试中,显著降低压缩带来的性能损失。Qwen3-4B模型在60组匹配预算设置中,59组表现优于基线;5%预算下,使KVzip在RULER-4K上准确率由38.2升至73.2。应用于KVzip+时,在KVPress基准上16倍压缩下达到86.4准确率,32K上下文评估中缓存构建开销不足0.5%。
原文摘要 · Abstract (English)
Query-agnostic KV cache eviction compresses a context once and reuses the resulting cache for arbitrary future queries, but performance can collapse under tight budgets. Existing methods primarily improve which original KV pairs are retained. We introduce RestoreKV, which complements this selection-based formulation with learned restoration under the same total KV budget. Our key insight is that, although the information lost through eviction is context-specific, the mechanism for generating its compact complement can be shared across contexts. After context prefill, a few restore tokens attend to the full KV cache in a single LoRA-adapted pass, generating a compact, context-conditioned restore cache. The base importance scorer and eviction rule remain unchanged, and the adapters are disabled for all subsequent queries and decoding. RestoreKV is trained through parameter-efficient self-distillation from the frozen full-cache model, optimizing only $0.4\%$ of the parameters and requiring no task-specific tuning. Across four backbones and four long-context benchmarks, RestoreKV substantially reduces compression-induced degradation. On Qwen3-4B, it improves 59 of 60 paired, budget-matched settings across five base eviction methods; at a $5\%$ budget, it raises KVzip from $38.2$ to $73.2$ on RULER-4K. Applied to KVzip+, RestoreKV reaches $86.4$ RULER accuracy at $16\times$ compression on the KVPress Benchmark, while adding less than $0.5\%$ one-time cache-construction overhead in a 32K-context evaluation. Our project page is available at https://paper.pnu-cvsp.com/RestoreKV/
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。