循环超越两次:一种可扩展的循环混合专家方法
研究论文 · 2026/10/05
循环Transformer通过重复应用共享的Transformer块,在不增加参数量的情况下增加有效深度,为LLM引入了一种新的扩展轴。然而,在FLOPs匹配的比较下,循环对大型MoE LLM的收益仍不明确。主要原因是额外迭代的收益迅速递减,甚至可能转为退化,因此用于循环的额外FLOPs带来的实质提升很小。因此,先前工作通常止步于两次循环。我们识别出扩展循环MoE的两个主要障碍。第一,循环继承并放大了深度诅咒:随着残差更新累积,隐藏状态方差随每次迭代增长,这破坏了深度循环的稳定性并导致表示漂移。第二,循环MoE遭受专家选择崩溃:路由器在循环中反复选择相同的专家,因此额外迭代增加了计算量却没有增加计算多样性。基于这一诊断,我们提出LOOM,其构建基于一个原则:每个循环都应贡献新的计算,同时保持循环状态稳定。LOOM通过缩放残差更新以限制方差增长,并在每个循环重新注入输入嵌入来稳定循环,并通过每循环路由器启用不同专家以及一个将早期输出向前传递的循环残差来实现多样化。在100M-1.7B模型上的实验表明,可稳定扩展至9-12次循环。在接近等FLOP下,700M模型在5次循环时表现最佳,困惑度从18.36降至16.54,平均零样本准确率从38.84%提升至39.53%,优于非循环基线。在不匹配FLOP的情况下,1.7B模型在60B token上训练,在9次循环时达到峰值,困惑度从9.62降至7.77,平均零样本准确率从42.4%提升至47.7%。代码见https://github.com/hed-ucas/LOOM。
该研究解决了循环MoE扩展中的关键障碍,提出了有效的稳定和多样化方法,并在多个规模上验证了显著性能提升,为LLM的深度扩展提供了新思路。
Looped Transformers introduce recurrent depth as a new scaling axis for LLMs: by repeatedly applying shared Transformer blocks, they increase effective depth without increasing parameter count. However, the benefits of looping remain unclear for large MoE LLMs under FLOPs-matched comparisons. The main reason is that the gains from additional iterations diminish quickly and can even turn into degradation, so the extra FLOPs spent on looping yield little substantial improvement. Consequently, prior work typically settles on two loops. We identify two main obstacles to scaling looped MoE. First, looping inherits and amplifies the curse of depth: hidden-state variance grows with each iteration as residual updates accumulate, which destabilizes deep recurrence and causes representations to drift. Second, looped MoE suffers from expert selection collapse: routers repeatedly select the same experts across loops, so extra iterations add computation without adding computational diversity. Guided by this diagnosis, we propose LOOM, built on a single principle: each loop should contribute new computation while keeping the recurrent state stable. LOOM stabilizes recurrence by scaling residual updates to bound variance growth and re-injecting the input embedding at every loop, and diversifies it through per-loop routers that engage different experts and a Looping Residual that carries earlier outputs forward. Experiments across 100M-1.7B models show stable scaling to 9-12 loops. Under near-iso-FLOP, the 700M model performs best at 5 loops, reducing perplexity from 18.36 to 16.54 and improving average zero-shot accuracy from 38.84% to 39.53% over the non-looped baseline. Without FLOP matching, the 1.7B model trained on 60B tokens peaks at 9 loops, reducing perplexity from 9.62 to 7.77 and improving average zero-shot accuracy from 42.4% to 47.7%. Code is available https://github.com/hed-ucas/LOOM.