揭秘大模型长链推理的形成机制与训练关键
Demystifying Long Chain-of-Thought Reasoning in LLMs
- 通过大规模微调与强化学习实验,分析长链推理生成条件
- 增加训练算力可促进推理能力提升,但需奖励设计稳定长度增长
- 利用过滤后的网络解题数据增强奖励信号,对复杂任务有效
扩大推理计算量可提升大语言模型的推理能力,长链思维(CoT)支持回溯与纠错策略。强化学习(RL)已成为发展这些能力的关键方法,但长链推理出现的具体条件尚不明确,且RL训练需精细设计。本研究系统探究长链推理机制,识别出生成长链轨迹的关键因素。通过大量监督微调(SFT)和强化学习实验,得出四项主要发现:(1) 虽然SFT非必需,但能简化训练并提高效率;(2) 推理能力随训练算力增加而涌现,但并非必然,因此奖励塑造对稳定延长推理链至关重要;(3) 扩展可验证奖励信号极为关键,我们发现利用经过滤的网络提取解题答案具有强潜力,尤其适用于STEM等分布外(OOD)任务;(4) 错误纠正等核心能力在基础模型中已存在,但通过RL有效激励其应用于复杂任务需大量算力,且其涌现需细致评估。这些发现为优化训练策略以增强大模型长链推理提供了实用指导。代码已开源:https://github.com/eddycmu/demystify-long-cot。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。