Group-based reinforcement learning (RL), such as GRPO, has advanced the capabilities of large language models on long-horizon agentic tasks. To enable more fine-grained policy updates, recent research has increasingly shifted toward stepwise group-based policy optimization, which treats each step in a rollout trajectory independently while using a memory module to retain historical context. However, we find a key issue in estimating stepwise relative advantages, namely context inconsistency, where steps within the same group may differ in their historical contexts. Empirically, we reveal that this issue can lead to severely biased advantage estimation, thereby degrading policy optimization significantly. To address the issue, in this paper, we propose Hierarchy-of-Groups Policy Optimization (HGPO) for long-horizon agentic tasks. Specifically, within a group of rollout trajectories, HGPO assigns each step to multiple hierarchical groups according to the consistency of historical contexts. Then, for each step, HGPO computes distinct advantages within each group and aggregates them with an adaptive weighting scheme. In this way, HGPO can achieve a favorable bias-variance trade-off in stepwise advantage estimation, without extra models or rollouts. Evaluations on two challenging agentic tasks, ALFWorld and WebShop with Qwen2.5-1.5B-Instruct and Qwen2.5-7B-Instruct, show that HGPO significantly outperforms existing agentic RL methods under the same computational constraints. Code is available at https://github.com/langfengQ/verl-agent/tree/master/recipe/hgpo.
Figures & tables
Figure 1: Figure (a) compares trajectory-wise and stepwise policy optimization frameworks. Given two example group trajectories, Figure (b) illustrates trajectory-level and step-level grouping with their corresponding advantage estimations. Best viewed in color.
Figure 2: Statistics of GRPO and GiGPO. Figures (a) and (b) present the advantage differences relative to Oracle advantages for GRPO and GiGPO, respectively. Figures (c) and (d) report the average group size and the proportion of Oracle steps, respectively.
Figure 3: Overview of HGPO. The LLM-based agent interacts with a set of environments initialized from the same state s0 , producing four group trajectories (states with the same color are identical). HGPO comprises two key components: context-aware hierarchical grouping and adaptive weighted advantage computation. For illustration, consider the state s2 (purple). First, HGPO assigns s2 into three hierarchical groups according to its historical contexts. Then, it computes the final advantage estimate by adaptively aggregating the weighted advantages from these groups.
Model
Type
Method
ALFWorld
WebShop
In-Success
Out-Success
Task Scores
Task Success Rates
Closed
Prompting
GPT-4o
48.0
46.0
31.8
23.7
Prompting
Gemini-2.5-Pro
60.3
50.5
42.5
35.9
Qwen2.5-1.5B-Instruct
Prompting
Qwen2.5
4.1
-
23.1
5.2
Prompting
ReAct
12.8
-
40.1
11.3
Prompting
Reflexion
21.8
-
55.8
21.9
Table 1: Performance comparison on ALFWorld and WebShop. For ALFWorld, we report the overall success rate ( ↑ ) for both in-distribution (In-Success) and out-of-distribution tasks (Out-Success). For WebShop, we report the average task score ( ↑ ) and the average task success rate ( ↑ ). Most results are averaged over 3 random seeds during testing. The best results are highlighted in bold.
Figure 4: Distributions of hierarchical group sizes on ALFWorld and WebShop using Qwen2.5-1.5B-Instruct. “0/1/2/3/4-Context” indicates different hierarchical groups. The first two rows correspond to K=2 , and the last row corresponds to K=4 . The y-axis denotes the proportion.
Table 6
α
K
ALFWorld
WebShop
In-Suc.
Out-Suc.
Task Sco.
Task Suc.
0
2
94.33 ±1.08
90.03 ±2.58
88.40 ±2.20
73.95 ±4.21
4
92.12 ±0.40
89.58 ±1.00
87.96 ±2.48
73.82 ±3.26
1
2
92.77 ±1.08
90.16 ±0.78
85.56 ±2.86
71.54 ±4.00
4
94.85 ±0.92
92.12 ±1.63
90.64 ±1.05
78.12 ±2.06
2
2
90.36 ±0.96
86.91 ±2.03
88.29 ±2.88
72.00 ±3.03
Table 4: Parameter analysis on the effects of different values of α on ALFWorld and WebShop using Qwen2.5-1.5B-Instruct.
Ablation
K
ALFWorld
WebShop
In-Suc.
Out-Suc.
Task Sco.
Task Suc.
HGPO
2
92.77 ±1.08
90.16 ±0.78
85.56 ±2.86
71.54 ±4.00
4
94.85 ±0.92
92.12 ±1.63
90.64 ±1.05
78.12 ±2.06
w/o G1:KH
2
90.88 ±1.30
85.15 ±1.73
87.89 ±0.86
73.24 ±1.47
4
91.14 ±1.07
88.80 ±3.21
88.83 ±2.68
74.73 ±3.62
w/o Ada. wk
2
94.33 ±1.08
90.03 ±2.58
88.40 ±2.20
73.95 ±4.21
Table 5: Ablation study on ALFWorld and WebShop using Qwen2.5-1.5B-Instruct.
Table 6: Overall comparison of three different advantage estimators.
Figure 5: The prompt template of ALFWorld agents.
Figure 6: The prompt template used for WebShop agents.
Model
Type
Method
ALFWorld
WebShop
In-Success
Out-Success
Task Scores
Task Success Rates
Q2.5-1.5B
RL Training
GiGPO ( K =2)
85.42 ±1.32
80.72 ±1.62
84.52 ±0.98
69.79 ±0.59
RL Training
HGPO ( K =2)
89.58 ±0.45
80.73 ±2.38
87.53 ±0.77
72.66 ±1.78
RL Training
GiGPO ( K =4)
85.15 ±2.81
80.98 ±0.45
88.5 ±0.49
74.08 ±0.98
RL Training
HGPO ( K =4)
92.45 ±0.81
89.06 ±2.34
88.90 ±0.90
75.91 ±1.19
Q2.5-7B
RL Training
GiGPO ( K =2)
89.84 ±2.20
82.81 ±5.46
86.23 ±1.43
75.13 ±1.37
Appendix
Table 7: Performance comparison on ALFWorld and WebShop. Note that we used the old version of Verl-agent and updated the performance of using the new version of Verl-agent (with veRL updating) in Table 1 . For ALFWorld, we report the overall success rate ( ↑ ) for both in-distribution (In-Success) and out-of-distribution tasks (Out-Success). For WebShop (15 steps), we report the average task score ( ↑ ) and the average task success rate ( ↑ ). Most results are averaged over 3 random seeds during testing. The best results are highlighted in bold.
Figure 7: Training dynamics of HGPO (Red), GiGPO (Yellow), and GRPO (Purple) on ALFWorld using Qwen2.5-1.5B-Instruct. The details of these metrics are shown in Appendix D.2 .
Figure 8: Training dynamics of HGPO (Red), GiGPO (Yellow), and GRPO (Blue) on WebShop using Qwen2.5-1.5B-Instruct. Best viewed in color.
Figure 9: The distributions of hierarchical group sizes ( K=4 ) on ALFWorld and WebShop using Qwen2.5-1.5B-Instruct.
Group-based reinforcement learning (RL) has become an effective paradigm for improving large language model agents on long-horizon interactive tasks. To obtain finer-grained policy updates than trajectory-level optimization, recent work has moved toward step-level group-based RL, where intermediate steps are grouped and compared within a rollout batch. However, step-level advantage estimation is sensitive to how groups are formed: grouping by broad state keys improves coverage but may compare actions taken under different histories, while enforcing historical consistency yields fairer comparisons at the cost of fragmented groups and missing peer-comparison signal. In this paper, we propose ProGPO (Progress- and Reliability-Oriented Group Policy Optimization), a learned-critic-free method for context-consistent step-level learning. ProGPO keeps exact-prefix action comparison, and complements sparse peer comparisons with transition credit derived from rollout-based state potentials. To estimate these potentials reliably, ProGPO combines semantic expansion with inverse-variance fusion across history depths. We evaluate ProGPO on two challenging agentic tasks, ALFWorld and WebShop, with Qwen2.5-1.5B-Instruct. Results show that ProGPO improves over matched agentic RL baselines under comparable computational overhead, and additional Qwen2.5-3B-Instruct experiments further test the scalability of the proposed method.
Group-based Reinforcement Learning (RL) has significantly enhanced Large Language Models (LLMs) in agentic scenarios. To achieve finer-grained policy updates, recent agentic RL frameworks have shifted from trajectory-level to step-level training. However, long-horizon agentic RL suffers from severe reward sparsity and delay, as feedback is often deferred for dozens of interaction steps. While existing step-level frameworks refine training granularity, their credit assignment remains coarse-grained and still treats agent exploration as isolated, linear trajectories. This oversimplified perspective ignores the inherent graph structure of state transitions, leading to high-variance state-value estimation and myopic, localized credit assignment. To overcome these critical bottlenecks, we propose Group-Graph Policy Optimization (G2PO), a novel group-based RL algorithm tailored for multi-turn agentic tasks. G2PO explicitly transforms linear interaction trajectories into a global state-transition graph. By aggregating identical observations across different trajectories, we introduce group-aggregation state-value estimation that reduces sampling variance and trajectory-dependent bias. Furthermore, we redefine agent actions as transitions between state nodes and propose an edge-centric advantage estimation strategy. By globally standardizing Temporal Difference (TD) errors across the entire graph, G2PO explicitly identifies and prioritizes critical transitions that drive absolute task progress. Extensive experiments on representative long-horizon benchmarks-WebShop, ALFWorld, and AppWorld-demonstrate that G2PO substantially outperforms state-of-the-art prompt-based and RL baselines, achieving remarkable success rate improvements of up to 22.2% over GRPO.
Group-based policy optimization has been increasingly used to train large language model (LLM) agents from sparse outcome rewards by comparing trajectories or steps within a group. However, on difficult long-horizon agentic tasks, we found this comparison suffers from a sampling imbalance: repeated or low-effect actions dominate the high-probability region of the policy, leaving useful state-changing actions under-sampled. This imbalance produces many all-failed rollout groups, where the relative advantages within such a group provide no direction for updating the policy. Consequently, the sampling imbalance and the all-failed groups collapse into a self-perpetuating credit trap: failure-dominated sampling yields no learning signal, allowing repeated low-effect actions to persist. To break this trap, we propose Coverage-conditioned Group Policy Optimization (CovGPO), which uses first-visit observation coverage only when all samples in a group receive zero outcome reward. Specifically, within such groups, CovGPO assigns higher relative advantages to state-exploring actions without corrupting the original reward signal, as reaching new observations is a prerequisite for task success. Experiments on two challenging agentic benchmarks, ALFWorld and WebShop, show that CovGPO consistently improves over group-based baselines, with particularly large gains on hard tasks.
Kaibing Yang, Guangfeng Cai, Shengtian Yang +6
Southeast University · Kuaishou Technology · Meituan