Manuscript Offprint

arXiv:2610.25693

ToolOPD: Credit-Aware On-Policy Distillation for Tool-Use Agents

Chu Zhao, Lei Tang, Yanming Wang, Jianzhe Zhao, Guibing Guo, Zhengzong Chen, Yuanyuan Zhao, Fei Huang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

On-policy distillation (OPD) enhances the capabilities of small language agents by providing dense, token-level supervision from a teacher model on student-generated trajectories. However, standard OPD implicitly assumes that credit is uniformly distributed across long-horizon trajectories, assigning the same strength of teacher supervision to different actions. Through credit-distribution analysis and outcome-reversal counterfactual experiments, we find that trajectory credit is concentrated on a small number of critical actions. Moreover, even when the trajectory is held fixed, reversing only the final outcome substantially changes the credit assigned to multiple interaction turns. These findings show that the uniform-credit assumption fails to identify critical decisions and ultimately degrades the model's reasoning accuracy. To address these challenges, we propose ToolOPD, an outcome-aware on-policy distillation framework designed for long-horizon tool use. ToolOPD first summarizes each completed trajectory and its outcome into a reusable hindsight skill. It then measures how this skill changes the teacher's probability of each student action token and converts the change into outcome-aware credit. The resulting credit preserves supervision that supports successful decisions or discourages failed ones, while suppressing irrelevant and conflicting signals. ToolOPD uses these credits to reweight the action-level distillation loss and jointly optimizes it with reinforcement learning. Extensive experiments across multiple long-horizon tool interaction benchmarks demonstrate that ToolOPD significantly outperforms existing reinforcement learning and self-distillation baselines.

1 Introduction

Figure

Figure 1: Empirical Study Results.

Large language models (LLMs) (Naveed et al., 2025; Minaee et al., 2024; Chang et al., 2024; Zhao et al., 2026b; Thirunavukarasu et al., 2023) have demonstrated strong capabilities in complex interactive tasks by invoking external tools (Qu et al., 2025; Xu et al., 2025; Qin et al., 2024) and adapting their decisions to environmental feedback. However, long-horizon tool-use tasks (Liu et al., 2026; Li et al., 2026b) often require tens or hundreds of interaction turns while providing only a sparse success-or-failure reward at the end of the trajectory. This makes it difficult to determine which intermediate actions contribute to the final outcome. On-policy distillation (OPD) (Agarwal et al., 2024; Li et al., 2026a; Song & Zheng, 2026; Yang et al., 2026a) addresses sparse supervision by matching a compact student policy to a teacher distribution on trajectories generated by the student itself. Standard OPD implicitly assumes that credit is uniformly distributed across long-horizon trajectories, such that different actions receive equal credit and the same strength of teacher supervision. This uniform credit assignment fails to distinguish critical tool decisions from routine transitional actions, thereby weakening effective supervision for critical decisions.

To systematically characterize this issue, we conduct a series of empirical studies. As shown in Fig. 1(a), on the ALFWorld diagnostic trajectories, the top 20% of interaction turns account for 74.2% of the total

∗^{*}Corresponding authors.

credit, demonstrating that trajectory credit is highly concentrated rather than uniformly distributed. We further construct an outcome-reversal counterfactual experiment by fixing the complete task and state-action sequence while reversing only the outcome label provided to the teacher. Fig. 1(b) shows that this intervention substantially changes the credit assigned to 55.2%, 25.0%, and 50.0% of interaction turns in ALFWorld, WebShop, and SearchQA, respectively. Thus, the credit of an action depends not only on its local context but also on its relationship with the final outcome. Fig. 1(c) further shows that outcome-conflicting signals account for 53.5% of the total teacher evidence under uniform distillation. Together, these findings establish that effective long-horizon distillation must identify critical actions and determine whether the corresponding teacher signals are consistent with the trajectory outcome. Detailed settings are provided in Appendix H. Recent studies have begun to explore fine-grained credit assignment for long-horizon tasks. ATOD (Tan et al., 2026b) adaptively adjusts the distillation strength of different actions according to the discrepancy between the teacher and student policies, while TurnSight (Qu et al., 2026b) constructs multi-view hindsight information from actual tool executions and selects reliable turn-level supervision through cross-view consistency.

Unlike existing methods that determine distillation weights from local teacher–student divergence, training progress, or interaction difficulty, in this work, we propose ToolOPD, an outcome-aware on-policy distillation framework for long-horizon tool use. ToolOPD uses the terminal outcome to determine both the direction and strength of action credit. For each student-generated trajectory, ToolOPD conditions the teacher on the complete interaction process and its outcome to induce a concise hindsight skill that summarizes the effective workflow or failure pattern. It then compares the teacher's action probabilities with and without the hindsight skill to estimate the outcome-relevant credit of each action token. For successful trajectories, ToolOPD retains skill-induced probability increases that reinforce effective actions; for failed trajectories, it retains probability decreases that suppress erroneous actions. The resulting relevance is further calibrated by teacher confidence and experience-based reliability to prevent uncertain or historically inconsistent teacher signals from dominating the update. ToolOPD uses the calibrated credit to dynamically reweight the distillation loss over <action> tokens and jointly optimizes it with Group Relative Policy Optimization (GRPO) (Guo et al., 2025). This design concentrates supervision on outcome-relevant decisions while filtering redundant and conflicting signals.

Our main contributions are summarized as follows:

• Empirical findings. We show that credit in long-horizon OPD is concentrated on critical actions and depends on trajectory outcomes, while uniform distillation transfers outcome-conflicting supervision.

• Method. We propose ToolOPD, which induces outcome-conditioned hindsight skills and converts their effects on teacher predictions into fine-grained, outcome-asymmetric action credit.

• Experiments. Across multiple tool-use benchmarks and model scales, ToolOPD consistently outperforms representative reinforcement learning and OPD baselines in task performance, long-context robustness, and optimization stability.

References (42)