扩展至数万次测试时迭代:循环原生注意力残差
研究论文 · 2026/10/09
本文提出,循环Transformer需要自身的残差连接以防止随迭代次数增加而性能下降。作者观察到增加循环迭代次数会降低推理准确率:噪声状态更新会覆盖正确的中间推导,甚至撤销已完成的解。这导致后续迭代需要从已退化的表示中恢复丢失的信息:一旦早期循环中出现错误(通常由循环中的长程传播导致),后续循环很难纠正。本文引入InfiLoop,一种循环原生残差连接,学习保留哪些过去计算以及从每次新更新中接受多少。InfiLoop结合基于内容的加权与学习的时间衰减,维护循环状态的运行摘要。精确的流式循环使其持久聚合内存在循环次数增长时保持恒定。由此产生的自适应更新抑制不可靠的提议并保留有用的中间状态。在大量推理任务中,一个7M参数的InfiLoop模型优于现有递归架构,在Sudoku-Extreme上达到97.9%的精确准确率,在ARC-AGI-2上达到13.6%的pass@2。值得注意的是,在Sudoku-Extreme上,InfiLoop在测试时循环超过20,000有效步骤后仍持续改进,表明增加的深度直接转化为更强的推理能力。代码见https://github.com/pixeli99/InfiLoop。
该研究提出了一种新颖的循环原生残差连接,显著提升了循环Transformer在长迭代下的推理性能,并在多个推理任务上取得领先结果,尤其展示了超长测试时循环的持续改进能力,对深度推理模型的设计有重要启发。
In this paper, we argue that looped Transformers need their own residual connections to prevent performance degradation as the number of iterations grows. We observe that increasing loop iterations can reduce reasoning accuracy: noisy state updates overwrite correct intermediate deductions and even undo completed solutions. This leaves subsequent iterations to recover lost information from an already degraded representation: once an error arises in an earlier loop, often as a result of long-range propagation through the recurrence, later loops find it difficult to correct. In this paper, we introduce InfiLoop, a loop-native residual connection that learns which past computations to retain and how much to accept from each new update. InfiLoop combines content-based weighting with learned temporal decay to maintain a running summary of recurrent states. An exact streaming recurrence keeps its persistent aggregation memory constant as the loop count grows. The resulting adaptive update suppresses unreliable proposals and preserves useful intermediate states. Across extensive reasoning tasks, a 7M-parameter InfiLoop model outperforms existing recursive architectures, reaching 97.9% exact accuracy on Sudoku-Extreme, and 13.6% pass@2 on ARC-AGI-2. Notably, on Sudoku-Extreme, InfiLoop continues to improve with test-time looping beyond 20,000 effective steps, showing that added depth translates directly into stronger reasoning. Our code is available at https://github.com/pixeli99/InfiLoop.