CompressKV: Semantic Retrieval Heads Know What Tokens are Not Important Before Generation
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Recent advances in large language models (LLMs) have significantly boosted long-context processing. However, the increasing key-value (KV) cache size poses critical challenges to memory and execution efficiency. Most KV cache compression methods rely on heuristic token eviction using all attention heads in Grouped Query Attention (GQA)-based LLMs. This method ignores the different functionalities of attention heads, leading to the eviction of critical tokens and thus degrades the performance of LLMs. To address the issue above, instead of using all the attention heads in GQA-based LLMs to determine important tokens as in the previous work, we first identify the attention heads in each layer that are not only capable of retrieving the initial and final tokens of a prompt, but also capable of retrieving important tokens within the text and attending to their surrounding semantic context. Afterwards, we exploit such heads to determine the important tokens and retain their corresponding KV cache pairs. Furthermore, we analyze the cache eviction error of each layer individually and introduce a layer-adaptive KV cache allocation strategy. Experimental results demonstrate the proposed CompressKV consistently outperforms state-of-the-art approaches under various memory budgets on LongBench and Needle-in-a-Haystack benchmarks. Our code is publicly available at: https://github.com/TUDa-HWAI/CompressKV.git.
Key facts. Cited by 9 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 15 of its 23 references that are in the map. First posted on arXiv 4 Aug 2025.
Builds on
15 of 23 references.
Closest ancestors · 6
Same direction, newest first
- 2025CAKE: Cascading and Adaptive KV Cache Eviction with Layer Preferences16 Mar
- 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Heads14 Oct
- 2024PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM Inference21 May
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May
Other references · 9
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2024Qwen2.5 Technical Reportcited by 4,713
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2022In-context Learning and Induction Headscited by 930
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 604
- 2022A Fast Post-Training Pruning Framework for Transformerscited by 161
- 2024Basis Sharing: Cross-Layer Parameter Sharing for Large Language Model Compressioncited by 34
Built on by
Citing papers per year: 2025: 1; 2026: 8.
9 papers.
- 2026KV Packet: Recomputation-Free Context-Independent KV Caching for LLMscited by 10
- 2026RedKnot: Efficient Long-Context LLM Serving with Head-Aware KV Reuse and SegPagedAttentioncited by 6
- 2025TPLA: Tensor Parallel Latent Attention for Efficient Disaggregated Prefill and Decode Inferencecited by 1
- 2026Adaptive Filtering of the KV Cache: Diagnosing and Correcting Structural-Role Bias in LLM Inferencecited by 1
- 2026RippleKV: Cross-Layer KV Cache Allocation via Perturbation Propagationcited by 1
- 2026Trust the Mass: Forced Weights in KV-Cache Evictioncited by 1
- 2026Dustin: Draft-Augmented Sparse Verification for Efficient Long-Context Generation with Speculative Decodingcited by 0
- 2026Logit-Contribution Scoring Identifies Non-Literal Retrieval Headscited by 0
- 2026Training-Free Hashing-Based Attention via Binary Principal Componentscited by 0
- 2026Trust the Mass: Forced Weights in KV-Cache Eviction25 Aug 2026
- 2026RippleKV: Cross-Layer KV Cache Allocation via Perturbation Propagation9 Aug 2026
- 2026Training-Free Hashing-Based Attention via Binary Principal Components5 Aug 2026
- 2026Adaptive Filtering of the KV Cache: Diagnosing and Correcting Structural-Role Bias in LLM Inference14 Jul 2026
- 2026Logit-Contribution Scoring Identifies Non-Literal Retrieval Heads1 Jul 2026
- 2026Dustin: Draft-Augmented Sparse Verification for Efficient Long-Context Generation with Speculative Decoding23 Jun 2026
- 2026RedKnot: Efficient Long-Context LLM Serving with Head-Aware KV Reuse and SegPagedAttention4 Jun 2026
- 2026KV Packet: Recomputation-Free Context-Independent KV Caching for LLMs14 Apr 2026
- 2025TPLA: Tensor Parallel Latent Attention for Efficient Disaggregated Prefill and Decode Inference21 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2024RazorAttention: Efficient KV Cache Compression Through Retrieval Heads
- 2026CompressKV: Semantic-Retrieval-Guided KV-Cache Compression for Resource-Efficient Long-Context LLM Inference
- 2024ClusterKV: Manipulating LLM KV Cache in Semantic Space for Recallable Compression
- 2025CTkvr: KV Cache Retrieval for Long-Context LLMs via Centroid then Token Indexing
- 2024Effectively Compress KV Heads for LLM
- 2025Key, Value, Compress: A Systematic Exploration of KV Cache Compression Techniques
- 2024Compressing KV Cache for Long-Context LLM Inference with Inter-Layer Attention Similarity
- 2024Not All Heads Matter: A Head-Level KV Cache Compression Method with Integrated Retrieval and Reasoning