循环Transformer如何实现跨序列长度的状态跟踪泛化
What Makes Recurrence Generalize Across Lengths?
研究在受控状态跟踪任务中发现,循环Transformer仅靠循环结构不足以实现长度外推:多token模板表示与绝对位置编码会严重限制外推能力,而原子操作表示显著增强长度泛化。扩大循环算子可将外推范围延伸至20-40步操作序列,精确匹配准确率达35.1%,而同等规模固定深度Transformer仍为0%。测试时增加循环计算可扩展泛化范围,但无法消除超长序列上的失败。
arXiv:2611.29171v1 Announce Type: new Abstract: 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.
来源:arXiv (AI + Vision + Imaging) · arxiv.org