AlignKV: Exact Evidence Recovery via Future-Use Distillation and Block-Aligned KV Selection
Shanchen Pang, Junyi Li, Chenhao Zhang, Xiaojian Liao, Meng Han
Abstract
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 , AlignKV attains 90.6% (116/128) exact span recovery, approaching FullKV's 95.3% (122/128) and far exceeding our matched heuristic control's 14.8% (19/128; SnapKV: 9.4%, 12/128). It also reaches 84.89 on the confirmatory RULER-Test split (vs. 72.22--76.03) and 47.70 on LongBench (vs. 47.67--47.82) against the three prespecified compressed comparators, with no detectable aggregate LongBench difference among the four methods. Ablations show that prompt negative log-likelihood is especially useful to the learned scorer for high-entropy strings such as UUIDs. Distilling future attention instead of using span labels gives its clearest benefit on the broader RULER task mix, not on Flag exact recovery.
Create a lesson
Metadata
- Comments
- 9 pages, 6 figures, 5 tables
Related papers
Alignment and Convergence Analyses of Gradient Flow in Two-Layer Convolutional Neural Networks
Shared title terminologycs.LGWang Xiang, Saptarshi Chakraborty
BlockDTW: Efficient, Parallel and Differentiable Time-Series Alignment for Neural Learning Systems
Shared title terminologycs.LGAlberto Zancanaro, Leonardo Badia, Giulia Cisotto
Tabular Selective Attention
Shared title terminologycs.LGRohith Saai Pemmasani Prabakaran, Daniel De Dios Allegue, Nour Shaheen et al.
Logic Gate Graph Neural Networks with Exact Count-Preserving Rules
Shared title terminologycs.LGDehn Xu, Tim Katzke, Emmanuel Müller
Reusable Latent Reward Interfaces for Diffusion Alignment
Shared title terminologycs.LGYuwei Zhang, Chubin Chen, Hao Chen et al.
Molecular Uncertainty Gradients: Exact Decomposition of Predictive Variance Onto Molecular Substructures
Shared title terminologycs.LGŁukasz Janisiów, Anna Bielawska, Aneta Pawelec et al.