arXiv:2506.19171cs.LG2025-06中稿 · Workshop in Multi-…被引 1

让大模型学会用工具解题,无需调用工具也能准确解数学题。

Distilling Tool Knowledge into Language Models via Back-Translated Traces

  • 通过反向翻译将工具调用过程转为自然语言推理链。
  • 小模型在合成数据上微调后,在数学竞赛题上表现媲美带工具的模型。
  • 适合希望部署轻量级数学推理模型的研究者和开发者。

大型语言模型在需要精确计算或多步代数推理的数学问题上常表现不佳。工具集成推理(TIR)通过调用代码解释器等外部工具提升正确性,但引入了推理时依赖,限制了可扩展性和部署。本文提出一种新范式:仅通过自然语言将工具知识蒸馏到大模型中。首先构建求解代理(Solver Agent),通过规划、符号工具调用与反思推理的交替解决数学问题。随后,利用多个基于LLM的代理组成的反向翻译流水线,将交错的TIR轨迹转换为自然语言推理轨迹。翻译代理为单个工具调用生成解释,重述代理将其合并为流畅且全局连贯的叙述。实验证明,对小型开源模型在这些合成轨迹上进行微调,可使其内化工具知识与结构化推理模式,在不依赖工具的前提下达到竞赛级数学基准的性能提升。

原文摘要 · Abstract (English)

Large language models (LLMs) often struggle with mathematical problems that require exact computation or multi-step algebraic reasoning. Tool-integrated reasoning (TIR) offers a promising solution by leveraging external tools such as code interpreters to ensure correctness, but it introduces inference-time dependencies that hinder scalability and deployment. In this work, we propose a new paradigm for distilling tool knowledge into LLMs purely through natural language. We first construct a Solver Agent that solves math problems by interleaving planning, symbolic tool calls, and reflective reasoning. Then, using a back-translation pipeline powered by multiple LLM-based agents, we convert interleaved TIR traces into natural language reasoning traces. A Translator Agent generates explanations for individual tool calls, while a Rephrase Agent merges them into a fluent and globally coherent narrative. Empirically, we show that fine-tuning a small open-source model on these synthesized traces enables it to internalize both tool knowledge and structured reasoning patterns, yielding gains on competition-level math benchmarks without requiring tool access at inference.

数学推理知识蒸馏工具调用自然语言推理

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