通过自对弈强化学习,让大模型学会自主思考与纠错。
On the Emergence of Thinking in LLMs I: Searching for the Right Intuition
- 用自对弈强化学习框架分离探索与正确性信号,提升推理效率。
- 在数学测试中,性能最高提升23%,关键问题准确率显著改善。
- 模型自发出现回溯、试错等复杂思维行为,适合研究推理机制者参考。
近期人工智能进展使大语言模型演变为大型推理模型(LRMs),在推理时进行额外计算以生成更高质量输出。本文旨在揭示训练LRMs的算法框架。自洽、PRM和AlphaZero等方法表明推理可视为受控搜索。我们提出一种后训练框架——基于自对弈的强化学习(RLSP),包含三步:(1) 使用人类或合成推理示范进行监督微调;(2) 通过探索奖励信号鼓励多样且高效的推理行为;(3) 在结果验证器指导下进行强化学习,确保正确性并防止奖励欺骗。核心创新在于在PPO训练中解耦探索与正确性信号,精细平衡两者以提升性能与效率。在数学领域实证显示,该方法有效:在Llama-3.1-8B-Instruct上,MATH-500测试集性能提升23%;在AIME 2024数学题上,Qwen2.5-32B-Instruct提升10%。更重要的是,即使使用最简单的探索奖励(仅鼓励更多中间步骤),经过RLSP训练的模型也涌现出回溯、想法探索与自我验证等涌现行为。这表明,当规模扩大时,该框架可能足以激发复杂推理能力。最后,我们提出理论解释:为何该搜索策略更适合LLMs,源于一项关键发现——链式思维(CoT)能随步骤数增加而提升模型计算能力 [li2024chain, merrill2023expresssive]。
原文摘要 · Abstract (English)
Recent AI advancements, such as OpenAI's new models, are transforming LLMs into LRMs (Large Reasoning Models) that perform reasoning during inference, taking extra time and compute for higher-quality outputs. We aim to uncover the algorithmic framework for training LRMs. Methods like self-consistency, PRM, and AlphaZero suggest reasoning as guided search. We ask: what is the simplest, most scalable way to enable search in LLMs? We propose a post-training framework called Reinforcement Learning via Self-Play (RLSP). RLSP involves three steps: (1) supervised fine-tuning with human or synthetic demonstrations of the reasoning process, (2) using an exploration reward signal to encourage diverse and efficient reasoning behaviors, and (3) RL training with an outcome verifier to ensure correctness while preventing reward hacking. Our key innovation is to decouple exploration and correctness signals during PPO training, carefully balancing them to improve performance and efficiency. Empirical studies in the math domain show that RLSP improves reasoning. On the Llama-3.1-8B-Instruct model, RLSP can boost performance by 23% in MATH-500 test set; On AIME 2024 math problems, Qwen2.5-32B-Instruct improved by 10% due to RLSP. However, a more important finding of this work is that the models trained using RLSP, even with the simplest exploration reward that encourages the model to take more intermediate steps, showed several emergent behaviors such as backtracking, exploration of ideas, and verification. These findings demonstrate that RLSP framework might be enough to enable emergence of complex reasoning abilities in LLMs when scaled. Lastly, we propose a theory as to why RLSP search strategy is more suitable for LLMs inspired by a remarkable result that says CoT provably increases computational power of LLMs, which grows as the number of steps in CoT \cite{li2024chain,merrill2023expresssive}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。