HiDiffTIR: Hierarchical Difficulty-Aware Policy Optimization for Multi-Turn Tool-Integrated Reasoning

Yucan Guo, Xiaohan Wang, Miao Su, Saiping Guan, Zhongni Hou, Jiajun Chai, Wei Lin, Guojun Yin, Xiaolong Jin, Jiafeng Guo, Xueqi ChengarXiv 2026

TL;DR

HiDiffTIR is a novel reinforcement learning framework that enhances how LLM agents learn to use external tools by prioritizing challenging tasks and critical reasoning steps. By extracting difficulty metrics directly from group rollout statistics, it eliminates the need for expensive external LLM judges while significantly boosting tool-use accuracy and reasoning efficiency.

What Problem Does This Paper Address?

When training Large Language Models (LLMs) to solve complex tasks using external tools—a paradigm known as Tool-Integrated Reasoning (TIR)—reinforcement learning (RL) is the go-to approach. Typically, algorithms like Group Relative Policy Optimization (GRPO) sample multiple trajectories and reward the model based on whether it arrives at the correct final answer or makes correct intermediate tool calls.

However, existing methods suffer from a major flaw: they treat all correct tool calls and successful trajectories uniformly. In reality, some tool calls are trivial, while others represent critical, high-difficulty bottlenecks in a multi-turn conversation. Assigning uniform credit across all steps creates an imprecise learning signal that fails to help the model master truly challenging tool-use patterns.

Figure 1: Comparison of credit assignment manners in TIR. Existing methods treat all correct tool calls uni- formly, while HIDIFFTIR performs difficulty-aware credit assignment.

Methods

To address this, the authors propose HiDiffTIR, a hierarchical, difficulty-aware policy optimization framework that operates at two distinct levels without requiring any external supervision (like an LLM judge or manual rubrics):

  1. Trajectory-Level Credit Assignment: For a given query, the framework samples a group of trajectories. It calculates the average success rate of specific ground-truth tool calls across the entire group to estimate their empirical difficulty. It then reweights the rewards to prioritize learning from trajectories that successfully navigated these harder tool-use patterns.
  2. Turn-Level Credit Assignment: Within a single trajectory, the framework further refines the learning signal by redistributing the trajectory-level advantage across individual turns. Turns containing highly challenging tool selections (i.e., tools rarely called correctly across the group) receive higher weights, forcing the model to focus its learning on critical decision points.

A fusion coefficient ($\alpha$) balances global trajectory-level optimization with fine-grained turn-level adjustments, and the policy is optimized end-to-end using the GRPO algorithm.

Figure 2: Illustration of the HIDIFFTIR framework. HIDIFFTIR implements a hierarchical difficulty-aware credit assignment mechanism: (a) trajectory-level, where raw turn rewards are reweighted based on turn difficulties to compute a difficulty-aware trajectory advantage, and (b) turn-level, where the trajectory advantage is redistributed to yield fine-grained reweighted turn advantages for policy optimization.

Datasets

The framework was trained and evaluated on the following benchmarks:

  • FTRL: A dataset with 2,215 training queries and 200 test queries, featuring an automated local environment with thousands of available tools executed as code.
  • ToolHop: A query-driven benchmark consisting of 995 multi-hop tool reasoning tasks designed to evaluate sequential dependencies.
  • Berkeley Function Call Leaderboard (BFCL) V3: A comprehensive benchmark of 800 multi-turn queries evaluating function-calling capabilities across diverse real-world APIs.

Key Insights and Ideas

  • Supervision-Free Difficulty Estimation: Instead of relying on an expensive GPT-4 judge to score the difficulty of a reasoning step, HiDiffTIR elegantly uses the statistical variance of the RL agent's own rollouts. If a tool call is rarely achieved across 16 parallel attempts, the framework automatically flags it as "hard."
  • Suppressing Redundancy: By explicitly reweighting advantages based on difficulty, the model learns to penalize superfluous, repetitive tool calls. This forces the agent to develop a highly compact and precise reasoning policy.
  • The Trial-and-Error Balance: The authors found that over-emphasizing turn-level difficulty (low $\alpha$) actually hurts final performance. A balanced approach is necessary because complex tool use requires a certain amount of healthy, exploratory "trial-and-error" that trajectory-level rewards protect.

Key Results

HiDiffTIR was evaluated using Qwen3-4B and Qwen3-8B as backbone models, consistently outperforming strong baselines like standard GRPO and MatchTIR.

  • Performance Boosts: On the in-domain FTRL dataset, HiDiffTIR achieved an average score of 39.48 (4B) and 40.25 (8B), outperforming the state-of-the-art MatchTIR baseline. It also demonstrated superior generalization on out-of-domain benchmarks like ToolHop and BFCL.
  • Higher Efficiency: HiDiffTIR achieved a 12.8% decrease in generation latency and reduced average response lengths compared to variants without turn-level reweighting, proving that difficulty-aware credit assignment leads to cleaner, faster reasoning paths.
Figure 4: Training dynamics regarding tool-use accu- racy of different models.
Figure 3: Training dynamics regarding the average re- sponse length and generation time of different variants.

Limitations and Future Work

  • Aggressive Calling Bias: Because the framework amplifies successful complex tool sequences, it can inadvertently bias the model toward aggressively calling tools even when the required information is missing (e.g., in BFCL's "Missing Functions" subsets). Future work will focus on integrating capability boundaries and insufficiency detection into the RL loop.
  • Scale and Sparsity: The method assumes the base model has enough foundational instruction-following capability to generate at least some successful tool calls. In exceptionally complex environments where the initial success rate is zero, the framework suffers from reward sparsity and might require a supervised warm-up phase.

Summary updated

BibTeX
@misc{guo2026hidifftir,
  author = {Yucan Guo and Xiaohan Wang and Miao Su and Saiping Guan and Zhongni Hou and Jiajun Chai and Wei Lin and Guojun Yin and Xiaolong Jin and Jiafeng Guo and Xueqi Cheng},
  title = {{HiDiffTIR: Hierarchical Difficulty-Aware Policy Optimization for Multi-Turn Tool-Integrated Reasoning}},
  year = {2026},
  eprint = {2608.21863},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.21863},
}
Figure