Beyond Sparse Weights: When Is Attention Compressible?
Organizations: City University of Hong Kong · University of New South Wales
Abstract
KV-cache compression is often justified by attention maps with a few large weights. This is incomplete: large weights may not contain most of the mass, omitted values can cancel, and preserving the attention output may not preserve the task. We separate these questions. Global score gaps -- not threshold counts -- determine how many tokens are needed to retain a target mass. For a realized row, the weighted sum of omitted values is the exact missing statistic. A controlled retrieval--aggregation model explains when truncation helps and when it hurts. These results motivate CertKV, a training-free compressor that reserves one tail-summary slot per head and allocates the rest by value dispersion. Under matched budgets, CertKV is top-two in seven of nine LongBench-v2 settings, remains in the leading compressed tier on 128K RULER, and realizes a ten-fold cache budget in a packed Llama prototype. Compressibility depends on the mass, values, future queries, and task -- not on a sparse-looking map alone.
Figures & tables
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Persistent KV | Decode peak |
|---|---|---|
| Full cache ( ) | GB | GiB |
| CertKV ( ) | GB | GiB |
| Budget | Method | Single-Doc | Multi-Doc | ICL | Dialogue | Code | Structured | Avg. (503-wtd.) |
|---|---|---|---|---|---|---|---|---|
| Full cache | ||||||||
| SnapKV | ||||||||
| StreamingLLM | ||||||||
| PyramidKV | ||||||||
| Ada-KV | ||||||||
| CertKV |
| Budget | Method | Single-Doc | Multi-Doc | ICL | Dialogue | Code | Structured | Avg. (503-wtd.) |
|---|---|---|---|---|---|---|---|---|
| Full cache | ||||||||
| SnapKV | ||||||||
| StreamingLLM | ||||||||
| PyramidKV | ||||||||
| Ada-KV | ||||||||
| CertKV |
| Budget | Method | Single-Doc | Multi-Doc | ICL | Dialogue | Code | Structured | Avg. (503-wtd.) |
|---|---|---|---|---|---|---|---|---|
| Full cache | ||||||||
| SnapKV | ||||||||
| StreamingLLM | ||||||||
| PyramidKV | ||||||||
| Ada-KV | ||||||||
| CertKV |
KV-Cache Compression
Key-value cache compression reduces the memory and bandwidth needed to retain attention states during long-context inference.
See all 257 papers