Papers
arxiv:2611.39694

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

Published on Nov 29
· Submitted by
Tong Zhu
on Dec 1
Authors:
,
,
,
,
,
,
,
,
,
,

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.

Community

Paper submitter

12x KV cache compression, 28.4% FLOPs reduction, with equivalent or higher performance compared with the looped transformer baseline. All the magic comes from sharing the latent.

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend

Paper author

Could Transformers be repeatedly encoding information that only needs to be represented once?

We started with a mismatch in looped Transformers. They share weights across recursions, yet a 12-layer model run for four loops still keeps 48 KV histories under standard attention. When we widened Base sharing in a ~150M, 3B-token sweep, the cache shrank by 44% and validation NLL improved from 2.982 to 2.941. The strongest tested design writes one Base per token from its initial embedding, before the first attention layer.

TALA pairs that shared Base with a compact Stage for each layer execution. Layer-specific projections read both and add their content keys and values before a single causal softmax. The Stage changes as the hidden state evolves; the Base is available to every reader.

  • At ~450M parameters and 20B tokens, four-loop TALA uses ~1/12 of vanilla-LT’s persistent BF16 KV at 4K and 28.4% fewer training FLOPs, with better validation NLL and downstream means. Its matched-training-NLL compute efficiency is 1.92× in the stable phase. Against near-matched-cache LT-MLA, it improves all three quality metrics with about 7.2% more training FLOPs at equal tokens.
  • Across 92 allocations and four compute budgets, TALA lowers validation NLL in all 23 matched budget–depth comparisons against the three baselines. The fitted savings at validation NLL 2.65 are 23.7% vs. LT-MLA and 32.2% vs. LPT-MLA.
  • In the ~150M, 3B-token sweeps, two-loop TALA beats eight-loop LT-MLA on validation NLL using ~71% less training compute and about one-quarter of its KV. At four loops, nominal 36× TALA edges out nominal 6× LT-MLA on NLL.
  • At ~450M and 10B tokens in a non-loop Transformer, TALA beats eight tested attention configurations across validation NLL and both downstream means. At matched KV, NLL is 2.654 vs. 2.699 for MLA.

Our analysis suggests that the Base carries reusable token-specific matching features, while the Stage can specialize on context. Figure 3 shows the original sharing sweep, and Figure 4 shows how the compute-optimal comparison changes across budgets.

Paper v1 · Implementation and reproduction guide

Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2611.39694 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2611.39694 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2611.39694 in a Space README.md to link it from this page.

Collections including this paper 2