Skip to main navigation Skip to search Skip to main content

Agentic RL Scaling Law: Spontaneous Code Execution for Mathematical Problem Solving

  • Xinji Mai
  • , Haotian Xu
  • , W. Xing
  • , Weinong Wang
  • , Yingying Zhang*
  • , Wenqiang Zhang*
  • *Corresponding author for this work
  • Fudan University
  • Xiaohongshu

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution › peer-review

Abstract

Large Language Models (LLMs) often struggle with mathematical reasoning tasks requiring precise, verifiable computation. While Reinforcement Learning (RL) from outcome-based rewards enhances text-based reasoning, understanding how agents autonomously learn to leverage external tools like code execution remains crucial. We investigate RL from outcome-based rewards for Tool-Integrated Reasoning, ZeroTIR, training base LLMs to spontaneously generate and execute Python code for mathematical problems without supervised tool-use examples. Our central contribution is we demonstrate that as RL training progresses, key metrics scale predictably. Specifically, we observe strong positive correlations where increased training steps lead to increases in the spontaneous code execution frequency, the average response length, and, critically, the final task accuracy. This suggests a quantifiable relationship between computational effort invested in training and the emergence of effective, tool-augmented reasoning strategies. We implement a robust framework featuring a decoupled code execution environment and validate our findings across standard RL algorithms and frameworks. Experiments show ZeroTIR significantly surpasses non-tool ZeroRL baselines on challenging math benchmarks. Our findings provide a foundational understanding of how autonomous tool use is acquired and scales within Agent RL, offering a reproducible benchmark for future studies. Code is released at https://github.com/yyht/openrlhf_async_pipline.

Original languageEnglish
Title of host publication39th Conference on Neural Information Processing Systems, NeurIPS 2025
PublisherNeural information processing systems foundation
Pages8203-8218
Number of pages16
ISBN (Electronic)9798331338275
StatePublished - 2025
Event39th Conference on Neural Information Processing Systems, NeurIPS 2025 - San Diego, United States
Duration: 2 Dec 2025 → 7 Dec 2025

Publication series

NameAdvances in Neural Information Processing Systems
Volume38
ISSN (Print)1049-5258

Conference

Conference39th Conference on Neural Information Processing Systems, NeurIPS 2025
Country/TerritoryUnited States
CitySan Diego
Period2/12/25 → 7/12/25

Fingerprint

Dive into the research topics of 'Agentic RL Scaling Law: Spontaneous Code Execution for Mathematical Problem Solving'. Together they form a unique fingerprint.

Cite this