Segment-level credit assignment improves agentic reinforcement learning performance

SHARPO: Segment-Level Credit Assignment for Agentic Reinforcement Learning

Machine LearningArtificial Intelligence

Summary

Agentic reinforcement learning trains large language models to perform tasks that require many steps. A single small mistake can make the entire task fail, and standard methods struggle to figure out which individual decisions caused problems. The authors introduce a new method called SHARPO that assigns credit or blame at smaller segments of the task, instead of only looking at the whole task outcome. This helps the model learn better by focusing on which parts of the task worked well or poorly, and it improves performance on benchmarks involving long, complex interactions.

What this means in practice

Authors

Xinchen Du, Zhengze Zhou, Wenhui Zhu, Han Yu, Sen Na, Rohit Jain, Alborz Geramifard

Abstract

Agentic reinforcement learning (RL) trains a large language model (LLM) to act over long, multi-step interactions. However, a single localized error can cause task failure, while trajectory-level rewards provide limited guidance for assigning credit to individual decisions. To address this limitation, we introduce Segment-level Hindsight Advantage Reweighting for Policy Optimization (SHARPO), a credit-assignment mechanism that refines Group Relative Policy Optimization (GRPO) at the level of environment-facing segments. Inspired by the existing on-policy self-distillation (OPSD) method, SHARPO computes teacher-student log-probability gaps within each segment and uses the resulting signal to compute a bounded multiplier on the GRPO advantage. This multiplier is shared by all tokens within the segment, allowing credit to vary across different segments. With Qwen2.5-7B-Instruct, SHARPO outperforms existing baselines on the ALFWorld and WebShop benchmarks, including GRPO, SDAR, RLSD, and StepOPSD.