cs.LGFeb 18, 2026

Fast KV Compaction via Attention Matching

Authors: Adam Zweiger, Xinghong Fu, Han Guo, Yoon Kim

Organizations: Massachusetts Institute of Technology.

Abstract

Scaling language models to long contexts is often bottlenecked by the size of the key-value (KV) cache. In deployed settings, long contexts are typically managed through compaction in token space via summarization. However, summarization can be highly lossy, substantially harming downstream performance. Recent work on Cartridges has shown that it is possible to train highly compact KV caches in latent space that closely match full-context performance, but at the cost of slow and expensive end-to-end optimization. This work describes an approach for fast context compaction in latent space through Attention Matching, which constructs compact keys and values to reproduce attention outputs and preserve attention mass at a per-KV-head level. We show that this formulation naturally decomposes into simple subproblems, some of which admit efficient closed-form solutions. Within this framework, we develop a family of methods that significantly push the Pareto frontier of compaction time versus quality, achieving up to 50x compaction in seconds on some datasets with little quality loss.

Figures & tables

Appendix figures & tables14 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Still: Amortized KV Cache Compaction in a Single Forward Pass

    Jun 5, 2026Charles O'Neill, Alex Sandomirsky, Harry Partridge +2KV CachingLong-Context Language Model Inference

  2. Latent Compaction with Test-Time Training

    Oct 14, 2026Yingfa Chen, Xingyu Shen, Chaojun Xiao +1KV-Cache CompressionLong-Context Retrieval

  3. ARC-KV: Amortizing Anchor Search for Reconstruction-Based KV Cache Compaction

    Sep 29, 2026Zheyu Shen, Guanhua Wang, Dezhan Tu +5Long-Context Language ModelingKV-Cache Management