小模型通过自我进化深度思考,数学推理能力超越大模型。
rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinking
- 用蒙特卡洛树搜索让小模型在解题时深度推演。
- 数学基准测试准确率提升至90%,超o1-preview 4.5%。
- 适合对高效推理、低成本部署有需求的研究者。
我们提出rStar-Math,证明小型语言模型(SLMs)可在不依赖大模型蒸馏的情况下,达到甚至超过OpenAI o1的数学推理能力。该方法通过蒙特卡洛树搜索(MCTS)实现“深度思考”,由一个基于SLM的策略模型在推理时进行搜索,由一个基于SLM的过程奖励模型引导。rStar-Math引入三项创新:(1) 基于代码增强的思维链数据合成方法,通过大量MCTS回溯生成可验证的解题轨迹以训练策略模型;(2) 一种避免逐步评分标注的过程偏好模型训练方法,获得更有效的过程奖励模型;(3) 自我进化方案,从零开始迭代优化策略模型与过程奖励模型。经过4轮自进化,针对74.7万个数学问题生成数百万解法,使SLMs的数学推理达到顶尖水平。在MATH基准上,Qwen2.5-Math-7B准确率从58.8%提升至90.0%,Phi3-mini-3.8B从41.4%提升至86.4%,分别超越o1-preview 4.5%和0.9%。在美国数学奥林匹克(AIME)上,平均解决53.3%(8/15)的问题,位列前20%高中生水平。代码与数据将开源于https://github.com/microsoft/rStar。
原文摘要 · Abstract (English)
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ïve 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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。