arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.25791cs.LGcs.AI
收藏

推理的动力学:思想链如何在Transformers中学习?

The Kinetics of Reasoning: How Chain-of-Thought Shapes Learning in Transformers?

The University of Chicago(芝加哥大学);Amazon Web Services(亚马逊网络服务)

Zihan Pengmei, Costas Mavromatis, Zhengyuan Shen, Yunyi Zhang, Vassilis N. Ioannidis, Huzefa Rangwala

摘要:

思想链(CoT)监督可以大大提高Transformer的性能,但模型学习遵循CoT并从中受益的机制仍然知之甚少。我们调查这些学习动态通过镜头grokking预训练Transformers器上的符号推理任务与可调的算法复杂性和可控的数据组成,以研究其泛化。模型在两种设置下进行训练:(i)仅产生最终答案,以及(ii)在回答之前发出明确的CoT轨迹。我们的研究结果表明,虽然CoT通常可以提高任务性能,但它的好处取决于任务的复杂性。为了量化这些影响,我们用三参数逻辑曲线对对数训练步骤的准确性进行了建模,揭示了学习速度和形状如何随任务复杂性、数据分布和CoT监督的存在而变化。我们还发现了一个短暂的跟踪不忠诚阶段:在训练的早期,模型通常会在跳过或反驳CoT步骤的同时产生正确的答案,然后再将其推理轨迹与答案对齐。从经验上讲,我们(1)证明CoT加速了泛化,但不能克服算法复杂度较高的任务,例如查找列表交集;(2)引入一个动力学建模框架来理解Transformer学习;(3)将跟踪忠实性描述为在训练过程中出现的动态属性;(4)显示CoT机械地改变了内部Transformer计算。

英文摘要:

Chain-of-thought (CoT) supervision can substantially improve transformer performance, yet the mechanisms by which models learn to follow and benefit from CoT remain poorly understood. We investigate these learning dynamics through the lens of grokking by pretraining transformers on symbolic reasoning tasks with tunable algorithmic complexity and controllable data composition to study their generalization. Models were trained under two settings: (i) producing only final answers, and (ii) emitting explicit CoT traces before answering. Our results show that while CoT generally improves task performance, its benefits depend on task complexity. To quantify these effects, we model the accuracy of the logarithmic training steps with a three-parameter logistic curve, revealing how the learning speed and shape vary with task complexity, data distribution, and the presence of CoT supervision. We also uncover a transient trace unfaithfulness phase: early in training, models often produce correct answers while skipping or contradicting CoT steps, before later aligning their reasoning traces with answers. Empirically, we (1) demonstrate that CoT accelerates generalization but does not overcome tasks with higher algorithmic complexity, such as finding list intersections; (2) introduce a kinetic modeling framework for understanding transformer learning; (3) characterize trace faithfulness as a dynamic property that emerges over training; and (4) show CoT alters internal transformer computation mechanistically.

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

↑