PAGE: Partition-Aware Gated KV-Cache Eviction
Abstract
KV-cache eviction can do more than compress. In long-context LLMs, keeping only some cached tokens sometimes matches or exceeds full-cache accuracy, because many redundant prefill tokens otherwise dilute attention away from the tokens that carry the answer. This benefit is not uniform, and evicting the wrong tokens drops accuracy to zero on tasks that need precise retrieval, so the useful question is not only which tokens to keep but whether to evict this input at all. We show that one label-free number computed from the prefill attention, the drop between early and late layers in how much attention heads agree on which tokens to read, predicts per input, before any decoding, which of the two cases an input falls under. We build this into PAGE (Partition-Aware Gated Eviction), a wrapper that runs any SnapKV-style evictor when the drop is large and keeps the full cache when it is small, with no training, labels, or fine-tuning. PAGE is a safety mechanism rather than a compressor, so we measure it by the failures it prevents. It cuts the harm rate on capacity-bound inputs from 0.75 to 0.026, and on multi-key retrieval with Mistral-7B plain SnapKV falls from 99% to 0% as the budget shrinks while PAGE holds it at 89%. Elsewhere it passes the base evictor through unchanged, which is the intended behaviour and is what we observe in 8 of 16 cells. The prediction is one-sided, identifying evictable inputs reliably and resolving the single-near-tie-distractor boundary only with per-input information beyond the mean drop. The head-agreement drop orders tasks the same way across four model families, but the threshold does not transfer, and an unlabeled roughly 100-input pilot per model is needed outside Qwen2.5 and Mistral. Realized compression is 1.8 to 3.4 against a nominal 16 budget and decays toward unity by batch 16, and at matched memory a trained evictor outperforms PAGE. Code is available at https://anonymous.4open.science/r/PAGE-018239.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.