arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.18797cs.LGcs.AI
收藏

通过全循环Transformer简单稳定循环

Simply Stabilizing the Loop via Fully Looped Transformer

Hong Kong Baptist University(香港 Baptist 大学);Jilin University(吉林大学)

Rao Fu, Zixuan Yang, Jiankun Zhang, Jing Ma, Hechang Chen, Yu Li, Yi Chang

AI总结:

针对循环Transformer在迭代次数增加时出现的训练不稳定性,提出全循环Transformer,通过全循环架构和注意力注入两种无参数修改,稳定训练至12次循环,下游任务性能提升最高13.2%。

摘要:

扩展模型性能通常需要增加模型大小。循环Transformer通过迭代重用相同的Transformer块提供了一种引人注目的替代方案,用额外的计算换取性能提升,而不增加参数数量或上下文长度。由于推理时可以调整循环迭代次数,它还提供了一种平衡性能和测试时计算的自然机制。然而,当循环迭代次数增加时,循环Transformer仍然存在训练不稳定性。我们的分析表明,这种不稳定性源于两个来源:梯度振荡和残差爆炸。为了解决这两个问题,我们提出了全循环Transformer,它引入了两种无参数修改:(1)全循环架构,将循环间信号分布到所有层以缓解残差爆炸;(2)注意力注入,重用现有的注意力块以抑制梯度振荡。这些修改稳定了训练动态,使得全循环Transformer能够稳定训练多达12次循环迭代,而其他基线循环模型在这种情况下会崩溃。在循环Transformer不会崩溃的较温和设置中,全循环Transformer仍然将平均下游任务性能提升了高达13.2%。总体而言,我们的实验表明,全循环Transformer提高了训练稳定性,增强了下游性能,并通过在推理时改变循环迭代次数,提供了在不同测试时计算预算下的初步适应性。

英文摘要:

Scaling model performance typically requires increasing model size. Looped Transformer (LT) offers a parameter-efficient alternative by repeatedly reusing the same Transformer blocks, converting additional computation into performance gains without increasing the parameter count or context length. However, increasing the number of loop iterations makes LT increasingly difficult to optimize, often leading to gradient oscillation, residual explosion, and training collapse. We propose the Fully Looped Transformer (FLT), a simple, parameter-free redesign that addresses these problems without adding learnable parameters or imposing specially designed optimization constraints. FLT combines a Fully Looped Architecture, which exposes the recurrent state to every layer, with Attention Injection, which controls recurrent information flow through the existing attention module. These modifications enable FLT to train stably through 12 loops in our tested configurations, while baseline looped models enter high-loss regimes. In the Base-size, 6-loop setting, FLT improves downstream-task accuracy by 14.9\% relative to the original LT. Fixed-loop checkpoint evaluations further show that performance improves as inference depth approaches the trained depth, even without randomized loop-count training, revealing a depth-aware test-time compute interface. Extending this interface beyond the trained range is a promising research direction.

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

↑