AnchorKV: Lossless Key-Value Cache Reconstruction from Layer-Sparse Residual Anchors
Hao Li, Jiashu Zhang, Kaleem Ullah Qasim, Heying Zhang
Key points
From the paper's conclusion- We present AnchorKV, a storage-replay spectrum connecting per-layer residual caching and full recomputation through configurable residual anchors.
Abstract
Residual-stream caching can reconstruct transformer key-value (KV) caches losslessly, but its memory advantage depends on architecture. We present AnchorKV, a storage-replay spectrum connecting per-layer residual caching and full recomputation through configurable residual anchors. An architecture-dependent break-even rule identifies the first storage-saving spacing, while deployment selects an operating point from the spectrum and cascade replay reduces reconstruction from O(Ls) to O(L), with L the model depth and s the anchor spacing. For interleaved sliding-window architectures, exact dynamic programming places anchors under non-uniform reconstruction demand. Across CPU, CUDA, and Ascend NPU backends, six architecture families, and fp32/bf16 arithmetic, evaluations verify bit-exact KV reconstruction and unchanged continuation logits and tokens. At 4k context, cascade reconstruction is up to 16.3 times faster than naive replay; across eight applicable global-attention checkpoints at 32k context, deepest spacing yields 5.78-54.0 times full-KV reactivatable session capacity. Compared with seven external cache methods on a common model, AnchorKV preserves full-cache retrieval and question-answering scores, whereas lossy methods change output fidelity and task scores. The break-even spacing is computable from a model's configuration file alone.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- ARC-KV: Amortizing Anchor Search for Reconstruction-Based KV Cache CompactionarXiv · 2026
- KV$^2$: A Self-Refining KV CachearXiv · 2026
- SlimKV: Joint Token-Feature KV Cache Compression with Reconstruction-Free Beacon AttentionarXiv · 2026
- RaReCache: Bridging the Gap in Cross-Model KV Cache Reuse via Rank disagreement-based Selective RecomputationarXiv · 2026
- RelaxKV: Recomputation Guided by the Query with Sparse Context Attention for Efficient KV Cache ReusearXiv · 2026
- PatchKV: Weight-Space Compensation of KV CachearXiv · 2026