AlignKV: Exact Evidence Recovery via Future-Use Distillation and Block-Aligned KV Selection
KV cache compression reduces the memory footprint and memory-access overhead of long-context LLM inference while often preserving aggregate inference quality. Most existing methods rely on hand-crafted heuristics, such as accumulated attention scores or fixed positional rules, to estimate token importance and evict low-value tokens. However, our empirical analysis shows that token-level retention decisions can disrupt the continuity of critical evidence, leaving low-redundancy spans incomplete and often fragmented, coinciding with poor exact-recall performance. We refer to this structured failure mode as retention fragmentation and construct Flag-in-Haystack, a diagnostic benchmark over contiguous low-redundancy spans, including UUIDs and Base64 strings, to measure exact recovery after cache eviction. We propose AlignKV, which selects contiguous blocks as the primary retention unit and distills FullKV future-use attention into a lightweight 75,778-parameter block-aligned scorer coupled with fixed-budget structured selection. On Llama-3.1-8B-Instruct at $B = 512$, AlignKV attains 90.6% (116/128) exact span recovery, approaching FullKV's 95.3% (122/128) and far exceeding our…
- arXiv
- 2612.01782
- Authors
- Shanchen Pang, Junyi Li, Chenhao Zhang, Xiaojian Liao, Meng Han
- Categories
- cs.LG