arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.20745cs.AIcs.CLcs.LG
收藏

AgentMath: 通过工具增强代理赋能大语言模型的数学推理

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

Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院);Tencent Hunyuan(腾讯混元);Pengcheng Laboratory(鹏城实验室)

Haipeng Luo, Huawen Feng, Qingfeng Sun, Can Xu, Kai Zheng, Yufei Wang, Tao Yang, Han Hu, Yansong Tang

AI总结:

AgentMath通过整合语言模型和代码解释器,提升大语言模型在复杂数学问题上的推理能力,实现高效训练和高准确率。

摘要:

大型推理模型(LRMs)如o3和DeepSeek-R1在长cot任务中取得了显著进展,但它们仍然计算效率低下,在解决需要复杂数学运算的问题时准确性不足。在本工作中,我们提出了AgentMath,一个将语言模型的推理能力与代码解释器的计算精度无缝集成的代理框架,以高效地解决复杂数学问题。我们的方法引入了三个关键创新:(1)一种自动化方法,将自然语言的链式思维转换为结构化的工具增强轨迹,生成高质量的监督微调(SFT)数据以缓解数据稀缺;(2)一种新的代理强化学习(RL)范式,动态交织自然语言生成与实时代码执行。这使模型能够通过多轮交互反馈自主学习最优的工具使用策略,同时促进代码精炼和错误纠正的涌现能力;(3)一个高效的训练系统,结合了创新技术,包括请求级异步rollout调度、代理部分rollout和前缀感知加权负载均衡,实现了4-5倍的速度提升,使在超长序列和大规模工具调用场景下的高效RL训练成为可能。评估显示,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之间具有竞争力。这些结果验证了我们方法的有效性,并为构建可扩展的数学推理代理铺平了道路。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑