arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.07378cs.LGcs.AImath.OCstat.ML
收藏

Transformer可证明地通过长度泛化学习思维链推理

Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization

University of Pennsylvania(宾夕法尼亚大学);Carnegie Mellon University(卡内基梅隆大学);Yale University(耶鲁大学)

Yu Huang, Zixin Wen, Aarti Singh, Yuejie Chi, Yuxin Chen

AI总结:

本文从理论上证明Transformer通过注意力集中机制实现思维链推理的长度泛化,并首次给出常数深度Transformer可证明学习NC^1-完全问题的优化保证。

摘要:

推理能力是人工智能(AI)的核心,而具有挑战性的问题通常需要更深、更长的推理才能解决。关于AI推理的一个关键问题是:模型能否外推已学到的推理模式,以解决具有更长思维链(CoT)的更困难任务。本文对Transformer在合成状态跟踪任务上通过梯度下降进行学习的过程进行了理论分析。我们从数学上证明了状态跟踪问题的代数结构如何决定所学CoT的外推程度。具体而言,我们的理论通过注意力集中机制刻画了Transformer的长度泛化能力,将注意力层的检索鲁棒性与长上下文推理中的状态跟踪任务结构联系起来。此外,对于推理长度有限的Transformer,我们证明了一种递归自训练方案可以逐步扩展可求解问题长度的范围。据我们所知,我们首次给出了常数深度Transformer可证明地通过CoT学习$\mathsf{NC}^1$-完全问题的优化保证,显著超越了此前局限于$\mathsf{TC}^0$的已有成果——除非广泛接受的猜想$\mathsf{TC}^0 \neq \mathsf{NC}^1$不成立。最后,我们给出了一系列广泛的实验来支持我们的理论结果,证实了长度泛化行为和注意力集中机制。

英文摘要:

The ability to reason lies at the core of artificial intelligence (AI), and challenging problems usually call for deeper and longer reasoning to tackle. A crucial question about AI reasoning is whether models can extrapolate learned reasoning patterns to solve harder tasks with longer chain-of-thought (CoT). In this work, we present a theoretical analysis of transformers learning on synthetic state-tracking tasks with gradient descent. We mathematically prove how the algebraic structure of state-tracking problems governs the degree of extrapolation of the learned CoT. Specifically, our theory characterizes the length generalization of transformers through the mechanism of attention concentration, linking the retrieval robustness of the attention layer to the state-tracking task structure of long-context reasoning. Moreover, for transformers with limited reasoning length, we prove that a recursive self-training scheme can progressively extend the range of solvable problem lengths. To our knowledge, we provide the first optimization guarantee that constant-depth transformers provably learn $\mathsf{NC}^1$-complete problems with CoT, significantly going beyond prior art confined in $\mathsf{TC}^0$, unless the widely held conjecture $\mathsf{TC}^0 \neq \mathsf{NC}^1$ fails. Finally, we present a broad set of experiments supporting our theoretical results, confirming the length generalization behaviors and the mechanism of attention concentration.

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

↑