English

How Much Cache Does Reasoning Need? Depth-Cache Tradeoffs in KV-Compressed Transformers

Machine Learning 2026-04-21 v1 Artificial Intelligence Computational Complexity

Abstract

The key-value (KV) cache is the dominant memory bottleneck during Transformer inference, yet little is known theoretically about how aggressively it can be compressed before multi-step reasoning degrades. We study this through kk-hop pointer chasing on nn tokens under a shared KV cache of size ss, attention dimension mm, HH heads, pp-bit precision, and a locality-respecting cache controller (satisfied by all standard KV-compression methods). We give three results. (1) Product depth lower bound (conjectured). We conjecture that any such Transformer (n4kn \geq 4k, sn/4s \leq \sqrt{n}/4) requires depth L=Ω(k/slog2n/(Hmp))L = \Omega(\lceil k/s \rceil \cdot \lceil \log_2 n/(Hmp) \rceil), and isolate the sole remaining gap as a probabilistic step on the joint distribution of cache trace and pointer chain. Unconditionally, we prove a matching upper bound L=O(min(k,k/slogs)logn/(mp))L = O(\min(k, \lceil k/s \rceil \log s) \cdot \log n/(mp)) via windowed pointer doubling, and a max-bound L=Ω(max(k/s,logn/(Hmp)))L = \Omega(\max(\lceil k/s \rceil, \log n/(Hmp))). Closing the conjecture amounts to upgrading max to product. (2) Bandwidth barrier. The product bound binds only when HmplognHmp \lesssim \log n. Any lower bound provable via per-window distinguishability counting -- including reachability, bandwidth, and combinations -- cannot exceed k/s\lceil k/s \rceil once Hmplog2nHmp \geq \log_2 n. Breaking this requires lifting unconditional communication-complexity bounds for pointer chasing to Cache-Transformer depth. (3) Adaptive vs oblivious error scaling. Under random cache over T=log2kT = \lceil \log_2 k \rceil doubling stages, oblivious caches give Pr[E](s/(nT))T+2T3/n\Pr[\mathcal{E}] \leq (s/(n-T))^T + 2T^3/n (exponential in TT), while adaptive locality-respecting caches achieve Pr[E]=s/n\Pr[\mathcal{E}] = s/n exactly, independent of TT. The Ω((n/s)T1)\Omega((n/s)^{T-1}) separation explains why heavy-hitter eviction empirically dominates random eviction for multi-hop reasoning.

Keywords

Cite

@article{arxiv.2604.17935,
  title  = {How Much Cache Does Reasoning Need? Depth-Cache Tradeoffs in KV-Compressed Transformers},
  author = {Xiao Wang},
  journal= {arXiv preprint arXiv:2604.17935},
  year   = {2026}
}
R2 v1 2026-07-01T12:17:50.868Z