让AI推理时能复用过往解题思路,大幅提高复杂问题解答能力。
Procedural Knowledge at Scale Improves Reasoning

- 构建可检索的程序化知识库,将解题过程拆分为可复用的子问题-子流程对
- 在推理时动态调用相关解题策略,平均提升19.5%准确率,优于基线8.9%
- 适合需要持续优化推理能力的研究者与开发者
测试时扩展已成为提升语言模型在复杂推理任务上表现的有效方法。然而,现有方法大多孤立处理每个问题,未能系统复用先前推理轨迹中的知识。尤其忽视了程序化知识:如何重构问题、选择方法、验证或回溯。我们提出「推理记忆」(Reasoning Memory),一个增强型检索生成框架,能大规模显式检索并复用程序化知识。基于现有逐步推理轨迹语料,我们将每条轨迹分解为自包含的子问题-子流程对,构建出包含3200万条紧凑程序化知识条目的数据存储。推理时,轻量级思维提示使模型能说出核心子问题,并在其推理路径中检索相关子流程,以隐式程序先验进行多路径推理。在六个数学、科学和编程基准上,推理记忆始终优于文档、轨迹和模板知识的RAG,以及计算量相当的测试时扩展基线。在更高推理预算下,平均相比无检索提升19.5%,相比基线提升8.9%。消融实验表明,性能提升源于源轨迹的广泛程序覆盖性,以及我们的分解与检索设计,共同实现有效程序知识提取与复用。代码已开源:https://github.com/facebookresearch/reasoning-memory。
原文摘要 · Abstract (English)
Test-time scaling has emerged as an effective way to improve language models on challenging reasoning tasks. However, most existing methods treat each problem in isolation and do not systematically reuse knowledge from prior reasoning trajectories. In particular, they underutilize procedural knowledge: how to reframe a problem, choose an approach, and verify or backtrack when needed. We introduce \textbf{Reasoning Memory}, a retrieval-augmented generation (RAG) framework for reasoning models that explicitly retrieves and reuses procedural knowledge at scale. Starting from existing corpora of step-by-step reasoning trajectories, we decompose each trajectory into self-contained subquestion-subroutine pairs, yielding a datastore of 32 million compact procedural knowledge entries. At inference time, a lightweight in-thought prompt lets the model verbalize the core subquestion, retrieve relevant subroutines within its reasoning trace, and reason under diverse retrieved subroutines as implicit procedural priors. Across six math, science, and coding benchmarks, Reasoning Memory consistently outperforms RAG with document, trajectory, and template knowledge, as well as a compute-matched test-time scaling baseline. With a higher inference budget, averaged across models and tasks, it improves over no retrieval by 19.5% and over the compute-matched baseline by 8.9%. Ablation studies show that these gains come from two key factors: the broad procedural coverage of the source trajectories and our decomposition and retrieval design, which together enable effective extraction and reuse of procedural knowledge. Our experiment code is available at https://github.com/facebookresearch/reasoning-memory.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。