Group-in-Group Policy Optimization for LLM Agent Training

Lang Feng, Zheng-Hai Xue, Ting-Cong Liu, Bo An
5/1/2025
623 citations
rl

Official code: langfengQ/verl-agent (2,461 stars, Python, Apache-2.0, last commit 2026-02-27).

Abstract

Recent advances in group-based reinforcement learning (RL) have driven frontier large language models (LLMs) in single-turn tasks like mathematical reasoning. However, their scalability to multi-turn LLM agent training remains limited.

Show full abstract

Unlike static tasks, agent-environment interactions unfold over many steps and often yield sparse or delayed rewards, making credit assignment across individual steps significantly more challenging. In this work, we propose Group-in-Group Policy Optimization (GiGPO), a novel RL algorithm that achieves fine-grained credit assignment for LLM agents while preserving the appealing properties of group-based RL: critic-free, low memory, and stable convergence. GiGPO introduces a two-level structure for estimating relative advantage: (i) At the episode-level, GiGPO computes macro relative advantages based on groups of complete trajectories; (ii) At the step-level, GiGPO introduces an anchor state grouping mechanism that retroactively constructs step-level groups by identifying repeated environment states across trajectories. Actions stemming from the same state are grouped together, enabling micro relative advantage estimation. This hierarchical structure effectively captures both global trajectory quality and local step effectiveness without relying on auxiliary models or additional rollouts. We evaluate GiGPO on challenging agent benchmarks, including ALFWorld and WebShop, as well as tool-integrated reasoning on search-augmented QA tasks, using Qwen2.5-1.5B/3B/7B-Instruct. Crucially, GiGPO delivers fine-grained per-step credit signals, achieves performance gains of>12% on ALFWorld and>9% on WebShop over GRPO, and obtains superior performance on QA tasks (42.1% on 3B and 47.2% on 7B): all while maintaining the same GPU memory overhead, identical LLM rollout, and incurring little to no additional time cost.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

verl-agent is an extension of veRL, designed for training LLM/VLM agents via RL. verl-agent is also the official code for paper "Group-in-Group Policy Optimization for LLM Agent Training"

2,461247Python, Jupyter NotebookMar 23, 20259 months agoApache-2.0
agent-frameworkdeepseek-r1gigpogrpolarge-language-models+3 more

Similar Papers

Cite this paper

@article{feng2025groupingroup,
  title  = {Group-in-Group Policy Optimization for LLM Agent Training},
  author = {Lang Feng and Zheng-Hai Xue and Ting-Cong Liu and Bo An},
  year   = {2025},
  eprint = {2505.10978},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.10978},
  url    = {https://doi.org/10.48550/arXiv.2505.10978},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.10978.svg)](https://codeofpaper.com/paper/2505.10978)

Discussion