KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelity

Damien Lesens, Beheshteh T. Rakhshan, Guillaume Rabusseau
12/5/2025
cs.LG

No official code found. Best implementation: DamienLesens/KQ-SVD (0 stars, last commit 2025-10-09).

Abstract

The Key-Value (KV) cache is central to the efficiency of transformer-based large language models (LLMs), storing previously computed vectors to accelerate inference. Yet, as sequence length and batch size grow, the cache becomes a major memory bottleneck. Prior compression methods typically apply low-rank decomposition to keys alone or attempt to jointly embed queries and keys, but both approaches neglect that attention fundamentally depends on their inner products. In this work, we prove that such strategies are suboptimal for approximating the attention matrix. We introduce KQ-SVD, a simple and computationally efficient method that directly performs an optimal low-rank decomposition of the attention matrix via a closed-form solution. By targeting the true source of redundancy, KQ-SVD preserves attention outputs with higher fidelity under compression. Extensive evaluations on LLaMA and Mistral models demonstrate that our approach consistently delivers superior projection quality.

View on arXivView PDF

Code Implementations(1)

Repository for the paper "KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelity"

00Python, Jupyter NotebookOct 2, 20251 years ago

Cite this paper

@article{lesens2025kqsvd,
  title  = {KQ-SVD: Compressing the KV Cache with Provable Guarantees on Attention Fidelity},
  author = {Damien Lesens and Beheshteh T. Rakhshan and Guillaume Rabusseau},
  year   = {2025},
  eprint = {2512.05916},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.05916v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.05916.svg)](https://codeofpaper.com/paper/2512.05916)

Discussion