SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.22995 · 2026

Group-Graph Policy Optimization for Long-Horizon Agentic Reinforcement Learning

Furu Wei, Qi Zhang, Weiwei Deng, Shaohan Huang, Zihan Zhang, 𝑅, Haizhen Huang, Minghui Song, Feng Sun, Yunan Wang, 𝑟 𝑇, 𝑜, and 5 more

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2606.22995.json · badge: /api/ran/2606.22995.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Nala-YN/G2PO community
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
episode_norm_reward Ran
ran; our contract draft was wrong, not the code
Nala-YN/G2PO/g2po/core_g2po.py
code served (permissive licence) · get_code("709d3a5369cce821")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
response_length = 3
token_level_dim = 4

# token_level_rewards: shape (batch_size, response_length)
# Each token contributes to the reward
token_level_rewards = torch.randn(batch_size, response_length)

# response_mask: shape (batch_size, response_length)
# Binary mask indicating which tokens are valid
response_mask = torch.ones(batch_size, response_length)

# index: array of prompt indices, shape (batch_size,)
# Maps each sample to a prompt ID
index = np.array([0, 1], dtype=np.int64)

# traj_index: array of trajectory indices, shape (batch_size,)
# Maps each sample to a trajectory ID within a prompt
traj_index = np.array([0, 0], dtype=np.int64)

# epsilon: small value for numerical stability
epsilon = 1e-6

# remove_std: whether to only subtract mean (True) or do z-score normalization (False)
remove_std = True

# compute_mean_std_cross_steps: whether to compute statistics across all steps
# or only use first occurrence of each (index, traj_index) pair
compute_mean_std_cross_steps = True

ARGS = {
    "token_level_rewards": token_level_rewards,
    "response_mask": response_mask,
    "index": index,
    "traj_index": traj_index,
    "epsilon": epsilon,
    "remove_std": remove_std,
    "compute_mean_std_cross_steps": compute_mean_std_cross_steps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_g2po_outcome_advantage Not yet run
unverified (harvested, no recorded run)
Nala-YN/G2PO/g2po/core_g2po.py
code served (permissive licence) · get_code("4c2da902edee1c01")
How it ran

no invocation recorded.

compute_step_level_advantage Not yet run
unverified (harvested, no recorded run)
Nala-YN/G2PO/g2po/core_g2po.py
code served (permissive licence) · get_code("47893a49f8af9ef4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
episode_norm_reward
brick of this paper's assembly: data_transform
3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2604.02268 (2026-04)
SKILL0: In-Context Agentic Reinforcement Learning for Skill Internalization
2607.01440 (2026-07)
FaithMed: Training LLMs For Faithful Evidence-Based Medical Reasoning
2607.25308 (2026-07)
CAST: Game Solvers as Turn-Level Teachers for LLM Agents CAST: GAME SOLVERS AS TURN-LEVEL TEACHERS FOR LLM AGENTS

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 longhorizon 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. Code available at https://github.com/Nala-YN/G2PO.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2606.22995")
get_code_for_paper("2606.22995")
have("2606.22995")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2606.22995.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2606.22995.svg)](https://syntology.ai/paper/2606.22995)

Connect an agent — have() is free.