Breaking the KV Cache Bottleneck in Looped Transformers with Shared Token Latents
Abstract
Looped Transformers scale computational depth at a fixed parameter count, yet their key--value (KV) cache grows linearly with recursion depth under standard attention. Because recursions process the same sequence, their KV representations may encode shared and recursion-specific information. By learning memory-sharing policies during pretraining, we find that under simulated storage pressure, early KV representations are broadly reused while intermediate representations remain useful. This motivates separating KV representations into a shared base and compact stage-specific latents. Extending base sharing across physical layers improves model quality while reducing KV storage. We propose Token-Anchored Latent Attention (TALA), which derives a single base latent from each token's initial representation, shares it across all layers and recursions, and complements it with compact stage latents. Each physical layer decodes the base and current stage into keys and values and adds them before attention. Compared with vanilla looped Transformers in equal-token pretraining, TALA achieves approximately 12times KV cache compression and uses 28.4% fewer training FLOPs, while attaining lower validation NLL and higher mean scores on commonsense and RULER-NIAH benchmarks. Our IsoFLOPs scaling experiments demonstrate consistent superiority over all three baselines across budgets, with no predicted crossover in fitted compute-optimal frontiers. Training trajectories show that TALA achieves 1.92times the training compute efficiency of vanilla looped Transformers at a matched training NLL. Its advantages grow under aggressive KV compression and extend to conventional Transformers. Our mechanistic analyses suggest that shared token latents absorb reusable token-specific matching functions, reducing representational redundancy and freeing stage latent capacity for contextual information.
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper