Learning to Evict from Key-Value Cache
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
The growing size of Large Language Models (LLMs) makes efficient inference challenging, primarily due to the memory demands of the autoregressive Key-Value (KV) cache. Existing eviction or compression methods reduce cost but rely on heuristics, such as recency or past attention scores, which serve only as indirect proxies for a token's future utility and introduce computational overhead. We reframe KV cache eviction as a reinforcement learning (RL) problem: learning to rank tokens by their predicted usefulness for future decoding. To this end, we introduce KV Policy (KVP), a framework of lightweight per-head RL agents trained on pre-computed generation traces using only key and value vectors. Each agent learns a specialized eviction policy guided by a holistic reward, derived from future utility, that evaluates the quality of the ranking across all cache budgets, requiring no modifications to the underlying LLM or additional inference. Evaluated across two model families on the long-context benchmark RULER (up to 128K tokens) and the multi-turn dialogue benchmark OASST2-4k, KVP significantly outperforms strong baselines. Zero-shot tests on standard downstream tasks (BoolQ, LongBench passage retrieval, GovReport) further show that KVP generalizes beyond its training distribution and to considerably longer sequence lengths. These results demonstrate that learning to predict future token utility is a powerful and scalable paradigm for adaptive KV cache management.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 51 of its 64 references that are in the map. First posted on arXiv 10 Feb 2026.
Builds on
51 of 64 references.
Closest ancestors · 20
Same direction, newest first
- 2026KVzap: Fast, Adaptive, and Faithful KV Cache Pruning12 Jan
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distribution1 Oct
- 2025UniGist: Towards General and Hardware-aligned Sequence-level Long Context Compression19 Sep
- 2025Judge Q: Trainable Queries for Optimized Information Retention in KV Cache Eviction13 Sep
- 2025Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scores10 Jul
- 2025KVzip: Query-Agnostic KV Cache Compression with Context Reconstruction29 May
- 2025KeyDiff: Key Similarity-Based KV Cache Eviction for Long-Context LLM Inference in Resource-Constrained Environments21 Apr
- 2025LagKV: Lag-Relative Information of the KV Cache Tells Which Tokens Are Important7 Apr
- 2025Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMs2 Mar
- 2024Locret: Enhancing Eviction in Long-Context LLM Inference with Trained Retaining Heads on Consumer-Grade Devices2 Oct
- 2024Palu: Compressing KV-Cache with Low-Rank Projection30 Jul
- 2024InfiniGen: Efficient Generative Inference of Large Language Models with Dynamic KV Cache Management28 Jun
8 more
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compression17 Jun
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference16 Jun
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funneling4 Jun
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2024Keyformer: KV Cache Reduction through Key Tokens Selection for Efficient Generative Inference14 Mar
- 2023SparQ Attention: Bandwidth-Efficient LLM Inference8 Dec
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
Other references · 31
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2024Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolutioncited by 4,151
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2024Qwen2 Technical Reportcited by 2,076
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
19 more
- 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,338
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 881
- 2023OpenAssistant Conversations -- Democratizing Large Language Model Alignmentcited by 712
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
- 2020Fast Differentiable Sorting and Rankingcited by 196
- 2018Learning Latent Permutations with Gumbel-Sinkhorn Networkscited by 172
- 2024Transformers are Multi-State RNNscited by 120
- 2024Dynamic Memory Compression: Retrofitting LLMs for Accelerated Inferencecited by 115
- 2024MagicPIG: LSH Sampling for Efficient LLM Generationcited by 112
- 2019Stochastic Optimization of Sorting Networks via Continuous Relaxationscited by 111
- 2024Long Context Compression with Activation Beaconcited by 101
- 2024Loki: Low-rank Keys for Efficient Sparse Attentioncited by 87
- 2020SoftSort: A Continuous Relaxation for the argsort Operatorcited by 66
- 2025KV-Distill: Nearly Lossless Learnable Context Compression for LLMscited by 19
- 2020A Survey of Deep Learning for Data Caching in Edge Networkcited by 6
- 2024An Evolved Universal Transformer Memorycited by 4
- 2020Applying Machine Learning Techniques for Caching in Edge Networks: A Comprehensive Surveycited by 2
Built on by
Citing papers per year: 2026: 12.
12 papers.
- 2026Still: Amortized KV Cache Compaction in a Single Forward Passcited by 3
- 2026AURA: Action-Gated Memory for Robot Policies at Constant VRAMcited by 2
- 2026Adaptive Filtering of the KV Cache: Diagnosing and Correcting Structural-Role Bias in LLM Inferencecited by 1
- 2026Language Models Can Control Their Own Attentioncited by 1
- 2026Cartridges++: KV Cache Compression without Off-Context Derailmentcited by 1
- 2026ARC-KV: Amortizing Anchor Search for Reconstruction-Based KV Cache Compactioncited by 1
- 2026Monte Carlo Estimation for KV Cache Evictioncited by 1
- 2026Discovering KV Cache Eviction Policies via LLM-Guided Program Evolutioncited by 0
- 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choicescited by 0
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cachecited by 0
- 2026The Optimization Landscape of Learning Compacted Context Modelscited by 0
- 2026KVFetch: Temporal Prefetching for the Missing Half of KV Cache Compressioncited by 0
- 2026Monte Carlo Estimation for KV Cache Eviction6 Oct 2026
- 2026The Optimization Landscape of Learning Compacted Context Models5 Oct 2026
- 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choices29 Sep 2026
- 2026ARC-KV: Amortizing Anchor Search for Reconstruction-Based KV Cache Compaction29 Sep 2026
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cache28 Sep 2026
- 2026Cartridges++: KV Cache Compression without Off-Context Derailment28 Sep 2026
- 2026KVFetch: Temporal Prefetching for the Missing Half of KV Cache Compression23 Sep 2026
- 2026Language Models Can Control Their Own Attention2 Sep 2026
- 2026Adaptive Filtering of the KV Cache: Diagnosing and Correcting Structural-Role Bias in LLM Inference14 Jul 2026
- 2026Still: Amortized KV Cache Compaction in a Single Forward Pass5 Jun 2026
- 2026AURA: Action-Gated Memory for Robot Policies at Constant VRAM1 Jun 2026
- 2026Discovering KV Cache Eviction Policies via LLM-Guided Program Evolution12 May 2026
Similar, not cited
Close in wording, no citation either way
- 2026MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference
- 2026DistillCache: KL-Guided Adaptive KV-Cache Eviction for Memory-Efficient LLM Inference
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction
- 2026ForesightKV: Optimizing KV Cache Eviction for Reasoning Models by Learning Long-Term Contribution
- 2024NACL: A General and Effective KV Cache Eviction Framework for LLMs at Inference Time
- 2025G-KV: Decoding-Time KV Cache Eviction with Global Attention
- 2026Reformulating KV Cache Eviction Problem for Long-Context LLM Inference
- 2026Behavior-Preserving KV Cache Compression