arXiv:2512.20745cs.AIcs.CL2025-12中稿 · ICLR被引 19

让大模型用代码工具精准解数学题,效率与准确率双提升。

AgentMath: Empowering Mathematical Reasoning for Large Language Models via Tool-Augmented Agent

  • 将思维链转为带工具的执行轨迹,解决高质量训练数据少的问题。
  • 通过实时代码执行与多轮反馈,实现自动优化解题策略,准确率达90.6%。
  • 适合需要高精度数学推理的研究者和开发者,尤其在竞赛级题目上表现突出。

大型推理模型(如o3和DeepSeek-R1)在长思维链任务中已取得显著进展,但在复杂数学运算中仍存在计算效率低、准确率不足的问题。本文提出AgentMath,一种将语言模型推理能力与代码解释器计算精度结合的智能体框架。核心创新包括:(1) 自动化将自然语言思维链转换为结构化的工具增强轨迹,生成高质量监督微调数据以缓解数据稀缺;(2) 提出新型代理强化学习范式,动态穿插自然语言生成与实时代码执行,通过多轮交互反馈使模型自主学习最优工具使用策略,并催生代码优化与错误修正能力;(3) 设计高效训练系统,采用请求级异步回放调度、代理部分回放和前缀感知加权负载均衡等技术,在超长序列和大量工具调用场景下实现4-5倍加速,使高效强化学习训练成为可能。评估显示,AgentMath在AIME24、AIME25和HMMT25等挑战性数学竞赛基准上达到领先性能,其中AgentMath-30B-A3B分别获得90.6%、86.4%和73.8%准确率,优于OpenAI-o3-mini和Claude-Opus-4.0-Thinking,接近OpenAI-o3、Gemini-2.5-Pro和DeepSeek-R1-671B-0528。结果验证了该方法的有效性,为构建可扩展的数学推理智能体铺平道路。

原文摘要 · Abstract (English)

Large Reasoning Models (LRMs) like o3 and DeepSeek-R1 have achieved remarkable progress in reasoning tasks with long cot. However, they remain computationally inefficient and struggle with accuracy when solving problems requiring complex mathematical operations. In this work, we present AgentMath, an agent framework that seamlessly integrates language models' reasoning capabilities with code interpreters' computational precision to efficiently tackle complex mathematical problems. Our approach introduces three key innovations: (1) An automated method that converts natural language chain-of-thought into structured tool-augmented trajectories, generating high-quality supervised fine-tuning (SFT) data to alleviate data scarcity; (2) A novel agentic reinforcement learning (RL) paradigm that dynamically interleaves natural language generation with real-time code execution. This enables models to autonomously learn optimal tool-use strategies through multi-round interactive feedback, while fostering emergent capabilities in code refinement and error correction; (3) An efficient training system incorporating innovative techniques, including request-level asynchronous rollout scheduling, agentic partial rollout, and prefix-aware weighted load balancing, achieving 4-5x speedup and making efficient RL training feasible on ultra-long sequences with scenarios with massive tool invocation. The evaluations show that AgentMath achieves state-of-the-art performance on challenging mathematical competition benchmarks including AIME24, AIME25, and HMMT25. Specifically, AgentMath-30B-A3B attains 90.6%, 86.4%, and 73.8% accuracy respectively, surpassing OpenAI-o3-mini and Claude-Opus-4.0-Thinking while remaining competitive with OpenAI-o3, Gemini-2.5-Pro, and DeepSeek-R1-671B-0528.These results validate the effectiveness of our approach and pave the way for building scalable mathematical reasoning agents.

数学推理智能体强化学习代码执行

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