Saved in:
Bibliographic Details
Main Authors: Feng, Jiazhan, Huang, Shijue, Qu, Xingwei, Zhang, Ge, Qin, Yujia, Zhong, Baoquan, Jiang, Chengquan, Chi, Jinxin, Zhong, Wanjun
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.11536
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913797947523072
author Feng, Jiazhan
Huang, Shijue
Qu, Xingwei
Zhang, Ge
Qin, Yujia
Zhong, Baoquan
Jiang, Chengquan
Chi, Jinxin
Zhong, Wanjun
author_facet Feng, Jiazhan
Huang, Shijue
Qu, Xingwei
Zhang, Ge
Qin, Yujia
Zhong, Baoquan
Jiang, Chengquan
Chi, Jinxin
Zhong, Wanjun
contents While reasoning models (e.g., DeepSeek R1) trained with reinforcement learning (RL), excel in textual reasoning, they struggle in scenarios requiring structured problem-solving, such as geometric reasoning, concise computation, or complex equation solving-areas where computational tools like code interpreters (CI) demonstrate distinct advantages. To bridge this gap, we propose ReTool, which enhances long-form reasoning with tool-integrated learning, including two key features: (1) dynamic interleaving of real-time code execution within natural language reasoning processes, and (2) an automated RL paradigm that allows policy rollouts with multi-turn real-time code execution and teaches the model in learning when and how to invoke tools based on outcome feedback. ReTool employs a systematic training framework, beginning with synthetic cold-start data generation to produce code-augmented long-form reasoning traces for fine-tuning base models. Subsequent RL training leverages task outcomes as rewards to iteratively refine the model's tool use strategy, enabling autonomous discovery of optimal tool invocation patterns without human priors. Experiments on the challenging MATH Olympiad benchmark AIME demonstrate ReTool's superiority: Our 32B model achieves 67% accuracy with 400 training steps, outperforming text-based RL baseline (40% accuracy, 1080 steps) in efficiency and performance. Remarkably, ReTool-32B attains 72.5% accuracy in extended settings, surpassing OpenAI's o1-preview by 27.9%. Further analysis reveals emergent behaviors such as code self-correction, signaling an ''aha moment'' in which the model autonomously masters adaptive tool use. These findings highlight the promise of outcome-driven tool integration for advancing complex mathematical reasoning and offer new insights into hybrid neuro-symbolic systems.
format Preprint
id arxiv_https___arxiv_org_abs_2504_11536
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ReTool: Reinforcement Learning for Strategic Tool Use in LLMs
Feng, Jiazhan
Huang, Shijue
Qu, Xingwei
Zhang, Ge
Qin, Yujia
Zhong, Baoquan
Jiang, Chengquan
Chi, Jinxin
Zhong, Wanjun
Computation and Language
Artificial Intelligence
While reasoning models (e.g., DeepSeek R1) trained with reinforcement learning (RL), excel in textual reasoning, they struggle in scenarios requiring structured problem-solving, such as geometric reasoning, concise computation, or complex equation solving-areas where computational tools like code interpreters (CI) demonstrate distinct advantages. To bridge this gap, we propose ReTool, which enhances long-form reasoning with tool-integrated learning, including two key features: (1) dynamic interleaving of real-time code execution within natural language reasoning processes, and (2) an automated RL paradigm that allows policy rollouts with multi-turn real-time code execution and teaches the model in learning when and how to invoke tools based on outcome feedback. ReTool employs a systematic training framework, beginning with synthetic cold-start data generation to produce code-augmented long-form reasoning traces for fine-tuning base models. Subsequent RL training leverages task outcomes as rewards to iteratively refine the model's tool use strategy, enabling autonomous discovery of optimal tool invocation patterns without human priors. Experiments on the challenging MATH Olympiad benchmark AIME demonstrate ReTool's superiority: Our 32B model achieves 67% accuracy with 400 training steps, outperforming text-based RL baseline (40% accuracy, 1080 steps) in efficiency and performance. Remarkably, ReTool-32B attains 72.5% accuracy in extended settings, surpassing OpenAI's o1-preview by 27.9%. Further analysis reveals emergent behaviors such as code self-correction, signaling an ''aha moment'' in which the model autonomously masters adaptive tool use. These findings highlight the promise of outcome-driven tool integration for advancing complex mathematical reasoning and offer new insights into hybrid neuro-symbolic systems.
title ReTool: Reinforcement Learning for Strategic Tool Use in LLMs
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2504.11536