Demystifying Reinforcement Learning in Agentic Reasoning

Zhaochen Yu, Ling Yang, Jiaru Zou, Shuicheng Yan, Mengdi Wang

TL;DR

This paper systematically demystifies reinforcement learning (RL) for LLM agents across three dimensions: data curation, algorithmic design, and reasoning modes. By replacing stitched synthetic data with real end-to-end trajectories, relaxing algorithmic clipping constraints, and encouraging a "deliberative" reasoning style, the authors train a 4B-parameter model (DemyAgent-4B) that outperforms 32B models on elite reasoning benchmarks like AIME and GPQA.

What Problem Does This Paper Address?

While reinforcement learning has successfully scaled the reasoning capabilities of Large Language Models (LLMs) through long Chain-of-Thought (CoT) generation, applying RL to agentic reasoning—where models must interact with external tools like code interpreters or search engines—remains highly unstable.

Directly applying standard policy optimization methods (like GRPO) to agents often triggers training pathologies: inefficient on-policy exploration, reward hacking, and "entropy collapse" (where the model prematurely locks into a narrow, suboptimal strategy). Furthermore, the community lacks clear design principles regarding how agentic data should be structured, how algorithms should balance exploration vs. exploitation, and how an agent should allocate its inference budget between internal thinking and external tool calls.

Figure 1: An overview of our research on agentic RL.

Methods

The authors establish a robust baseline using Group Relative Policy Optimization (GRPO) and introduce a tailored recipe called GRPO-TCR, which incorporates three key techniques:

  1. Token-Level Loss Aggregation: Ensures every token contributes equally to the optimization signal, maximizing the model's exploratory capacity compared to sequence-level loss.
  2. Relaxed Clipping Strategy ("Clip Higher"): Modestly increasing the upper clip bound ($\epsilon_{high}$) expands the exploration budget, preventing the policy from stagnating.
  3. Overlong Reward Shaping: To prevent agents from getting stuck in verbose, infinite loops, the authors introduce a smooth linear penalty as the output length approaches the maximum budget, assigning a hard -1 reward if it exceeds it.

Datasets

The paper highlights that how data is selected and structured is paramount for agentic RL:

  • SFT Dataset (3k samples): Instead of using standard "stitched" synthetic data (where tool outputs are manually pasted into text), the authors curate real, multi-turn end-to-end tool-use trajectories using a strong teacher model. This preserves critical decision cues like pre-call analysis and error recovery.
  • RL Dataset (30k samples): A highly diverse dataset blending mathematics (17k DAPO-Math, 4.9k Skywork-o1), code generation (3.5k Skywork-o1), and scientific problems (3k MegaScience).
  • Model-Aware RL Dataset: A filtered subset tailored to the specific competence level of weaker models (e.g., Qwen2.5-7B) by removing tasks with 0% or 100% accuracy, thereby providing cleaner gradient signals.

Key Insights and Ideas

  • Real Trajectories > Stitched Data: Standard synthetic data pipelines fail because they don't teach the model when and why to invoke a tool. Real end-to-end trajectories provide a vastly superior initialization for RL.
  • Diversity Sustains Entropy: Training purely on narrow math datasets causes rapid entropy collapse. High dataset diversity acts as a natural buffer, keeping policy entropy high and driving richer exploration behaviors.
Figure 2: Comparison between our dataset with higher diversity and the ReTool dataset, which only contains math problems. Left is the average@32 accuracy on AIME2025 during training based on two different dataset. Right is the policy entropy during the training process.
  • The Competence-Difficulty Mismatch: If a dataset is too difficult for a base model, the average reward stagnates at zero. Tailoring the dataset difficulty to match the model's current capacity unlocks effective training.
Figure 3: The comparison and analysis between the impact of the 30k full dataset and our tailored dataset for Qwen2.5-RA-SFT on subsequent RL training. Left is the average@32 performance on AIME2025. Right is the analysis for the average reward during training.
  • Deliberative Mode Wins: The authors identify two agent modes: Reactive (short-think + frequent tool calls) and Deliberative (deliberate-think + fewer tool calls). The strongest models naturally adopt the Deliberative Mode, achieving over 70% success in tool usage by prioritizing quality over quantity.
  • The Long-CoT Paradox: Existing open-source Long-CoT models (like Qwen3-Thinking) actually perform worse in direct agentic RL because their ingrained priors cause them to over-rely on internal reasoning and completely avoid tools. They must be explicitly realigned via agentic SFT before undergoing RL.

Key Results

By combining these insights into their final model, DemyAgent-4B, the authors achieve state-of-the-art agentic reasoning performance, completely closing the gap with models multiple times its size:

  • AIME 2024 / 2025: DemyAgent-4B achieved 72.6% and 70.0% accuracy respectively, outperforming the 32B-parameter ReTool-32B (72.5% / 54.3%) and matching or beating massive models like DeepSeek-R1-Zero (53.5% on AIME2025 in self-contained mode).
  • GPQA-Diamond: Reached 58.5%, significantly beating its base instruction model (44.3%).
  • LiveCodeBench-v6: Achieved 26.8% accuracy, outperforming other agentic frameworks like ARPO-7B (18.3%).

Limitations and Future Work

While the results are impressive for a 4B model, the authors note several limitations:

  • Model Scale: The experiments were restricted to smaller models (4B and 7B). Because RL is notoriously sensitive to hyperparameters, these exact recipes might manifest differently when scaled to 70B+ models.
  • Data Scarcity: Generating high-quality, real end-to-end multi-turn trajectories is computationally expensive. The authors suggest exploring ultra-distilled, small-scale datasets (similar to the s1 or LIMO philosophies) for future agentic data curation.
  • Tool Scope: The current setup primarily evaluates code interpreters. Generalizing these insights to complex, multi-tool environments remains an open area for exploration.

Summary updated

BibTeX
@misc{yu2025demystifying,
  author = {Zhaochen Yu and Ling Yang and Jiaru Zou and Shuicheng Yan and Mengdi Wang},
  title = {{Demystifying Reinforcement Learning in Agentic Reasoning}},
  year = {2025},
  eprint = {2510.11701},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.11701},
}
Figure