Rectifying Latent Dynamics inside Looped Transformers
Jizhihui Liu, Mingyue Guo, Jinpeng Wang, Lu Wang, Yaowei Wang
Abstract
Looped transformers iteratively refine token representations in the hidden space, providing a promising way for latent reasoning. However, the test-time scaling of looped transformers is limited by the overthinking issue: the performance first peaks and then drops with the growth of loop iterations. We analyse the latent dynamics and identify two potential causes for this phenomenon: 1) an excessively large update in the first loop directly leads tokens into the wrong space; 2) the persistent and stochastic late-stage drift pushes the tokens from right to wrong. To address these issues, we propose Rectifying Latent Dynamics (RLD), an explicit regulation approach comprising three components: 1) Recurrent Depth Modulator to inject recurrence depth signal and dynamically control the update magnitude according to token difficulty and loop iteration; 2) Latent Residual Rectifier to capture evolving update directions and rectify distorted traces, making the trace smoother and more coherent; 3) Update Clipping to constrain and slow down excessive latent updates and underscore step-by-step reasoning potential. With fewer than 5M trainable parameters, RLD is easy to deploy and generalizes well to multiple tasks and unseen recurrence depths. We evaluate RLD on both language and vision-language models across 18 benchmarks. Specifically, the vanilla LoopVL model suffers an 80.7% performance degradation on ChartQA when the inference depth is the default depth, while RLD preserves 95.2% of the vanilla model score at default depth. For looped language models, standard SFT faces a 77.2% drop on GSM8k when the depth exceeds the training depth, while RLD only loses 0.8% of the highest score under this setting.
Create a lesson
Metadata
- Categories
- cs.CL, cs.CV
- Comments
- 17 pages, 14 figures
Related papers
Breaking the KV Cache Bottleneck in Looped Transformers with Shared Token Latents
Shared title terminologycs.CLDehong Zheng, Tong Zhu, Yunkai Chai et al.
DLA: Decomposed Latent Attention for Looped Language Models
Shared title terminologycs.CLZhenhe Wu, Weihua He, Xinlai Kang et al.
MoTA: Moment-Tilted Attention for Looped Transformers
Shared title terminologycs.CLLong Qian, Bingke Zhu, Yu Li et al.
Looped Transformers: Architecture, Training, and Inference
Shared title terminologycs.CLMinh Le, Truong Giang Doan, Bao-Ngoc Dao et al.
PreLat: Prefill States as Latent Messages Between Model Families
Shared title terminologycs.CLZhen Lei, Jingyang He, Xin Shu et al.
A Hands-On Introduction to Modern Decoder-Only Transformers
Shared title terminologycs.CLYang He