Folding Attention Biases into Keys Makes Compacted KV Caches Run on Standard Kernels
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Attention Matching (AM) compacts a KV cache by keeping some keys per head, refitting their values and adding a bias to each kept key's logit. FlashAttention and vLLM's paged caches have no input for it. We fold the bias into the keys along one closed-form direction per head, fitted on context queries, giving a plain cache with AM's size and head dimension and the model's own query path; the output error is bounded by how far each query's projection on that direction is from 1. With equal per-head budgets, unmodified vLLM serves folded caches through a KV connector, matching Hugging Face's answers on all 51 Qwen3-4B questions and its greedy output on 180 of 200 Qwen3-14B LongBench samples. With equal budgets on QuALITY (Qwen3-1.7B, 4B, 8B, Llama-3.1-8B) and LongHealth (three Qwen3 models), the fold is within noise of AM's accuracy in 13 of 14 settings, with lower KL to the full cache than dropping the bias in all 12 where both ran. Under the published per-head budgets, on Qwen3-4B, its Instruct-2507 variant and Llama-3.1-8B, it is within noise of AM in 9 of 10, no longer beats dropping the bias in KL, and the two each win once in accuracy.
Key facts. Cited by 1 paper in the map (data through 24 Nov 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 26 of its 30 references that are in the map. Submitted 27 Oct 2026.
Builds on
26 of 30 references.
Closest ancestors · 16
Same direction, newest first
- 2026The KV-Surgeon: Compensation-Aware Offline KV-Cache Compaction19 Oct
- 2026ARC-KV: Amortizing Anchor Search for Reconstruction-Based KV Cache Compaction29 Sep
- 2026Beyond Sparse Weights: When Is Attention Compressible?21 Aug
- 2026ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compression31 Jul
- 2026MomentKV: Closing the Directional Gap in KV Cache Eviction for Long-Context Inference1 Jun
- 2026SelKV: Selective KV Cache Merging with Per-Token Merge-or-Drop and Attention Compensation19 May
- 2026SemantiCache: Efficient KV Cache Compression via Semantic Chunking and Clustered Merging15 Mar
- 2025Homogeneous Keys, Heterogeneous Values: Exploiting Local KV Cache Asymmetry for Long-Context LLMs4 Jun
- 2025KeepKV: Achieving Periodic Lossless KV Cache Compression for Efficient LLM Inference14 Apr
- 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMs13 Mar
- 2025FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Serving2 Jan
- 2024Model Tells You Where to Merge: Adaptive KV Cache Merging for LLMs on Long-Context Tasks11 Jul
4 more
- 2024D2O: Dynamic Discriminative Operations for Efficient Long-Context Inference of Large Language Models18 Jun
- 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Models23 May
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
Other references · 10
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,787
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,444
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,557
- 2022Token Merging: Your ViT But Fastercited by 1,142
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 747
- 2021QuALITY: Question Answering with Long Input Texts, Yes!cited by 230
- 2025FlashBias: Fast Computation of Attention with Biascited by 14
- 2026Practical Online KV Cache Compaction for LLM Agents: An Empirical Studycited by 6
- 2026Thought-Aware KV Cache Compaction for Reasoning via Adaptive Attention Matchingcited by 1
- 2026Latent Compaction with Test-Time Trainingcited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Fast KV Compaction via Attention Matching
- 2025Expected Attention: KV Cache Compression by Estimating Attention from Future Queries Distribution
- 2026Sparse Attention as a Range Searching Problem: Towards an Inference-Efficient Index for KV Cache
- 2026Translating KV Caches Between Hybrid-Attention Language Models: MLA Latents, Linear-Attention States and Sparse-Attention Indexers
- 2026KV2: A Self-Refining KV Cache
- 2026HeadQ: Model-Visible Distortion and Score-Space Correction for KV-Cache Quantization
- 2025Q-Filters: Leveraging QK Geometry for Efficient KV Cache Compression
- 2026Trust the Mass: Forced Weights in KV-Cache Eviction