KeyDiff: Key Similarity-Based KV Cache Eviction for Long-Context LLM Inference in Resource-Constrained Environments
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
We demonstrate that geometrically distinctive keys during LLM inference tend to have high attention scores. Based on the phenomenon we propose KeyDiff, a training-free KV cache eviction method based solely on key similarity. Unlike other KV cache eviction methods, KeyDiff can process arbitrarily long prompts within strict resource constraints and efficiently generate responses. We provide a theoretical basis for KeyDiff by relating key diversity with attention scores. These results imply KeyDiff can efficiently identify the most important tokens to retain. Notably KeyDiff does not rely on attention scores, allowing the use of optimized attention mechanisms like FlashAttention. Under a strict memory allowance, we demonstrate the effectiveness of KeyDiff for the Llama and Qwen model families by observing a performance gap of less than 0.04% with 8K cache budget (~23% KV cache reduction) from the non-evicting baseline on LongBench for Llama 3.1-8B and Llama 3.2-3B. We also observe near baseline performance for Deepseek-R1-Distill-Llama-8B on the Math500 reasoning benchmark and decrease end-to-end inference latency by up to 30% compared to the other token-eviction methods.
Key facts. Cited by 51 papers in the map (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 41 of its 46 references that are in the map. First posted on arXiv 21 Apr 2025.
Builds on
41 of 46 references.
Closest ancestors · 10
Same direction, newest first
- 2024KV-Compress: Paged KV-Cache Compression with Variable Compression Rates per Attention Head30 Sep
- 2024ThinK: Thinner Key Cache by Query-Driven Pruning30 Jul
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compression17 Jun
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference16 Jun
- 2024PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM Inference21 May
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2024No Token Left Behind: Reliable KV Cache Compression via Importance-Aware Mixed Precision Quantization28 Feb
- 2023SparQ Attention: Bandwidth-Efficient LLM Inference8 Dec
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
Other references · 31
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2020Longformer: The Long-Document Transformercited by 3,413
19 more
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020GLU Variants Improve Transformercited by 1,804
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 637
- 2024KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache Quantizationcited by 591
- 2024Massive Activations in Large Language Modelscited by 294
- 2024MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Casescited by 223
- 2023SARATHI: Efficient LLM Inference by Piggybacking Decodes with Chunked Prefillscited by 193
- 2023LLM in a flash: Efficient Large Language Model Inference with Limited Memorycited by 177
- 2025Why do LLMs attend to the first token?cited by 127
- 2024Transformers are Multi-State RNNscited by 120
- 2024DeepSpeed-FastGen: High-throughput Text Generation for LLMs via MII and DeepSpeed-Inferencecited by 106
- 2024GPTVQ: The Blessing of Dimensionality for LLM Quantizationcited by 82
- 2024KV Cache is 1 Bit Per Channel: Efficient Large Language Model Inference with Coupled Quantizationcited by 76
- 2024Anisotropy Is Inherent to Self-Attention in Transformerscited by 63
- 2024SampleAttention: Near-Lossless Acceleration of Long Context LLM Inference with Adaptive Structured Sparse Attentioncited by 39
- 2024Direct Alignment of Draft Model for Speculative Decoding with Chat-Fine-Tuned LLMscited by 22
Built on by
Citing papers per year: 2025: 12; 2026: 39.
51 papers.
Sort:
By area:
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distributioncited by 74
- 2025InfiniPot-V: Memory-Constrained KV Cache Compression for Streaming Video Understandingcited by 58
- 2025StreamMem: Query-Agnostic KV Cache Memory for Streaming Video Understandingcited by 58
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMscited by 19
- 2025Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scorescited by 17
- 2025The Pitfalls of KV Cache Compressioncited by 15
- 2026Learning to Evict from Key-Value Cachecited by 14
- 2026Self-Compacting Language Model Agentscited by 11
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Servingcited by 10
- 2026LookaheadKV: Fast and Accurate KV Cache Eviction by Glimpsing into the Future without Generationcited by 10
- 2025KaVa: Latent Reasoning via Compressed KV-Cache Distillationcited by 8
- 2025PagedEviction: Structured Block-wise KV Cache Pruning for Efficient Large Language Model Inferencecited by 7
38 more
- 2025EpiCache: Episodic KV Cache Management for Long-Term Conversation on Resource-Constrained Environmentscited by 7
- 2026IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inferencecited by 7
- 2026Predicting Future Utility: Global Combinatorial Optimization for Task-Agnostic KV Cache Evictioncited by 6
- 2026MomentKV: Closing the Directional Gap in KV Cache Eviction for Long-Context Inferencecited by 6
- 2026Rethinking KV Cache Eviction via a Unified Information-Theoretic Objectivecited by 5
- 2026A Simple Plug-in for Improving Eviction-Based KV Cache Compressioncited by 4
- 2026AVIS: Adaptive Test-Time Scaling for Vision-Language Modelscited by 4
- 2026QUOKA: Query-Oriented KV Selection For Efficient LLM Prefillcited by 3
- 2026ParisKV: Fast and Drift-Robust KV-Cache Retrieval for Long-Context LLMscited by 2
- 2026ManifoldKV: Training-Free KV Cache Compression via Euclidean Outlier Detectioncited by 2
- 2026Neural Garbage Collection: Learning to Forget while Learning to Reasoncited by 2
- 2026HARD-KV: Head-Adaptive Regularization for Decoding-time KV Compressioncited by 2
- 2026KARA: Efficient Reasoning LLM Serving via Sliding-Window KV Cache Compressioncited by 2
- 2025Efficient On-Device Agents via Adaptive Context Managementcited by 1
- 2026Fast Forward: Accelerating LLM Prefill with Predictive FFN Sparsitycited by 1
- 2026CHESS: Context-aware Hierarchical Efficient Semantic Selection for Long-Context LLM Inferencecited by 1
- 2026KVDiagnosis: A Diagnostic Benchmark for KV-Cache Compression in Long-Context Language Modelscited by 1
- 2026Random Attention: Rethinking KV Cache Eviction for Efficient Reasoningcited by 1
- 2026EchoPress: Query-Agnostic KV Cache Pruning via Virtual Context Reconstructioncited by 1
- 2025Leveraging KV Similarity for Online Structured Pruning in LLMscited by 0
- 2026ConFu: Contemplate the Future for Better Speculative Samplingcited by 0
- 2026Reducing Peak Memory Usage for Modern Multimodal Large Language Model Pipelinescited by 0
- 2026Head-Aware Key-Value Compression for Efficient Autoregressive Image Generationcited by 0
- 2026Express Language Modelingcited by 0
- 2026How Query Visibility Changes KV-Cache Compression Rankings: A Matched-Budget Auditcited by 0
- 2026CommitKV: Lifecycle-Aware KV Cache Compression via Commit Transitions for Multi-Turn Agentscited by 0
- 2026DistillCache: KL-Guided Adaptive KV-Cache Eviction for Memory-Efficient LLM Inferencecited by 0
- 2026Sigmoid Attention as a Better Substrate for Learned KV Cache Evictioncited by 0
- 2026BeaconKV: Key-Value Cache Compression Guided by Beacon Queries for Efficient Large Reasoning Model Inferencecited by 0
- 2026ECOKV: Geometry-Aware KV Cache Eviction via Complementary Diversity Metricscited by 0
- 2026Jacap: Robust KV Cache Eviction via Jacobian-Based Nonlinear Information Capacity Preservationcited by 0
- 2026ValueDiff: Value-Geometric KV Cache Eviction for Sink-Suppressed LLMscited by 0
- 2026DeltaS: Reading the Gated Linear Attention State for KV Cache Eviction in Streaming Videocited by 0
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cachecited by 0
- 2026TPBench: A Turning-Point Benchmark for Dialogue Compressioncited by 0
- 2026AttSVD:Prompt-Adaptive Low-Rank KV Cache Compression via Attention-Guided SVDcited by 0
- 2026A Self-Pruning Transformer: Extreme KV-Cache Compression with Universal Attentioncited by 0
- 2026Rehearse Everything, Remember Nothing: Attic-KV Rehearses What Will Be Readcited by 0
50 most cited of 51 All 51 (JSON)
- 2026GateSight: Recurrent Memory Anticipates Attention Memory for Query-Agnostic KV Eviction in Hybrid LLMs10 Oct 2026
- 2026Rehearse Everything, Remember Nothing: Attic-KV Rehearses What Will Be Read8 Oct 2026
- 2026A Self-Pruning Transformer: Extreme KV-Cache Compression with Universal Attention6 Oct 2026
- 2026AttSVD:Prompt-Adaptive Low-Rank KV Cache Compression via Attention-Guided SVD3 Oct 2026
- 2026TPBench: A Turning-Point Benchmark for Dialogue Compression2 Oct 2026
- 2026EchoPress: Query-Agnostic KV Cache Pruning via Virtual Context Reconstruction30 Sep 2026
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cache28 Sep 2026
- 2026DeltaS: Reading the Gated Linear Attention State for KV Cache Eviction in Streaming Video23 Sep 2026
- 2026ValueDiff: Value-Geometric KV Cache Eviction for Sink-Suppressed LLMs20 Sep 2026
- 2026Jacap: Robust KV Cache Eviction via Jacobian-Based Nonlinear Information Capacity Preservation8 Sep 2026
- 2026ECOKV: Geometry-Aware KV Cache Eviction via Complementary Diversity Metrics6 Sep 2026
- 2026BeaconKV: Key-Value Cache Compression Guided by Beacon Queries for Efficient Large Reasoning Model Inference4 Sep 2026
38 more
- 2026Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning3 Sep 2026
- 2026Sigmoid Attention as a Better Substrate for Learned KV Cache Eviction24 Aug 2026
- 2026KVDiagnosis: A Diagnostic Benchmark for KV-Cache Compression in Long-Context Language Models10 Aug 2026
- 2026DistillCache: KL-Guided Adaptive KV-Cache Eviction for Memory-Efficient LLM Inference9 Aug 2026
- 2026CommitKV: Lifecycle-Aware KV Cache Compression via Commit Transitions for Multi-Turn Agents8 Aug 2026
- 2026How Query Visibility Changes KV-Cache Compression Rankings: A Matched-Budget Audit11 Jul 2026
- 2026HARD-KV: Head-Adaptive Regularization for Decoding-time KV Compression27 Jun 2026
- 2026Self-Compacting Language Model Agents22 Jun 2026
- 2026AVIS: Adaptive Test-Time Scaling for Vision-Language Models10 Jun 2026
- 2026Express Language Modeling9 Jun 2026
- 2026MomentKV: Closing the Directional Gap in KV Cache Eviction for Long-Context Inference1 Jun 2026
- 2026IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inference25 May 2026
- 2026A Simple Plug-in for Improving Eviction-Based KV Cache Compression22 May 2026
- 2026Head-Aware Key-Value Compression for Efficient Autoregressive Image Generation20 May 2026
- 2026KARA: Efficient Reasoning LLM Serving via Sliding-Window KV Cache Compression1 May 2026
- 2026Rethinking KV Cache Eviction via a Unified Information-Theoretic Objective28 Apr 2026
- 2026Neural Garbage Collection: Learning to Forget while Learning to Reason20 Apr 2026
- 2026Reducing Peak Memory Usage for Modern Multimodal Large Language Model Pipelines17 Apr 2026
- 2026LookaheadKV: Fast and Accurate KV Cache Eviction by Glimpsing into the Future without Generation11 Mar 2026
- 2026ConFu: Contemplate the Future for Better Speculative Sampling9 Mar 2026
- 2026CHESS: Context-aware Hierarchical Efficient Semantic Selection for Long-Context LLM Inference24 Feb 2026
- 2026Learning to Evict from Key-Value Cache10 Feb 2026
- 2026QUOKA: Query-Oriented KV Selection For Efficient LLM Prefill9 Feb 2026
- 2026Predicting Future Utility: Global Combinatorial Optimization for Task-Agnostic KV Cache Eviction9 Feb 2026
- 2026ManifoldKV: Training-Free KV Cache Compression via Euclidean Outlier Detection9 Feb 2026
- 2026ParisKV: Fast and Drift-Robust KV-Cache Retrieval for Long-Context LLMs7 Feb 2026
- 2026Fast Forward: Accelerating LLM Prefill with Predictive FFN Sparsity30 Jan 2026
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Serving16 Dec 2025
- 2025Leveraging KV Similarity for Online Structured Pruning in LLMs8 Dec 2025
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMs3 Dec 2025
- 2025KaVa: Latent Reasoning via Compressed KV-Cache Distillation2 Oct 2025
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distribution1 Oct 2025
- 2025The Pitfalls of KV Cache Compression30 Sep 2025
- 2025Efficient On-Device Agents via Adaptive Context Management24 Sep 2025
- 2025EpiCache: Episodic KV Cache Management for Long-Term Conversation on Resource-Constrained Environments22 Sep 2025
- 2025PagedEviction: Structured Block-wise KV Cache Pruning for Efficient Large Language Model Inference4 Sep 2025
- 2025StreamMem: Query-Agnostic KV Cache Memory for Streaming Video Understanding21 Aug 2025
- 2025Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scores10 Jul 2025
50 newest of 51 All 51 (JSON)
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distributioncited by 74
- 2025InfiniPot-V: Memory-Constrained KV Cache Compression for Streaming Video Understandingcited by 58
- 2025Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMscited by 19
- 2025Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scorescited by 17
- 2025The Pitfalls of KV Cache Compressioncited by 15
- 2026Learning to Evict from Key-Value Cachecited by 14
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Servingcited by 10
- 2026LookaheadKV: Fast and Accurate KV Cache Eviction by Glimpsing into the Future without Generationcited by 10
- 2025PagedEviction: Structured Block-wise KV Cache Pruning for Efficient Large Language Model Inferencecited by 7
- 2025EpiCache: Episodic KV Cache Management for Long-Term Conversation on Resource-Constrained Environmentscited by 7
- 2026IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inferencecited by 7
- 2026Predicting Future Utility: Global Combinatorial Optimization for Task-Agnostic KV Cache Evictioncited by 6
12 most cited of 32 All 32 (JSON)
- 2026A Self-Pruning Transformer: Extreme KV-Cache Compression with Universal Attention6 Oct 2026
- 2026AttSVD:Prompt-Adaptive Low-Rank KV Cache Compression via Attention-Guided SVD3 Oct 2026
- 2026EchoPress: Query-Agnostic KV Cache Pruning via Virtual Context Reconstruction30 Sep 2026
- 2026CORE: COverage CAlibration and Evicted-Mass REdistribution for KV Cache28 Sep 2026
- 2026DeltaS: Reading the Gated Linear Attention State for KV Cache Eviction in Streaming Video23 Sep 2026
- 2026ValueDiff: Value-Geometric KV Cache Eviction for Sink-Suppressed LLMs20 Sep 2026
- 2026Jacap: Robust KV Cache Eviction via Jacobian-Based Nonlinear Information Capacity Preservation8 Sep 2026
- 2026Sigmoid Attention as a Better Substrate for Learned KV Cache Eviction24 Aug 2026
- 2026KVDiagnosis: A Diagnostic Benchmark for KV-Cache Compression in Long-Context Language Models10 Aug 2026
- 2026DistillCache: KL-Guided Adaptive KV-Cache Eviction for Memory-Efficient LLM Inference9 Aug 2026
- 2026CommitKV: Lifecycle-Aware KV Cache Compression via Commit Transitions for Multi-Turn Agents8 Aug 2026
- 2026How Query Visibility Changes KV-Cache Compression Rankings: A Matched-Budget Audit11 Jul 2026
12 newest of 32 All 32 (JSON)
- 2025KaVa: Latent Reasoning via Compressed KV-Cache Distillationcited by 8
- 2026Rethinking KV Cache Eviction via a Unified Information-Theoretic Objectivecited by 5
- 2026AVIS: Adaptive Test-Time Scaling for Vision-Language Modelscited by 4
- 2026Neural Garbage Collection: Learning to Forget while Learning to Reasoncited by 2
- 2026KARA: Efficient Reasoning LLM Serving via Sliding-Window KV Cache Compressioncited by 2
- 2026Random Attention: Rethinking KV Cache Eviction for Efficient Reasoningcited by 1
- 2026BeaconKV: Key-Value Cache Compression Guided by Beacon Queries for Efficient Large Reasoning Model Inferencecited by 0
- 2026BeaconKV: Key-Value Cache Compression Guided by Beacon Queries for Efficient Large Reasoning Model Inference4 Sep 2026
- 2026Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning3 Sep 2026
- 2026AVIS: Adaptive Test-Time Scaling for Vision-Language Models10 Jun 2026
- 2026KARA: Efficient Reasoning LLM Serving via Sliding-Window KV Cache Compression1 May 2026
- 2026Rethinking KV Cache Eviction via a Unified Information-Theoretic Objective28 Apr 2026
- 2026Neural Garbage Collection: Learning to Forget while Learning to Reason20 Apr 2026
- 2025KaVa: Latent Reasoning via Compressed KV-Cache Distillation2 Oct 2025
- 2026Self-Compacting Language Model Agentscited by 11
- 2026Self-Compacting Language Model Agents22 Jun 2026
- 2026QUOKA: Query-Oriented KV Selection For Efficient LLM Prefillcited by 3
- 2026Fast Forward: Accelerating LLM Prefill with Predictive FFN Sparsitycited by 1
- 2025Leveraging KV Similarity for Online Structured Pruning in LLMscited by 0
- 2026Head-Aware Key-Value Compression for Efficient Autoregressive Image Generationcited by 0
- 2026Express Language Modelingcited by 0
- 2026TPBench: A Turning-Point Benchmark for Dialogue Compressioncited by 0
- 2026Rehearse Everything, Remember Nothing: Attic-KV Rehearses What Will Be Readcited by 0
- 2026GateSight: Recurrent Memory Anticipates Attention Memory for Query-Agnostic KV Eviction in Hybrid LLMscited by 0
- 2026GateSight: Recurrent Memory Anticipates Attention Memory for Query-Agnostic KV Eviction in Hybrid LLMs10 Oct 2026
- 2026Rehearse Everything, Remember Nothing: Attic-KV Rehearses What Will Be Read8 Oct 2026
- 2026TPBench: A Turning-Point Benchmark for Dialogue Compression2 Oct 2026
- 2026Express Language Modeling9 Jun 2026
- 2026Head-Aware Key-Value Compression for Efficient Autoregressive Image Generation20 May 2026
- 2026QUOKA: Query-Oriented KV Selection For Efficient LLM Prefill9 Feb 2026
- 2026Fast Forward: Accelerating LLM Prefill with Predictive FFN Sparsity30 Jan 2026
- 2025Leveraging KV Similarity for Online Structured Pruning in LLMs8 Dec 2025
Similar, not cited
Close in wording, no citation either way
- 2026Reformulating KV Cache Eviction Problem for Long-Context LLM Inference
- 2025LLMs Know What to Drop: Self-Attention Guided KV Cache Eviction for Efficient Long-Context Inference
- 2026Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction
- 2026Fast KVzip: Efficient and Accurate LLM Inference with Gated KV Eviction
- 2026CompressKV: Semantic-Retrieval-Guided KV-Cache Compression for Resource-Efficient Long-Context LLM Inference
- 2024Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
- 2025SmallKV: Small Model Assisted Compensation of KV Cache Compression for Efficient LLM Inference
- 2024NACL: A General and Effective KV Cache Eviction Framework for LLMs at Inference Time