2025-01-09 · 专家 · 机器学习

rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinking

rStar-Math 通过结合蒙特卡洛树搜索(MCTS)和自进化的深度学习,证明了小型语言模型(SLM)在数学推理能力上可以与 OpenAI 的 o1 模型相媲美,甚至超越。

更新于 2025-05-08。作者:Xinyu Guan、Li Lyna Zhang、Yifei Liu、Ning Shang、Youran Sun、Yi Zhu、Fan Yang、Mao Yang。

中文摘要

我们提出rStar-Math来证明小型语言模型(SLMs)可以与甚至超越OpenAI o1的数学推理能力,而不需要从更高级的模型中进行蒸馏。rStar-Math通过运用蒙特卡洛树搜索(MCTS)进行“深度思考”,在此过程中,一个基于数学策略的SLM在由基于SLM的过程奖励模型引导的测试时搜索中进行搜索。rStar-Math针对训练两个SLMs的挑战引入了三项创新:(1)一种新颖的代码增强的CoT数据合成方法,该方法通过广泛的MCTS滚动生成用于训练策略SLM的逐步验证推理轨迹;(2)一种新颖的过程奖励模型训练方法,避免了简单的步骤级分数标注,从而产生了更有效的过程偏好模型(PPM);(3)一种自我进化方案,其中策略SLM和PPM从头开始构建,并通过迭代进化来提高推理能力。通过4轮自我进化,使用747k个数学问题的数百万个合成解决方案,rStar-Math将SLMs的数学推理能力提升到了最先进水平。在MATH基准测试中,它将Qwen2.5-Math-7B的得分从58.8%提高到90.0%,将Phi3-mini-3.8B的得分从41.4%提高到86.4%,分别超过了o1-preview的+4.5%和+0.9%。在USA数学奥林匹克(AIME)中,rStar-Math平均解决了53.3%(8/15)的问题,排名在最聪明的20%的高中生数学学生中。代码和数据将在https://github.com/microsoft/rStar上提供。

英文摘要

We present rStar-Math to demonstrate that small language models (SLMs) can rival or even surpass the math reasoning capability of OpenAI o1, without distillation from superior models. rStar-Math achieves this by exercising "deep thinking" through Monte Carlo Tree Search (MCTS), where a math policy SLM performs test-time search guided by an SLM-based process reward model. rStar-Math introduces three innovations to tackle the challenges in training the two SLMs: (1) a novel code-augmented CoT data sythesis method, which performs extensive MCTS rollouts to generate step-by-step verified reasoning trajectories used to train the policy SLM; (2) a novel process reward model training method that avoids na\"ive step-level score annotation, yielding a more effective process preference model (PPM); (3) a self-evolution recipe in which the policy SLM and PPM are built from scratch and iteratively evolved to improve reasoning capabilities. Through 4 rounds of self-evolution with millions of synthesized solutions for 747k math problems, rStar-Math boosts SLMs' math reasoning to state-of-the-art levels. On the MATH benchmark, it improves Qwen2.5-Math-7B from 58.8% to 90.0% and Phi3-mini-3.8B from 41.4% to 86.4%, surpassing o1-preview by +4.5% and +0.9%. On the USA Math Olympiad (AIME), rStar-Math solves an average of 53.3% (8/15) of problems, ranking among the top 20% the brightest high school math students. Code and data will be available at https://github.com/microsoft/rStar.

解读

一句话总结

rStar-Math 通过结合蒙特卡洛树搜索(MCTS)和自进化的深度学习,证明了小型语言模型(SLM)在数学推理能力上可以与 OpenAI 的 o1 模型相媲美,甚至超越。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:传统的大型语言模型(LLM)在解决数学问题时,往往依赖于快速但容易出错的单步推理,导致结果不准确。 • 现有方案不足:现有方法依赖于高级 LLM 进行数据合成,限制了推理能力,且难以保证中间步骤的正确性。 • 研究目标:开发一种新的方法,使小型语言模型能够通过深度思考进行数学推理,并达到或超越高级 LLM 的水平。

问题2:论文的核心创新点是什么?

• 技术创新:结合 MCTS 和 SLM 进行深度思考,通过代码增强的 CoT 数据合成方法生成高质量的推理轨迹。 • 方法改进:引入了过程奖励模型(PPM)训练方法,避免了简单的步骤级评分标注,提高了过程偏好模型(PPM)的有效性。 • 优势:与现有方法相比,rStar-Math 能够生成更高质量的训练数据,提高数学推理能力,且模型规模更小。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在多个数学推理基准测试中评估 rStar-Math 的性能。 • 性能提升:在 MATH 基准测试中,rStar-Math 将 Qwen2.5-Math-7B 的准确率从 58.8% 提高到 90.0%,将 Phi3-mini-3.8B 的准确率从 41.4% 提高到 86.4%。 • 对比结果:rStar-Math 在多个基准测试中均超越了 OpenAI 的 o1 模型,证明了其有效性。

问题4:这个研究的实际应用价值是什么?

• 应用场景:教育、辅助工具、自动化测试等。 • 实施建议:结合实际应用场景,逐步完善 rStar-Math 的算法和模型。 • 局限与展望:目前 rStar-Math 主要针对文字问题,未来可以扩展到其他领域,如定理证明和代码推理。

来源