arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.06438cs.LGstat.ML
收藏

大型语言模型中思维链推理的分布外泛化能力研究

Understanding the Out-of-Distribution Generalization of Chain-of-Thought Reasoning in LLMs

School of Intelligence Science and Technology, Nanjing University(南京大学智能科学与技术学院);Singapore Management University(新加坡管理大学)

Nuo-Jing Liang, Xiao-Tong Yuan, Pan Zhou

AI总结:

本研究针对LLMs的CoT推理,将其视为组合式OOD泛化问题,通过理论分析与实验验证揭示其泛化机制,证明其可实现短到长及组合式泛化。

摘要:

思维链(Chain-of-Thought, CoT)推理可大幅提升大型语言模型(Large Language Models, LLMs)的性能,但其分布外(Out-of-Distribution, OOD)泛化机制仍缺乏理论层面的深入探索。本研究将CoT视为组合式分布外泛化问题:目标任务缺乏完整推理轨迹或直接的输入-输出对,而训练仅提供分布内(In-Distribution, ID)的原子步骤数据。研究表明,CoT通过反复应用共享的单步预测器来组合可复用的分布内转移实现泛化。理论层面,设T为目标任务的推理步骤数,n为每个子任务的训练样本数,k为每步的输出标记数,则分布外任务风险由各分布内子任务风险之和控制,缩放系数为O(k)阶且与T无关,尽管风险总和本身仍可能随T增长。拉德马赫复杂度分析进一步显示,由于共享类在统一容量控制下的预测器共享,估计项为O(√(T/n))阶,而非与T线性相关。对于自回归下一个标记预测,最终任务风险受限于最优单步风险乘以相同的O(k)阶系数,加上O~(k√(T/n))阶的估计项。奇偶耦合构造进一步表明,对于子任务经验风险最小化器,当T≤n时,期望最终任务风险至少为最优单步风险加上Ω(√(T/n))。在Atom-Task和GSM8K上的实验验证了该理论:CoT可实现短到长及组合式泛化,而显式状态跟踪至关重要。本研究代码可在该https URL获取。

英文摘要:

Chain-of-Thought (CoT) reasoning substantially improves Large Language Models (LLMs), yet its out-of-distribution (OOD) generalization mechanism remains theoretically underexplored. We study CoT as compositional OOD generalization: the target task lacks complete reasoning trajectories or direct input-output pairs, while training provides only in-distribution (ID) atomic step data. We show that CoT generalizes by repeatedly applying a shared single-step predictor to compose reusable ID transitions. Theoretically, let $T$ denote the number of reasoning steps in the target task, $n$ the number of training samples per sub-task, and $k$ the number of output tokens per step; then the OOD task risk is controlled by the sum of the ID sub-task risks, scaled by a coefficient of order $\mathcal{O}(k)$ that is independent of $T$, although the summed risk itself may still grow with $T$. A Rademacher-complexity analysis further shows that the estimation term is of order $\mathcal{O}(\sqrt{T/n})$, rather than linear in $T$, due to predictor sharing under a uniform capacity control on the shared class. For autoregressive Next-Token Prediction, the final-task risk is bounded by the best-in-class step-level risk scaled by the same coefficient of order $\mathcal{O}(k)$, plus an estimation term of order $\widetilde{\mathcal{O}}\big(k\sqrt{T/n}\big)$. A parity-coupled construction further shows that, for the sub-task empirical risk minimizer, the expected final-task risk is at least the best in-class risk plus $Ω(\sqrt{T/n})$ when $T\le n$. Experiments on Atom-Task and GSM8K support the theory: CoT enables short-to-long and compositional generalization, while explicit state tracking is crucial. Our code is available at https://github.com/maxliang114514/CoT-OOD.

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

↑