arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.03373cs.CLcs.LG
收藏

揭秘大语言模型中的长链思维推理

Demystifying Long Chain-of-Thought Reasoning in LLMs

Carnegie Mellon University(卡内基梅隆大学);Tsinghua University(清华大学)

Edward Yeo, Yuxuan Tong, Morry Niu, Graham Neubig, Xiang Yue

AI总结:

本文系统研究了大语言模型长链思维推理的机制,通过SFT和RL实验揭示SFT的辅助作用、奖励塑形与可验证奖励信号扩展的关键性,以及基础模型中纠错能力的激励挑战,为优化长链思维训练策略提供实践指导。

摘要:

扩展推理计算可以增强大语言模型(LLMs)的推理能力,其中长链思维(CoTs)能够支持回溯和纠错等策略。强化学习(RL)已成为发展这些能力的关键方法,但长链思维在何种条件下出现仍不清楚,且RL训练需要精细的设计选择。在本研究中,我们系统地研究了长链思维推理的机制,识别了使模型能够生成长链思维轨迹的关键因素。通过大量的监督微调(SFT)和强化学习实验,我们提出了四个主要发现:(1)虽然SFT并非严格必要,但它能简化训练并提高效率;(2)推理能力往往随着训练计算量的增加而出现,但其发展并非必然,因此奖励塑形对于稳定长链思维长度的增长至关重要;(3)扩展可验证的奖励信号对RL至关重要。我们发现,利用带有过滤机制的、从网络提取的带噪解具有强大潜力,特别是对于诸如STEM推理等分布外(OOD)任务;(4)诸如纠错等核心能力天然存在于基础模型中,但通过RL有效地为复杂任务激励这些技能需要大量计算,并且衡量它们的出现需要一种细致的方法。这些见解为优化训练策略以增强大语言模型中的长链思维推理提供了实践指导。我们的代码可在以下地址获取:https://github.com/eddycmu/demystify-long-cot。

英文摘要:

Scaling inference compute enhances reasoning in large language models (LLMs), with long chains-of-thought (CoTs) enabling strategies like backtracking and error correction. Reinforcement learning (RL) has emerged as a crucial method for developing these capabilities, yet the conditions under which long CoTs emerge remain unclear, and RL training requires careful design choices. In this study, we systematically investigate the mechanics of long CoT reasoning, identifying the key factors that enable models to generate long CoT trajectories. Through extensive supervised fine-tuning (SFT) and RL experiments, we present four main findings: (1) While SFT is not strictly necessary, it simplifies training and improves efficiency; (2) Reasoning capabilities tend to emerge with increased training compute, but their development is not guaranteed, making reward shaping crucial for stabilizing CoT length growth; (3) Scaling verifiable reward signals is critical for RL. We find that leveraging noisy, web-extracted solutions with filtering mechanisms shows strong potential, particularly for out-of-distribution (OOD) tasks such as STEM reasoning; and (4) Core abilities like error correction are inherently present in base models, but incentivizing these skills effectively for complex tasks via RL demands significant compute, and measuring their emergence requires a nuanced approach. These insights provide practical guidance for optimizing training strategies to enhance long CoT reasoning in LLMs. Our code is available at: https://github.com/eddycmu/demystify-long-cot.

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

↑