arXiv:2507.00417cs.AIcs.CL2025-07被引 11

让语言模型像搜索算法一样思考,通过反思和回溯提升解题能力。

ASTRO: Teaching Language Models to Reason by Reflecting and Backtracking In-Context

  • 用蒙特卡洛树搜索生成带反思的思维链数据,训练模型模仿搜索行为。
  • 在MATH-500等竞赛题上提升16%至27%,尤其改善需反复修正的难题。
  • 适合想提升模型逻辑推理能力的研究者或开发者使用。

我们提出ASTRO(自回归搜索教学推理器),一种让语言模型像搜索算法一样进行推理的框架,显式利用自我反思、回溯和探索来生成输出。近期,基于强化学习(RL)训练大语言模型(LLMs)已催生出推理能力显著增强的模型。然而,开源复现的推理模型多基于已有较强推理能力的模型,其搜索行为在强化学习前已存在。因此,如何提升如Llama 3这类非推理型模型的推理能力仍不明确。ASTRO通过蒙特卡洛树搜索(MCTS)在数学问题求解轨迹上生成合成数据集,将搜索过程转化为包含成功与失败恢复的自然语言思维链,为强化学习提供丰富的探索先验。我们在这些搜索衍生轨迹上微调模型,并进一步通过可验证奖励进行强化学习优化。将ASTRO应用于Llama 3系列模型,在MATH-500上取得16.0%的绝对性能提升,AMC 2023上提升26.9%,AIME 2024上提升20.0%,尤其在需要迭代修正的难题上表现突出。结果表明,受搜索启发的训练方式为开放源代码大模型注入稳健推理能力提供了原则性路径。

原文摘要 · Abstract (English)

We introduce ASTRO, the "Autoregressive Search-Taught Reasoner", a framework for training language models to reason like search algorithms, explicitly leveraging self-reflection, backtracking, and exploration in their outputs. Recently, training large language models (LLMs) via reinforcement learning (RL) has led to the advent of reasoning models with greatly enhanced reasoning capabilities. Open-source replications of reasoning models, while successful, build upon models that already exhibit strong reasoning capabilities along with search behavior observed even before RL. As a result, it is yet unclear how to boost the reasoning capabilities of other non-reasoner models including Llama 3. ASTRO teaches such models to internalize structured search behavior through a synthetic dataset derived from Monte Carlo Tree Search (MCTS) over mathematical problem-solving trajectories. By converting search traces into natural language chain-of-thoughts that capture both successes and recoveries from failure, ASTRO bootstraps models with a rich prior for exploration during RL. We finetune our models on these search-derived traces and further improve performance via RL with verifiable rewards. We apply ASTRO to the Llama 3 family of models and achieve absolute performance gains of 16.0% on MATH-500, 26.9% on AMC 2023, and 20.0% on AIME 2024, especially improving upon challenging problems that require iterative correction. Our results demonstrate that search-inspired training offers a principled way to instill robust reasoning capabilities into open LLMs.

推理增强强化学习思维链数学推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。