论文探究 Recurrent Transformers 状态追踪的长度泛化条件
What Makes Recurrence Generalize Across Lengths?
搞推理模型或做测试时扩展的人值得看这篇。它用控制变量实验讲清楚了一件事:Recurrent Transformers 想在更长序列上泛化,操作表示得原子化、位置编码得选周期性,光堆循环层数没用。同参数固定深度 Transformer 在 20-40 步序列上直接归零,对比很说明问题。
arXiv 论文《What Makes Recurrence Generalize Across Lengths?》在受控状态追踪任务中系统研究 Recurrent Transformers 何时能泛化到训练长度之外,变量包括操作表示、位置编码和循环容量。结果显示循环结构本身不够:多 token 模板表示和绝对位置编码会严重限制外推,原子操作表示则带来明显更强的长度泛化;周期性位置编码在更大循环深度下取得最高平均性能。
关键数字是:循环算子扩展后,模型在只训练 2-10 操作序列的条件下,对 20-40 操作序列达到 35.1% 精确匹配准确率,而参数量更大的固定深度 Transformer 保持 0%。测试时增加循环步数能延长泛化范围,但无法解决远超训练长度的失败。
论文结论是循环计算可以支持长度可泛化的状态追踪,前提是学到的计算在不同序列长度间保持可复用。这对推理模型的多步计算设计和测试时算力扩展策略有直接参考价值。
What Makes Recurrence Generalize Across Lengths?
Multi-step reasoning requires models to preserve and update intermediate information as computation unfolds. State tracking captures this fundamental requirement, but models that succeed within a fixed range of state transitions may not generalize when substantially more updates are required. Recurrent Transformers offer a natural mechanism for addressing this challenge by repeatedly applying shared Transformer blocks, allowing computation to scale with problem length. We study when such recurrent computation generalizes beyond the training range in a controlled state-tracking task, varying operation representation, positional encoding, and recurrent capacity. We find that recurrence alone is insufficient: multi-token template representations and absolute positional encoding can severely limit extrapolation, whereas atomic operation representations enable substantially stronger length generalization. The effect of positional structure also varies with recurrent depth, with periodic positional encoding achieving the strongest mean performance at greater recurrent depth. Most importantly, scaling the recurrent operator extends the extrapolation horizon, reaching 35.1% exact-match accuracy on sequences of 20-40 operations after training only on 2-10, while substantially larger fixed-depth Transformers remain at 0%. Additional recurrent computation at test time can extend the range over which the model generalizes, but does not eliminate failure on much longer sequences. These results suggest that recurrent computation can support length-generalizable state tracking, but that its effectiveness depends critically on whether the learned computation remains reusable across sequence lengths.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Recurrent Transformers, length generalization, reasoning models.
Source attribution: curated from arXiv cs.AI (@Yoonsung Jung, Sunghun Jung, Louise Nayeong Koh, Yongjun Choi).