Manuscript Offprint

arXiv:2610.13755

Matched-Context Group Policy Optimization for LLM Agent Training

Chenxu Zhang, Yaorui Shi, Wenlong Zhang, Jianchao Tan, Zihan Wang, Yiming Cheng

Abstract

Training long-horizon language model agents requires assigning credit to intermediate decisions from sparse terminal feedback. Within a finite group of sibling rollouts, useful action comparisons depend on their context, evidence for both alternatives, and how that evidence enters learning. We propose Matched-Context Group Policy Optimization (MCGPO), a procedure for constructing weighted action preferences from already collected trajectories. MCGPO defines comparison contexts with pre-action state summaries and observed rubric progress, annotated by task rules. Two-action support selects among ordered exact and coarse matching rules. Fixed folds separate candidate decisions from the terminal outcomes used to orient their preferences, and support-dependent evidence weights scale an auxiliary pairwise objective alongside shared GraphGPO task learning. MCGPO reuses rollout data and each response's original history, preserving critic-free training. Across six environment–backbone settings with three training seeds each, MCGPO improves mean success over matched GraphGPO: by 0.47–1.46 percentage points on ALFWorld and WebShop with Qwen2.5-1.5B and 7B, and by 3.96 and 5.16 points on WebShop with Qwen3-4B and 8B. The ALFWorld gains build on baseline success above 92%, where remaining headroom is limited. Integrated success improves in three of four Qwen2.5 settings. Three-seed factorial controls support opposite-fold evidence and evidence weighting; joint state–rubric matching achieves the highest mean in all four representation-control settings.

Figure

Figure 1. Task context for local action comparisons. The same state summary h(s)h(s) can occur at different stages of a task. MCGPO groups decisions using the state summary and observed rubric progress C, with enabled criteria annotated by the rule-derived frontier F.

1 Introduction

Training large language model agents requires credit assignment: sparse terminal rewards must guide the intermediate actions that shape task outcomes (Zhou et al., 2024; Chen et al., 2025; Wang et al., 2025). In ALFWorld (Shridhar et al., 2021) and WebShop (Yao et al., 2022), success depends on a sequence of interdependent decisions. Group-relative reinforcement learning offers critic-free updates by comparing outcomes within a group of sampled responses or trajectories (Shao et al., 2024; Ahmadian et al., 2024; Yu et al., 2025). For multi-turn agents, GiGPO localizes these comparisons at recurring anchor states (Feng et al., 2025), while trajectory-graph methods extract step credit from collected transitions (Li et al., 2026b; Cheng et al., 2026). However, grouping by repeated states or transitions can compare decisions with different prior task progress, obscuring what their outcome contrast represents.

This mismatch arises when the same state summary describes different remaining decision problems. A page, location, or inventory summary may omit progress established before the current choice. Consequently, an action taken after more prerequisites have been met can inherit a higher success rate, while a useful action taken earlier can receive weaker relative feedback. Their outcome contrast can mix prior progress with the contribution of the current action. A captured ALFWorld task illustrates this representational issue: two empty-handed visits to the same countertop share a coarse state key, although one follows acquiring and relocating a target object (Appendix D). Adding context can separate such decisions, but stricter conditions also reduce the repeated evidence available for comparing different actions.

Recent work enriches comparison context to address this tension. HGPO combines groups at multiple history depths, and BiPACE uses policy representations and action-conditioned peer baselines (He et al., 2026; Wang et al., 2026a). Task structure offers another source of context: explicit criteria guide reward aggregation (Gunjal et al., 2025; Lv et al., 2026), policy stages and memory (Li et al., 2026a), and milestone-level credit (Wang et al., 2026d; Qian et al., 2026). However, an explicit preference between different actions also needs evidence for both alternatives. A richer context can leave one action poorly supported, so a larger outcome gap may reflect only a few trajectories. The remaining challenge is to select comparisons and weight their influence using the evidence available within a finite rollout group. This leads to our research question:

References (62)