acceptodds
Under review as a conference paper at ICLR 2027

The KV Cache as a Rotary Associative Memory

Abstract

KV cache compression is standard practice in long-context inference. Existing compression methods are validated by benchmarking after the fact, providing no a-priori guarantee on retrieval performance. Across ten models and four compression methods, retrieval accuracy falls by 41% on average, while zero-shot accuracy falls by 2% and perplexity rises by 19%. To understand the structure responsible, we formulate every attention read from the KV cache under rotary position embeddings (RoPE) as an exact retrieval from an associative memory, whose stored addresses are related across read times by a unitary representation of time translation at a fixed spectrum of frequencies. We term this view a rotary associative memory (RoAM). The representation decomposes the cache into frequency bands and gives closed forms for how far a head can retrieve (retrieval range), how many entries it separates at that distance (capacity at distance), and where distinct positions become indistinguishable (positional aliasing). Using band-targeted perturbation, we show that retrieval at distance is carried by the slow bands. Removing an eighth of the slow bands raises perplexity to between and and drives retrieval to zero across RoPE bases from to , whereas removing an eighth of the fast bands leaves retrieval within of baseline. At matched perturbation norm, slow-band damage costs more retrieval accuracy on every model, while zero-shot accuracy moves by at most . Position-uniformity of the readout bounds the worst-case effect of any key edit at every future read position, with the edit-side factor computable at compression time and the query-side factor bounded from the model's weights. The bound is audited on 115 million measured perturbations from deployed reconstruction methods. Predicted attention-logit curves match measured ones head by head across the ten evaluated models, with coefficients estimated from activations and no parameters fitted to the curves (median detrended ), and aliasing distances predicted in advance from each configuration alone are reproduced to the integer.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.