MomentKV: Closing the Directional Gap in KV Cache Eviction for Long-Context Inference
- URL: http://arxiv.org/abs/2606.01563v1
- Date: Mon, 01 Jun 2026 02:08:40 GMT
- Title: MomentKV: Closing the Directional Gap in KV Cache Eviction for Long-Context Inference
- Abstract summary: Autoregressive decoding in Transformer-based language models relies on the KV cache.<n> KV cache eviction addresses this by retaining a fixed-size subset of key-value pairs and discarding the rest.<n>We propose MomentKV, which maintains compact, small-size moment statistics over the evicted token set.
- Score: 12.316173390280609
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Autoregressive decoding in Transformer-based language models relies on the KV cache, whose memory footprint grows linearly with sequence length and becomes the primary bottleneck for long-context inference. KV cache eviction addresses this by retaining a fixed-size subset of key-value pairs and discarding the rest. We identify that a primary source of output degradation is not the residual attention mass on evicted tokens, which existing methods already minimize, but a directional mismatch between the retained and evicted token sets. Specifically, the evicted tokens in practice are often near-orthogonal to the retained ones. Thus, even a small evicted mass could have an oversized impact on the resulting direction distribution and amplify into substantial output error. This reveals a fundamental limit in existing strategies. To address this, we propose MomentKV, which maintains compact, small-size moment statistics over the evicted token set, including a count, key mean, value mean, and value-key covariance. During eviction, the moment statistics is leveraged to identify tokens already well aligned with and captured by the accumulated summary, keeping the evicted set geometrically regular. During inference, they yield a closed-form first-order approximation of the evicted attention output, forming a mutually reinforcing loop between selective eviction and accurate correction. On LongBench and RULER with LLaMA-3.1-8B-Instruct and Qwen3-4B-Instruct, MomentKV outperforms all baselines at every cache budget, with the largest gains under aggressive compression.
Related papers
- Back from the Future: Key-Value Cache Management by Counter-Causal Surprise [67.1056509495879]
Key-value (KV) cache management through compression and eviction strategies has emerged as an important research direction in recent years.<n>We propose a simple yet effective KV eviction scheme motivated by the insight that past tokens which can be well-predicted from more recent tokens are redundant.<n>We evaluate our strategy on various open-source LLMs and benchmark datasets showing competitive or improved performance over other state-of-the-art methods.
arXiv Detail & Related papers (2026-07-30T02:42:51Z) - Raven: High-Recall Sequence Modeling with Sparse Memory Routing [88.47618436676748]
We introduce Raven, a linear-time sequence model that maintains a fixed set of memory slots and, at each step, decays and updates only a selected subset via learned, input-dependent routing.<n>Across recall-intensive benchmarks, Raven is competitive with or outperforms prior linear-time baselines, achieving strong long-context recall where both SWA and SSMs sharply degrade.
arXiv Detail & Related papers (2026-07-28T07:04:32Z) - GRKV: Global Regression for Training-Free KV Cache Compression in Long-Context LLMs [97.36238579001544]
Large language models (LLMs) with extended context lengths rely on the key-value ( KV) cache to support attention over prior tokens.<n>Maintaining the KV cache incurs substantial memory overhead, motivating KV-cache compression methods.<n>We propose GRKV, a training-free KV-cache merging method that directly minimizes the discrepancy between compressed-cache and full-cache attention outputs.
arXiv Detail & Related papers (2026-05-29T10:16:30Z) - IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inference [33.37463192332294]
We introduce a learnable indexer that predicts KV importance, enabling more accurate retention of critical tokens.<n>We propose a lightweight latent memory module that compresses evicted tokens into a compact, online-updated state.<n>Our method enables accurate long-context inference under a bounded KV budget.
arXiv Detail & Related papers (2026-05-25T06:29:43Z) - Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction [65.710271475739]
We introduce a global retention-based KV eviction method that learns each token's future utility under a unified memory budget.<n>We show that our method substantially reduces KV memory while matching or surpassing full-cache inference.<n>These results suggest that learned, globally calibrated KV eviction is not only a compression technique, but also a mechanism for improving long-context reasoning.
arXiv Detail & Related papers (2026-05-10T16:47:50Z) - Reformulating KV Cache Eviction Problem for Long-Context LLM Inference [2.0590127484132523]
Large language models (LLMs) support long-context inference but suffer from substantial memory and runtime overhead due to Key-Value ( KV) Cache growth.<n>Existing KV Cache eviction methods rely on local attention weights, neglecting the influence of value representations, output projection, and inter-head interactions.<n>We introduce LaProx, a novel eviction strategy that explicitly models the multiplicative interaction between attention maps and projected value states.
arXiv Detail & Related papers (2026-05-08T04:37:22Z) - ForesightKV: Optimizing KV Cache Eviction for Reasoning Models by Learning Long-Term Contribution [84.41751286055909]
We develop a training-based KV cache eviction framework that learns to predict which KV pairs to evict during longtext generations.<n>We formulate cache eviction as a Markov Decision Process and apply the GRPO algorithm to mitigate the significant language modeling loss increase on low-entropy tokens.
arXiv Detail & Related papers (2026-02-03T07:16:51Z) - FASA: Frequency-aware Sparse Attention [56.26881872333624]
We propose FASA, a novel framework that achieves query-aware token eviction by dynamically predicting token importance.<n>Our key finding is that a small, identifiable subset of "dominant" FCs consistently exhibits high contextual agreement with the full attention head.<n>Across a spectrum of long-context tasks, FASA consistently outperforms all token-eviction baselines and achieves near-oracle accuracy.
arXiv Detail & Related papers (2026-02-03T06:09:06Z) - Judge Q: Trainable Queries for Optimized Information Retention in KV Cache Eviction [53.83828564664595]
Large language models (LLMs) utilize key-value ( KV) cache to store historical information during sequence processing.<n>Current methods for KV cache eviction typically utilize the last window from the pre-filling phase as queries to compute the KV importance scores for eviction.<n>We propose Judge Q, a novel training method which incorporates a soft token list.
arXiv Detail & Related papers (2025-09-13T03:34:12Z) - CaliDrop: KV Cache Compression with Calibration [44.722738059962296]
Large Language Models (LLMs) require substantial computational resources during generation.<n> KV cache compression techniques have been proposed to mitigate this bottleneck.<n>This paper focuses on enhancing token eviction strategies.
arXiv Detail & Related papers (2025-07-26T10:34:53Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.