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 Cheng
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 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 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.
Create a lesson
Related papers
Rectifying Latent Dynamics inside Looped Transformers
Shared title terminologycs.CLJizhihui Liu, Mingyue Guo, Jinpeng Wang et al.
DLA: Decomposed Latent Attention for Looped Language Models
Shared title terminologycs.CLZhenhe Wu, Weihua He, Xinlai Kang et al.
What Survives a Loop? A Shared Decision Model for Encoders and Decoders
Shared title terminologycs.CLYixin Peng, Stefan Decker
A Shared Future-Attention Direction in Key Space for KV Cache Eviction
Shared title terminologycs.CLHikaru Shijo, Yutaka Yoshihama
MoTA: Moment-Tilted Attention for Looped Transformers
Shared title terminologycs.CLLong Qian, Bingke Zhu, Yu Li et al.
PreLat: Prefill States as Latent Messages Between Model Families
Shared title terminologycs.CLZhen Lei, Jingyang He, Xin Shu et al.