Breaking the KV Cache Bottleneck in Looped Transformers with Shared Token Latents

Dehong Zheng, Tong Zhu, Yunkai Chai, Xiaoyang Chen, Zefeng He, Zhe Xu, Xuyang Hu, Xinyu Zhang, Zongliang Wu, Zhongzhi Zhang, Yafu Li, Yu ChengarXiv 2026

TL;DR

Looped Transformers let a small set of neural network weights "think longer" by running inputs through the same layers multiple times, but this normally causes inference memory (the KV cache) to balloon linearly with every loop. This paper introduces Token-Anchored Latent Attention (TALA), an architecture that anchors memory around a single, shared representation of each token's initial identity alongside tiny, loop-specific updates. The result is a model that slashes KV cache memory by ~12×, trains nearly twice as fast, and actually improves reasoning and retrieval accuracy—both in looped models and standard Transformers.

What Problem Does This Paper Address?

Suppose you want a smarter language model without paying the memory cost of storing billions of extra parameters. Looped Transformers achieve this by taking a stack of layers and cycling the hidden states through them multiple times (recursions). A 12-layer model looped 4 times has the parameter footprint of 12 layers, but the computational depth of 48.

Here is the catch: during text generation, Transformers store past Keys and Values (the KV cache) so they don't have to recompute history at every step. Because a token's internal representation evolves with each loop, standard attention saves a brand-new KV cache for every layer at every loop. Your 12-layer model suddenly demands 48 layers' worth of KV cache. At long contexts or large batch sizes, this memory bottleneck wipes out the whole point of sharing weights. Prior attempts to share caches across loops often restricted later loops to short, local sliding windows, blinding deeper "thoughts" to distant context.

Methods

Before designing an architecture, the authors ran a diagnostic experiment: they let a looped Transformer learn how to mix KV caches from earlier loops while applying a differentiable "storage penalty" to simulate memory pressure.

Figure 2: Causal memory access and learned reuse. (a) Recursion r can read KV banks from recursions s ≤r. (b,c) Mean key-mixture weights with λ = 0 and 0.04, respectively. Rows denote readers and columns denote writers. Both models retain all four banks.

Under pressure, later loops leaned heavily on the first loop's KV cache, yet refused to abandon intermediate loops entirely. Clearly, early representations hold reusable foundational info, while later loops add compact refinements.

Building on Multi-head Latent Attention (MLA)—a standard technique that compresses Keys and Values into low-dimensional vectors ("latents")—the authors pushed this sharing idea to its logical extreme. What if the shared base wasn't just shared across loops, or neighboring layers, but across the entire network?

Figure 1: Token-anchored latent attention. A token-derived base is shared across layers and recursions (left). Each layer execution adds its decoded base and stage keys and values before attention (right). Projection weights are shared across recursions. The figure shows the content pathway.

They propose Token-Anchored Latent Attention (TALA):

  1. Shared Base Latent: Right at the start—before any attention layers—each token's initial embedding is projected into a single, relatively wide "base latent" ($\mathbf{b}$) shared across all physical layers and all loops.
  2. Compact Stage Latents: At every layer execution during every loop, the model computes a tiny, dynamic "stage latent" ($\mathbf{s}_\ell^{(r)}$)—typically one-quarter the width of the base—from the evolving hidden state.
  3. Additive Decoding: Each physical layer uses its own projection matrices (reused across loops) to decode both the global base and the current stage latent into Keys and Values, simply adding them together before running causal attention.

Datasets

  • Pretraining: Models were pretrained from scratch on FineWeb-Edu (at a 4,096-token context length), scaling up to 20B tokens. No new benchmarks were introduced.
  • Evaluation: Zero-shot reasoning and language modeling were tested on nine standard benchmarks via the LM Evaluation Harness: LAMBADA (OpenAI & Standard), HellaSwag, PIQA, WinoGrande, ARC (Easy & Challenge), SciQ, and MMLU-continuation. Long-context retrieval was tested on six Needle-in-a-Haystack tasks from RULER (RULER-NIAH) at 4K context.

Key Insights and Ideas

  • Less cache, better brains: Extending the shared base latent from 1 layer to all 12 layers didn't cause a quality trade-off; it dropped validation loss (from 2.982 to 2.941) while cutting KV cache size by 44%.
  • Spontaneous division of labor: Why does full-stack sharing improve quality? Through mechanistic analysis, the authors found that in standard models, deep layers waste precious capacity repeatedly re-encoding basic "what word am I?" identity features. In TALA, the shared token-anchored base absorbs static token-matching duties, freeing the tiny stage latents to specialize purely in contextual nuance—mathematically acting as an exponential reweighting of the base attention distribution.
  • It's not just for loops: Because layer-to-layer redundancy exists in conventional networks too, TALA works out-of-the-box on standard, single-pass Transformers ($R=1$), outperforming popular compression methods like Grouped-Query Attention (GQA) and standard MLA.

Key Results

  • 12× Compression with Higher Quality: In 450M-parameter looped models trained on 20B tokens, TALA achieves 11.93× KV cache compression and uses 28.4% fewer training FLOPs than a vanilla Looped Transformer, while beating it on validation loss (2.511 vs. 2.538), commonsense reasoning (+1.20 points), and RULER-NIAH retrieval (80.74% vs. 73.81%).
  • Compute-Optimal Scaling: Across IsoFLOPs budgets ($3 \times 10^{18}$ to $10^{20}$ FLOPs), TALA's scaling frontier beats all baselines with no predicted crossover. Along training trajectories, it reaches matched loss 1.92× faster (in FLOPs) than vanilla looped models.
  • Extreme Compression: TALA compressed by 36× still achieves a lower validation loss than standard looped MLA compressed by just 6×—matching quality at one-sixth the memory.
  • Standard Transformers: On non-loop 450M models, TALA compresses the KV cache by 7.89× relative to standard Multi-Head Attention while boosting RULER-NIAH retrieval by 12.73 percentage points (71.70% vs. 58.97%).

Limitations and Future Work

While the authors do not include a standalone limitations section, boundary conditions are evident in the experiments: models were tested at moderate academic scales (up to ~600M parameters in standard setups, 20B training tokens, and 4,096 context lengths). Additionally, when compared against massive multi-billion-parameter token-lookup tables (like MemAtten), TALA trails slightly in raw validation loss, though it wins handily on retrieval and parameter efficiency. For future work, the authors suggest exploring adaptive memory allocation across computational depth, scaling recurrent computation even further under tight memory budgets, and bringing shared latent memories into multimodal architectures.

Summary updated

BibTeX
@misc{zheng2026breaking,
  author = {Dehong Zheng and Tong Zhu and Yunkai Chai and Xiaoyang Chen and Zefeng He and Zhe Xu and Xuyang Hu and Xinyu Zhang and Zongliang Wu and Zhongzhi Zhang and Yafu Li and Yu Cheng},
  title = {{Breaking the KV Cache Bottleneck in Looped Transformers with Shared Token Latents}},
  year = {2026},
  eprint = {2611.39694},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.39694},
}
Figure