AttSVD is a training-free method that compresses the key-value (KV) cache in autoregressive transformers by storing all tokens in a low-rank form rather than evicting some. It performs an online, per-prompt truncated SVD guided by each prompt's attention geometry, keeping only the directions attention actually reads. This reduces persistent per-head KV memory proportionally to the retained rank. The method matches the accuracy of a full cache on the LongBench suite and an agentic benchmark while using up to half the memory.
Unlike eviction methods that irreversibly drop tokens, AttSVD retains every token but stores them more cheaply along the feature axis. This avoids the risk of losing information from wrongly evicted tokens. The approach is calibration-free and adapts to each prompt, with two decode-time caching strategies: an accumulating mode for short decodes and a streaming mode for long generations that compresses aged-out tokens into thin blocks.
The key innovation is that the basis is derived from the prompt's own activations, making it provably optimal for that prompt. Additionally, the factors provide free interpretability, revealing per-head effective rank and attention focus without extra computation.