arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.16265cs.LGcs.AI
收藏

修正型循环Transformer

Rectified Looped Transformer

Tsinghua University(清华大学)

Musheng Li, Jiawei Zhang, Ziyuan Liu, Yuantao Gu

AI总结:

针对现有循环Transformer的隐藏状态规模增长与扰动放大问题,提出修正型循环Transformer,通过插值方案优化反馈机制,在无额外参数的情况下提升语言建模性能与鲁棒性。

摘要:

循环Transformer通过重复应用共享块来增加有效深度,是一种参数高效的语言建模方法。然而,现有多数工作直接将每个循环的输出作为下一个循环的输入,随着循环加深,这会导致隐藏状态规模增长和扰动放大。我们提出修正型循环Transformer(Rectified Looped Transformer,RLT),其利用基于流模型的插值方案重新设计循环间的反馈机制。在每个循环中,RLT通过在当前状态及其预测之间进行线性插值来形成下一个输入,这种插值将状态变化分布到各个循环,促使从初始输入到最终输出的轨迹更平滑。理论分析证明,在适当假设下,RLT可使各循环的状态幅度保持一致有界,并降低最坏情况下的扰动放大。我们在语言建模语料库和下游基准上评估RLT:在匹配的训练和推理深度下,RLT的困惑度始终低于标准循环Transformer,同时对输入扰动和推理深度的方差表现出更强的鲁棒性;潜在轨迹分析显示,RLT在各循环中维持更稳定的隐藏状态范数,这也有利于基于外推的解码策略。值得注意的是,RLT无需额外可训练参数或额外循环块评估即可实现这些改进,为循环Transformer提供了一种简单且更稳定的反馈机制。

英文摘要:

Looped Transformers increase effective depth by repeatedly applying a shared block, offering a parameter-efficient approach to language modeling. However, most existing works directly reuse each loop's output as the next's input, which can lead to hidden-state scale growth and perturbation amplification as recurrence deepens. We propose Rectified Looped Transformer (RLT), which redesigns feedback between loops using an interpolation schedule inspired by flow-based modeling. At each loop, RLT forms the next input by linearly interpolating between the current state and its prediction. Such interpolation distributes state changes across loops, encouraging a smoother trajectory from the initial input to the final output. Theoretical analysis proves that, under appropriate assumptions, RLT keeps state magnitudes uniformly bounded across loops and reduces the worst-case perturbation amplification. We evaluate RLT on language modeling corpora and downstream benchmarks. At matched training and inference depths, RLT consistently achieves lower perplexity than a standard looped Transformer, while exhibiting greater robustness to input perturbations and variance in inference depth. Consistent with the theoretical results, latent trajectory analysis shows that RLT maintains more stable hidden-state norms across loops, which also facilitates extrapolation-based decoding strategies. Notably, RLT achieves these gains without requiring additional trainable parameters or extra recurrent block evaluations, thus providing a simple yet more stable feedback mechanism for looped Transformers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑