betaFeedback

WorksComputer Science

Outcome-Mass Alignment: Controlling Length-Dependent Trajectory Influence in Multi-Turn LLM Agent Reinforcement Learning

Abstract

To keep long interaction contexts tractable, stepwise group-relative training for multi-turn LLM agents materializes each source trajectory into multiple response rows and valid tokens. This expansion creates an outer-accounting problem distinct from within-trajectory credit assignment: row-based outcome statistics can count one episode outcome multiple times, while token-level reduction can assign unequal aggregate objective mass across trajectories. We term these effects outcome-statistics multiplicity and objective-mass imbalance. We introduce Outcome-Mass Alignment (OMA), a two-component method that makes both accounting choices explicit. Outcome Alignment computes outcome statistics over unique source trajectories, while Mass Alignment controls aggregate objective mass after within-trajectory aggregation of optimizer-native token objectives. Neither redesigns the base optimizer's credit assignment, importance ratios, or clipping. Across matched ALFWorld GRPO comparisons at two model scales, where failed trajectories typically expand much more than successful ones, OMA improves matched-horizon endpoint success by 7.0-9.4 percentage points. Ordinary WebShop exhibits weak or reversed expansion-outcome coupling and correspondingly mixed effects, whereas in a success-oriented WebShop setting, WebShop-SOL, OMA improves success nAUC from 0.399 to 0.511. Component ablations and GiGPO and GSPO comparisons further support component separability and cross-optimizer compatibility. These results show that trajectory expansion always defines an implicit weighting rule, but its practical effect depends on how expansion couples to outcomes and optimizer-native updates.

Introduction

Large language models are increasingly used as agents that perceive, reason, and act through repeated interaction with external environments. Representative settings include embodied household tasks in ALFWorld (Shridhar et al., 2021) and goal-directed web interaction in WebShop (Yao et al., 2022). These tasks require long-horizon planning under sparse feedback: an agent may make tens of decisions before receiving a verifiable episode-level outcome. Reinforcement learning is therefore a natural post-training paradigm, and group-relative methods such as GRPO (Shao et al., 2024) offer a scalable, critic-free way to learn from multiple attempts at the same task. Extending this success to multi-turn agents, however, requires deciding how a long environment interaction is presented to the language-model optimizer.

Multi-turn pipelines use two main materialization patterns. Trajectory-wise optimization concatenates all states and model outputs into one sequence, as in RAGEN (Wang et al., 2025b), preserving full history but causing the effective context to grow with the interaction horizon. Stepwise optimization instead materializes each turn as a response row conditioned on a managed history, keeping individual contexts tractable but expanding each source trajectory into a variable number of optimizer-facing units (Figure 1(b)).

Figure 1. Expansion-induced trajectory reweighting under stepwise materialization. (a) Same-task, same-checkpoint ALFWorld rollouts: a 14-turn success and a 50-turn failure, each with one episode outcome. (b) One-response-row-per-turn materialization expands τi\tau_i into nin_i rows containing DiD_i valid response tokens. (c) Row-based statistics weight trajectory outcomes by nin_i, whereas token-mean reduction assigns objective mass by DiD_i.

A direct stepwise adaptation of GRPO broadcasts the same trajectory-level relative advantage to every row, obscuring which decisions helped or harmed. GiGPO localizes credit through anchor-state groups ([4]), while HGPO further organizes steps by historical-context consistency ([5]). These methods address which decisions receive credit within a trajectory. Stepwise expansion, however, creates a separate outer-accounting problem: after a source trajectory expands into multiple rows and tokens, how much total statistical and optimization influence should it receive? OMA targets this trajectory-level influence rather than redesigning within-trajectory credit assignment.

Figure 1 illustrates how stepwise materialization can reweight source trajectories: an ALFWorld task yields a 14-turn success with 1,663 response tokens and a 50-turn failure with 6,446 tokens, both sampled from the same policy checkpoint. Although each source trajectory yields one outcome, row-based outcome statistics count the outcomes with different multiplicities, while token-proportional reduction assigns different aggregate objective mass (Figure 1(c)). For this pair, the failed trajectory therefore accounts for 78.1% of the row-expanded outcome population and 79.5% of the token-weighted objective mass. This expansion-induced trajectory reweighting comprises outcome-statistics multiplicity and objective-mass imbalance. Stepwise materialization makes trajectory influence depend implicitly on row and token expansion, without an explicit trajectory-level weighting choice.

We introduce Outcome–Mass Alignment (OMA), an outer accounting framework that makes these two choices explicit and controllable. Outcome Alignment constructs the designated outcome statistics over unique source trajectories before assigning the resulting learning signals to response rows. Mass Alignment first aggregates the optimizer-native objective contributions within each source trajectory and then controls its contribution to the outer objective. OMA therefore changes neither environment interaction nor the base optimizer’s native within-trajectory credit, importance-ratio, and clipping mechanisms. Its two components can be enabled independently or jointly and instantiated with multiple group-relative policy optimizers.

We evaluate OMA on ALFWorld and WebShop with GRPO, together with GiGPO and GSPO adapter comparisons. ALFWorld exhibits strong success–failure expansion asymmetry: across two model scales, OMA improves matched-horizon success by 7.0–9.4 percentage points. Ordinary WebShop exhibits much weaker or reversed expansion–outcome coupling and correspondingly mixed effects, whereas a success-oriented WebShop setting, WebShop-SOL, improves success nAUC from 0.399 to 0.511. These results support a condition-dependent account: trajectory expansion always defines an implicit weighting rule, but its practical effect depends on how expansion couples to outcomes and optimizer-native updates.

Our contributions are:

  • We identify expansion-induced trajectory reweighting in stepwise group-relative agent training, separating outcome-statistics multiplicity from objective-mass imbalance (Sections 3.1–3.3).

  • We introduce Outcome–Mass Alignment, a two-component framework for explicit trajectory-level outcome accounting and objective weighting (Sections 3.2–3.4).

  • We validate this condition-dependent account through component ablations on ALFWorld and WebShop and GiGPO and GSPO comparisons (Section 4).

Preliminaries

Long-horizon agentic tasks. Given a task xx and an initial condition, training samples a group of KK source trajectories {τi}i=1K\{\tau_i\}_{i=1}^{K}, where τi=((oiu,aiu))u=1Hi\tau_i = ((o_{iu},a_{iu}))_{u=1}^{H_i}. Here oiuo_{iu} and aiua_{iu} are the observation and textual action at turn uu, and HiH_i is the realized horizon. Each trajectory receives one processed episode outcome yiy_i, which may be unavailable until the interaction terminates.

Stepwise policy optimization. Stepwise methods materialize turns as separate response rows conditioned on a managed history (Feng et al., [4]; He et al., [5]), so a source trajectory may produce variable numbers of rows and valid tokens. OMA studies this row-expanded optimization setting.

Group-relative policy optimization. GRPO avoids a learned value function by estimating relative advantages from the outcomes of trajectories sampled for the same task (Shao et al., 2024). For K>1K > 1, its trajectory-level statistics and standardized advantage are

μτ=1K∑i=1Kyi,sτ2=1K−1∑i=1K(yi−μτ)2,AiGRPO=yi−μτsτ+ϵ.(1)\begin{aligned} \mu_{\tau} &= \frac{1}{K}\sum_{i=1}^{K} y_i, \\ s_{\tau}^{2} &= \frac{1}{K-1}\sum_{i=1}^{K}(y_i-\mu_{\tau})^{2}, \\ A_i^{\mathrm{GRPO}} &= \frac{y_i-\mu_{\tau}}{s_{\tau}+\epsilon}. \tag*{(1)} \end{aligned}

Here ϵ>0\epsilon> 0 is a numerical stabilizer.

Outcome–Mass Alignment

Outcome–Mass Alignment (OMA) is a two-component method for controlling trajectory-level outer accounting in stepwise group-relative training. For trajectories expanded into response rows, Outcome Alignment counts each episode outcome once in the designated group statistics, while Mass Alignment controls aggregate policy-objective mass across the corresponding rows and tokens. OMA operates after rollout collection without redesigning within-trajectory credit assignment. Figure 2 summarizes the method.

Figure 2. OMA controls outer accounting at the source-trajectory level. (a) Rows are grouped by source. (b) OA computes the designated outcome component once per unique trajectory and broadcasts it to the corresponding rows. (c) MA averages native token objectives within trajectories and then across trajectories, assigning each source outer mass 1/K1/K. Native credit, ratios, detach, and clipping remain unchanged.

Expansion-Induced Trajectory Reweighting

Stepwise materialization. Building on § 2, let Ri\mathcal{R}_i contain the active response rows materialized from source trajectory τi\tau_i, and let c(r)=ic(r)=i map row rr back to its source. For token position pp, mrp∈{0,1}m_{rp} \in\{0,1\} is the valid-token mask. The number of rows, valid tokens in a row, and total valid-token count of a trajectory are

Ri={r:c(r)=i},ni=∣Ri∣,\mathcal{R}_i = \{r : c(r) = i\}, \qquad n_i = |\mathcal{R}_i|,
Tr=∑pmrp,Di=∑r∈RiTr.(2)T_r = \sum_p m_{rp}, \qquad D_i = \sum_{r \in\mathcal{R}_i} T_r. \tag*{(2)}

Thus the training representation follows τi→Ri→{(r,p):r∈Ri, mrp=1}\tau_i \to\mathcal{R}_i \to\{(r,p) : r \in\mathcal{R}_i,\, m_{rp}=1\}. Turns and rows are distinct objects, even though our current pipeline emits one active response row per turn.

Native stepwise objective. Let A~r\widetilde{A}_r denote the learning signal produced by the base optimizer for row rr. After the optimizer resolves its native advantage, importance ratio, detach, and clipping operations, let ℓrp(θ,A~r)\ell_{rp}(\theta,\widetilde{A}_r) be its unreduced token-position objective contribution, where θ\theta denotes the policy parameters. We omit its arguments when unambiguous. For a complete group reduction, common token- and row-mean objectives are

Ltoken=1∑jDj∑i∑r∈Ri∑pmrpℓrp,Lrow=1∑jnj∑i∑r∈Ri1Tr∑pmrpℓrp.(3)\begin{aligned} \mathcal{L}_{\mathrm{token}} &= \frac{1}{\sum_j D_j}\sum_i\sum_{r\in\mathcal{R}_i}\sum_p m_{rp}\ell_{rp},\\ \mathcal{L}_{\mathrm{row}} &= \frac{1}{\sum_j n_j}\sum_i\sum_{r\in\mathcal{R}_i}\frac{1}{T_r}\sum_p m_{rp}\ell_{rp}. \tag*{(3)} \end{aligned}

Consequently, trajectory ii receives coefficient mass Di/∑jDjD_i/\sum_j D_j under token mean and ni/∑jnjn_i/\sum_j n_j under row mean.

Outcome-statistics multiplicity. If the same episode outcome yiy_i is attached to every row, row-based statistics treat it as appearing nin_i times. In particular,

μrow=∑iniyi∑ini,μτ=1K∑iyi.(4)\mu_{\mathrm{row}} = \frac{\sum_i n_i y_i}{\sum_i n_i}, \qquad\mu_{\tau} = \frac{1}{K}\sum_i y_i. \tag*{(4)}

For example, a successful trajectory with (y1,n1)=(1,1)(y_1,n_1)=(1,1) and a failed trajectory with (y2,n2)=(0,3)(y_2,n_2)=(0,3) yield μrow=0.25\mu_{\mathrm{row}}=0.25, although the two source trajectories have μτ=0.5\mu_{\tau}=0.5. More generally, under the uniform distribution over source trajectories,

μrow−μτ=Cov⁡i(ni,yi)Ei[ni].(5)\mu_{\mathrm{row}}-\mu_{\tau}=\frac{\operatorname{Cov}_i(n_i,y_i)}{\mathbb{E}_i[n_i]}. \tag*{(5)}

Here EiE_i and Cov⁡i\operatorname{Cov}_i take the trajectory index ii uniformly over the group. Variable expansion therefore creates representation sensitivity; a systematic shift arises when row multiplicity couples to the processed outcome. Row-based normalization can also change the corresponding variance statistic.

Objective-mass imbalance. Even when the advantage is constructed correctly, Eq. (3) shows that the outer reduction still weights a source trajectory according to its expanded token or row count. Outcome-statistics multiplicity and objective-mass imbalance therefore occur at different stages and require different corrections.

Outcome Alignment

Let N\mathcal{N} be the base optimizer’s episode-normalization map and let srows_{\mathrm{row}} be the scale over the expanded row population, computed under the same convention as sτs_\tau. A row-expanded implementation uses N(yc(r);μrow,srow)\mathcal{N}(y_{c(r)};\mu_{\mathrm{row}},s_{\mathrm{row}}); Outcome Alignment instead uses the unique-trajectory statistics from Eq. (1):

AiOA=N(yi;μτ,sτ).(6)A_i^{\mathrm{OA}}=\mathcal{N}(y_i;\mu_\tau,s_\tau). \tag*{(6)}

For standardized GRPO, N(y;μ,s)=(y−μ)/(s+ϵ)\mathcal{N}(y;\mu,s)=(y-\mu)/(s+\epsilon), while mean-only variants retain y−μy-\mu. The aligned episode component is then broadcast to the rows of τi\tau_i. Outcome Alignment changes the population used by N\mathcal{N}, not the optimizer’s state- or history-conditioned credit mechanism. Replicating rows with the same trajectory identity and outcome therefore cannot change the aligned component, and implementations that already normalize over unique trajectories recover their native computation.

Mass Alignment

We choose a source-trajectory-uniform outer objective, assigning equal coefficient mass to each sampled trajectory regardless of its expanded length. For a complete group, Mass Alignment realizes this objective by averaging native token contributions within trajectories and then across trajectories:

LMA=1K∑i=1K[1Di∑r∈Ri∑pmrpℓrp(θ;A~r)].(7)\mathcal{L}_{\mathrm{MA}}=\frac{1}{K}\sum_{i=1}^{K}\left[\frac{1}{D_i}\sum_{r\in\mathcal{R}_i}\sum_p m_{rp}\ell_{rp}(\theta;\widetilde{A}_r)\right]. \tag*{(7)}

Each complete source trajectory consequently receives total outer mass 1/K1/K, independent of its row or token count. This removes accidental expansion-proportional weighting.

In practice, rows from one trajectory may be split across actor-loss reductions. For a reduction containing rows BB, we retain each trajectory’s fractional mass:

MB=∑r∈BTrDc(r),(8)M_B=\sum_{r\in B}\frac{T_r}{D_{c(r)}}, \tag*{(8)}
LMA,B(θ;A~)=1MB∑r∈B1Dc(r)∑pmrpℓrp(θ;A~r).\mathcal{L}_{\mathrm{MA},B}(\theta;\widetilde{A})=\frac{1}{M_B}\sum_{r\in B}\frac{1}{D_{c(r)}}\sum_p m_{rp}\ell_{rp}(\theta;\widetilde{A}_r).

A complete trajectory contributes one unit to MBM_B; a partially present trajectory contributes the fraction of its valid tokens contained in BB. Exact 1/K1/K outer mass and representation invariance hold for complete-group reductions; separately normalized partial reductions are not invariant to arbitrary repartitioning.

The effect of native token reduction is explicit in a complete batch. Let

ℓˉi=1Di∑r∈Ri∑pmrpℓrp.\bar{\ell}_i = \frac{1}{D_i} \sum_{r \in R_i} \sum_p m_{rp}\ell_{rp}.

Then

Ltoken−LMA=Cov⁡i(Di,ℓˉi)Ei[Di].(9)\mathcal{L}_{\mathrm{token}}-\mathcal{L}_{\mathrm{MA}}=\frac{\operatorname{Cov}_i(D_i,\bar{\ell}_i)}{\mathbb{E}_i[D_i]}. \tag*{(9)}

Unequal token counts always define an implicit weighting rule, while their update-level effect depends on how expanded token count couples to the optimizer-native per-trajectory objective contribution.

Unified OMA and Optimizer Instantiations

The components can be enabled independently. OA-only replaces the designated episode-level signal while retaining the native reducer; MA-only retains the native signal A~r\tilde{A}_r and applies Eq. (8). Full OMA applies both corrections:

LOMA,B(θ)=LMA,B(θ;A~OA),(10)\mathcal{L}_{\mathrm{OMA},B}(\theta)=\mathcal{L}_{\mathrm{MA},B}(\theta;\tilde{A}^{\mathrm{OA}}), \tag*{(10)}

where A~OA\tilde{A}^{\mathrm{OA}} denotes the base optimizer’s native row signals after replacing only its episode-outcome component.

OMA therefore requires access to that component and to unreduced objective contributions after native credit, ratio, detach, and clipping. GRPO broadcasts the aligned episode advantage; GiGPO retains anchor grouping, step credit, and mixing while replacing only its episode term; GSPO retains sequence ratios, detach, and clipping before Mass Alignment. Table 8 summarizes these interfaces.

BaseAligned outcome componentPreserved native components
GRPOAiOAA_i^{\mathrm{OA}}Token ratio and PPO clipping
GiGPOAiOAA_i^{\mathrm{OA}} in episode termAnchor grouping, step advantage, and token clipping
GSPOAiOAA_i^{\mathrm{OA}}Sequence ratio, detach, and sequence clipping

Table 8. OMA optimizer interfaces.

Experiments and Analysis

We evaluate OMA in target and boundary regimes. ALFWorld provides strong success–failure expansion asymmetry and supports component and dynamics analyses; ordinary WebShop tests weak or reversed coupling, WebShop-SOL modifies the training outcome, and GiGPO and GSPO probe cross-optimizer compatibility.

Experimental Setup and Expansion–Outcome Diagnosis

We evaluate Qwen2.5-1.5B/3B-Instruct (Qwen Team, 2024) on ALFWorld (Shridhar et al., 2021) and WebShop (Yao et al., 2022). ALFWorld reports validation success; WebShop reports exact success and official task score. GRPO is primary, with GiGPO and GSPO compatibility tests. In our stepwise implementation, Base uses row-expanded outcome statistics and token-mean loss reduction. OA changes the outcome-statistics population, MA changes the outer reduction, and OMA applies both.

We additionally evaluate OMA in WebShop-SOL, a success-oriented training setting that modifies the training outcome and uses successful-only termination. Evaluation retains the standard WebShop metrics. Let ziz_i be exact success, qiq_i the best trajectory score, and Niatt/NifailN_i^{\mathrm{att}}/N_i^{\mathrm{fail}} purchase/failed-purchase counts:

yiSOL={10−0.1Nifail,zi=1,−0.05,zi=0 and Niatt=0,qi−0.1Nifail,zi=0 and Niatt>0.(11)y_i^{\mathrm{SOL}} = \begin{cases} 10 - 0.1N_i^{\mathrm{fail}}, & z_i = 1,\\ -0.05, & z_i = 0 \text{ and } N_i^{\mathrm{att}} = 0,\\ q_i - 0.1N_i^{\mathrm{fail}}, & z_i = 0 \text{ and } N_i^{\mathrm{att}} > 0. \end{cases} \tag*{(11)}

The original main-text comparisons use the first 150 updates, eight trajectories per task group, batch size 16, one PPO epoch, seed 0, and four GPUs. We report endpoints and nAUC, with early [0, 50], middle [50, 110], and late [110, 150] windows; full hyperparameters, hardware, and diagnostic definitions are supplementary. ALFWorld failures commonly reach the 50-turn limit while successes terminate earlier; WebShop lengths are closer and can reverse. This diagnoses outcome–expansion coupling, but not the mass–gradient covariance governing MA, which is assessed through ablations and frozen-batch geometry.

Main Results

Table 1 and Table 2 show condition-dependent effects. OMA raises ALFWorld success from 0.734 to 0.828 at 1.5B and from 0.742 to 0.812 at 3B; the GiGPO and GSPO adapters are also positive. Ordinary WebShop is mixed or reversed, whereas WebShop-SOL improves from 0.648 to 0.734 endpoint success and from 0.399 to 0.511 success nAUC. Overall, these results show that systematic differences in row and token expansion between high- and low-outcome trajectories can make implicit trajectory reweighting consequential, and that OMA mitigates this effect through explicit trajectory-level accounting. Figure 3 gives the matched GRPO curves used in the stage and component analyses. Additional two-seed experiments on ALFWorld-3B and WebShop-1.5B are reported in Appendix § 8, covering Base/OA/MA/OMA and Base/OMA, respectively. Their mean results favor OMA over Base on ALFWorld-3B, while WebShop-1.5B shows higher endpoints but lower nAUC.

MethodPkLkClHtCoP2AllnAUC
Qwen2.5-1.5B-Instruct
GRPO86.757.181.258.365.070.073.443.5
GRPO + OMA87.575.0100.083.380.069.682.846.5
Qwen2.5-3B-Instruct
GRPO94.677.872.046.257.972.074.255.5
GRPO + OMA96.371.493.357.173.776.581.258.2
GiGPO93.371.490.6100.075.095.088.363.1
GiGPO + OMA100.076.2100.071.484.294.189.867.3
GSPO80.071.465.650.060.055.065.642.8
GSPO + OMA96.361.980.057.152.652.970.349.2

Table 1. ALFWorld main results (%). Pk/Lk/Cl/Ht/Co/P2 denote Pick, Look, Clean, Heat, Cool, and Pick2; All is endpoint success.

Figure 3. Matched-horizon GRPO success curves on ALFWorld, WebShop, and WebShop-SOL. Dotted lines mark stage boundaries at updates 50 and 110; Table 2 reports score metrics.

ScoreSuccess
MethodEndpointnAUCEndpointnAUC
WebShop – Qwen2.5-1.5B-Instruct
Base76.263.365.639.1
OA79.763.158.633.5
MA68.258.352.339.2
OMA78.857.970.339.0
WebShop – Qwen2.5-3B-Instruct
Base81.451.864.832.4
OMA71.451.857.034.4
WebShop-SOL – Qwen2.5-3B-Instruct
Base83.168.064.839.9
OA83.167.762.544.0
MA83.870.366.442.5
OMA85.669.473.451.1

Table 2. Combined WebShop and WebShop-SOL GRPO main and component results (%). Each metric reports its endpoint and nAUC through update 150. WebShop-3B includes Base and OMA only.

Outcome and Mass Alignment Ablations

OA corrects the outcome population, MA corrects outer objective mass, and OMA is invariant to both representation changes under the fixed-batch accounting contract. Table 2 and Table 3 report the completed four-way matrices.

SettingVariantSucc.nAUC
ALFWorld (3B)Base74.255.5
OA61.744.8
MA77.360.1
OMA81.258.2
ALFWorld (1.5B)Base73.443.5
OA38.322.3
MA76.651.0
OMA82.846.5

Table 3. ALFWorld GRPO component ablations (%). Succ. reports endpoint success.

The ALFWorld ablations show that the corrections are not interchangeable. OA removes row-population sensitivity but leaves token-weighted mass and underperforms Base. MA obtains the strongest overall success nAUC (0.601 at 3B and 0.510 at 1.5B). At 3B it leads the early and middle windows (0.388 and 0.682), while OMA leads late (0.754) and gives the strongest endpoints at both scales (0.812 and 0.828). At 1.5B, MA likewise leads early and middle (0.213 and 0.594), while OMA leads late (0.776). Ordinary WebShop has no uniformly dominant component. On WebShop-SOL, OA improves success nAUC, MA leads score nAUC, and OMA leads strict success and the score endpoint. Full window-level results are supplementary.

Gradient Geometry under Expansion Asymmetry

Table 4 summarizes five representative GRPO batches from a ratio-one frozen-batch audit. We recombine the same per-trajectory full-model gradient basis under Raw, OA, MA, and OMA. The near-symmetric WebShop batch remains close to Raw, whereas stronger ALFWorld expansion asymmetry is associated with larger norm changes, especially for MA, and negative OA–MA cosine in several batches. The negative cosine shows that the two corrections can act in opposing directions rather than as a scalar rescaling. Because old log probability is the detached current value, clipping is inactive and no optimizer step is taken; the audit isolates outer-accounting effects. Fixed-basis tests confirm OA invariance to row duplication, MA invariance to token-mass inflation, and OMA invariance to both within the audited contract. Table 7 provides the complete matrix and cross-policy rows; additional negative-control checks are described in the supplement.

Env.rtokr_{\mathrm{tok}}OAMAOMAcos⁡(OA,MA)\cos(\mathrm{OA}, \mathrm{MA})
WS0.990.941.020.960.996
ALF1.141.191.260.940.261
ALF2.171.932.721.30-0.421
ALF3.592.413.461.31-0.506
ALF8.782.445.051.60-0.368

Table 4. Frozen-batch full-model gradient geometry. rtokr_{\mathrm{tok}} is the ratio of mean failed-trajectory to successful-trajectory response tokens. OA, MA, and OMA report gradient-norm ratios to Raw; WS and ALF denote WebShop and ALFWorld.

SettingPolicyrtokr_{\mathrm{tok}}OAMAOMAcos⁡(OA,MA)\cos(\mathrm{OA},\mathrm{MA})cos⁡(Raw,OMA)\cos(\mathrm{Raw},\mathrm{OMA})
WebShopGRPO0.990.941.020.960.9960.996
ALFWorldGRPO1.141.191.260.940.2610.998
ALFWorldGRPO2.171.932.721.30-0.4210.947
ALFWorldGRPO3.592.413.461.31-0.5060.985
ALFWorldGRPO8.782.445.051.60-0.3680.982
ALFWorldGRPO3.962.624.351.70-0.4870.927
ALFWorldGiGPO3.012.423.531.16-0.6670.964

Table 7. Frozen-batch full-model gradient geometry. rtokr_{\mathrm{tok}} is the ratio of mean failed-trajectory response tokens to mean successful-trajectory response tokens. The final paired block compares the same ALFWorld task specification under GRPO- and GiGPO-trained policies.

Learning Dynamics and Mechanism Analysis

Figure 6 reports entropy, KL, episode-length, and signed-PG traces for the completed ALFWorld-3B and WebShop-SOL ablations. They exhibit method-associated differences consistent with the stage- and metric-dependent component results. Detailed interpretation is supplementary.

Figure 6. Five-step centered moving averages of actor entropy, KL loss, mean episode length, and signed PG loss for the completed ALFWorld-3B and WebShop-SOL ablations. The dotted PG reference marks zero; diagnostics retain method-native weighting and are interpreted with task performance.

Cross-Optimizer Composability

The GiGPO Base–OMA pair improves endpoint success from 0.883 to 0.898 and nAUC from 0.631 to 0.673; the GSPO pair improves them from 0.656 to 0.703 and from 0.428 to 0.492. Together with GRPO, these results support compatibility between outer accounting and different native objectives.

WebShop as a Boundary Case

Ordinary WebShop shows the mixed behavior expected under weak or reversed expansion–outcome asymmetry. At 1.5B, endpoint success improves from 0.656 to 0.703 and task score from 0.762 to 0.788, but success nAUC changes from 0.391 to 0.390 and score nAUC from 0.633 to 0.579. At 3B, success reverses from 0.648 to 0.570 and score from 0.814 to 0.714. Thus changing trajectory accounting has a smaller and less consistent effect when longer trajectories are not systematically associated with failure.

WebShop-SOL increases the contrast for exact success while retaining graded failures. OMA then improves success endpoint and nAUC, MA leads score nAUC, and OMA leads the score endpoint.

Together with the distinct dynamics, this within-setting ablation is consistent with outcome geometry modulating the component effects. More generally, larger accounting effects are expected when row multiplicity couples to outcome statistics or expanded token count couples to per-trajectory objective gradients.

Taken together, the results suggest a practical diagnosis. Outcome–expansion coupling determines whether row replication changes outcome statistics. Expanded token count determines native coefficient mass, while coupling to per-trajectory gradients determines the update-level effect of that weighting. The row-population effect motivates OA; the mass-weighting effect motivates MA and is better assessed through component ablations or frozen-batch geometry than through trajectory length alone. Stronger coupling on both axes is associated with larger accounting effects, whereas weak or reversed coupling is associated with mixed component rankings.

We treat ordinary WebShop as the boundary case and SOL as a modified-outcome ablation. Because model scale and termination also differ, their contrast is not an isolated causal test.

Related Work

Policy optimization and objective aggregation. Language-model policy optimization builds on PPO (Schulman et al., 2017) and critic-free estimators such as RLOO [2]. GRPO applies prompt-group relative advantages through a clipped token surrogate (Shao et al., 2024); DAPO modifies sampling, clipping, and token aggregation (Yu et al., 2025); Dr. GRPO removes length and within-question variance scaling [9]; and GSPO moves ratios and clipping to the sequence level (Zheng et al., 2025). Related work balances token- and sequence-level contributions (Zeng et al., 2026), develops length-aware normalization or token preferences [6] (Wang et al. 2025a), and aligns off-policy optimization with turn structure [7]; broader comparisons study interactions among estimators, environments, and rewards (Wang and Ammanabrolu, 2025). These methods modify normalization, credit, gradient balance, or clipping within optimizer-facing units. OMA instead uses source identity to define the outcome population and total outer objective mass after row expansion.

Credit assignment in multi-turn agents. Multi-turn agents interleave reasoning and environment actions [1] (Yao et al. 2023). Training systems use hierarchical optimization, curricula, or critic-based step feedback (Zhou et al., 2024; Qi et al., 2025; Zhou et al., 2025) within the broader temporal credit-assignment problem [12] (Zhang 2026). Turn rewards densify sparse feedback (Wei et al., 2025); hindsight and hierarchical methods estimate step values or separate planning from execution [11] (Tan et al. 2026). Group-relative methods construct state- or history-conditioned comparison groups [4, 5], or assign and propagate step- or turn-level credit [8, 13] (Wang et al. 2026; Zong et al. 2026). RAGEN optimizes whole trajectories (Wang et al., 2025b), whereas Agent Lightning materializes executions as training transitions [10]. These methods determine which decisions receive credit or how interactions are materialized; OMA instead controls each source trajectory’s aggregate influence while preserving native credit, ratios, and clipping.

Trajectory-length weighting. AsyncWebRL is the closest comparison on trajectory-length weighting [3]. In multi-step GRPO, it replaces 1/Hi1/H_i with a trajectory-independent factor, making total weight proportional to HiH_i and strengthening negative gradients from long failures to encourage efficient termination. OMA neither prefers shorter trajectories nor scales mass with HiH_i: each source receives equal outer objective mass regardless of its row or token count. OMA also constructs outcome statistics over unique source identities before broadcasting them to rows, removing representation sensitivity. Both methods expose a length-dependent outer-mass design axis but choose different weighting policies and accounting boundaries.

Conclusion

Stepwise multi-turn training expands one outcome into variable numbers of rows and tokens, inducing outcome-statistics multiplicity and objective-mass imbalance. OMA controls both through unique-trajectory statistics and equal outer trajectory mass while preserving native credit, ratios, and clipping.

Results support a condition-dependent effect: OMA is most beneficial when expansion couples strongly to outcomes and objective mass, as in ALFWorld, where MA is strongest early–middle and full OMA late and at the endpoint. Ordinary WebShop provides a weak or reversed boundary, while WebShop-SOL shows sensitivity to outcome geometry. GiGPO and GSPO results suggest cross-optimizer compatibility. Thus expansion defines an implicit trajectory-weighting policy.

Use of Generative AI. Generative AI tools were used to assist with language editing, manuscript drafting, and code refinement. The authors reviewed and verified all AI-assisted outputs and take full responsibility for the technical content, implementation, experimental results, claims, references, and conclusions.

Limitations

The original main-text experiments use one seed, two environments, and Qwen2.5 models at 1.5B/3B. Appendix A adds two-seed experiments for ALFWorld-3B and WebShop-1.5B; these summaries provide limited evidence of run-to-run variation rather than population-level estimates. Matching trainer updates does not equalize generated tokens, environment interactions, wall-clock time, or compute; mixed GPU generations also preclude efficiency claims.

Expansion–outcome coupling is policy-conditioned and can change during training. The reported dynamics are diagnostic rather than causal, and the ordinary-WebShop/WebShop-SOL contrast also changes model scale and termination. The gradient audit uses selected ratio-one frozen batches rather than bitwise historical minibatch replay. OMA requires reliable trajectory identities and valid-token accounting; its update-local normalization is not invariant to arbitrary separately normalized repartitioning.

Additional Two-Seed Experiments

We report 12 additional GRPO runs: Base, OA, MA, and OMA on ALFWorld with Qwen2.5-3B-Instruct (eight runs), and Base and OMA on WebShop with Qwen2.5-1.5B-Instruct (four runs). Each method uses two distinct training seeds, displayed as Seed 1 and Seed 2 within its setting. These labels identify independent runs rather than resumed tracking segments. The experiment provenance retains the original random-seed values and run identifiers. The additional runs are summarized separately from the original main-text experiments.

Protocol and statistics. All additional runs use four GPUs, a task-group batch size of 16, and an actor learning rate of 10−610^{-6}. Training seeds vary across the two runs; the evaluation environment seed remains fixed at 1000. Validation uses greedy decoding (temperature 0). Each curve contains validation at update 0 and every five updates through update 150. We report the observed update-150 endpoint and nAUC over [0,150][0,150], using linear interpolation between observed checkpoints and trapezoidal integration, as in Appendix § 10. Table 5 and Table 6 show the per-seed results and arithmetic means with sample standard deviations across the two seeds (n=2n = 2, denominator n−1n - 1). All values are expressed as percentages. Figure 4 and Figure 5 show the unsmoothed validation curves.

MethodSeed 1Seed 2Mean ± SD
EndpointnAUCEndpointnAUCEndpointnAUC
Base71.0954.0469.5347.0870.31 ± 1.1050.56 ± 4.92
OA64.0644.8669.5344.6466.80 ± 3.8744.75 ± 0.16
MA78.9157.4584.3859.0881.64 ± 3.8758.26 ± 1.15
OMA87.5060.7985.1658.4186.33 ± 1.6659.60 ± 1.68

Table 5. Additional ALFWorld-3B GRPO success results (%). Endpoint is validation success at update 150; nAUC integrates updates 0–150. SD is the sample standard deviation across the two runs. Seed 1 and Seed 2 are presentation labels.

MethodRun / summaryScoreSuccess
EndpointnAUCEndpointnAUC
BaseSeed 154.3541.1047.6628.41
BaseSeed 258.1149.6346.8832.17
BaseMean ± SD56.23 ± 2.6645.37 ± 6.0347.27 ± 0.5530.29 ± 2.66
OMASeed 166.3942.2256.2524.49
OMASeed 276.8445.5760.1633.80
OMAMean ± SD71.62 ± 7.3943.89 ± 2.3758.20 ± 2.7629.15 ± 6.58

Table 6. Additional WebShop-1.5B GRPO results (%). Score is the standard task score; Success is exact success. Endpoints and nAUC use the same update-150 horizon as Table 5. SD is the sample standard deviation across the two runs.

Figure 4. Additional ALFWorld-3B GRPO learning curves. Each panel shows one independent training seed for Base, OA, MA, and OMA. Lines connect every observed validation checkpoint without smoothing; marker shapes and line styles distinguish methods.

Figure 5. Additional WebShop-1.5B GRPO learning curves. Columns identify the two independent training seeds; rows report exact success and standard task score. Lines connect all observed checkpoints without smoothing. Endpoint gains need not imply higher nAUC.

ALFWorld-3B. OMA improves endpoint success over Base for both seeds, with the mean increasing from 70.31% to 86.33%; mean success nAUC increases from 50.56% to 59.60%. MA also improves both metrics over Base for both seeds, whereas OA has lower nAUC for both seeds and a lower or equal endpoint. OMA has the highest endpoint for each seed. Its mean nAUC exceeds MA’s (59.60% versus 58.26%), although their nAUC ranking differs across the two seeds.

WebShop-1.5B. OMA improves endpoint success and task score over Base for both seeds. Mean success increases from 47.27% to 58.20%, and mean task score from 56.23% to 71.62%. The nAUC comparison remains mixed across seeds: mean success nAUC decreases from 30.29% to 29.15%, and mean score nAUC from 45.37% to 43.89%. The endpoint improvements therefore coexist with less consistent learning-curve improvements.

Evidence scope. These experiments provide evidence from two valid training seeds for the selected configurations. Their means and standard deviations are descriptive. Runs identified as affected by experiment bugs are excluded, as are the additional ALFWorld-1.5B and all 7B runs; the original archives are retained for traceability.

Additional Method Details and Formal Properties

This section expands the accounting identities and representation-invariance claims underlying Outcome–Mass Alignment (OMA).

Scope and assumptions. The algebra in the main paper assumes that every active response row retains a reliable source-trajectory identity, that the episode outcome attached to rows of one source is identical, and that valid-token masks define the objective support. Exact equal mass and representation invariance are statements about a complete group reduction. Equation (8) in the main paper gives the fractional-mass implementation used when a trajectory is split across actor microbatches, but arbitrary independently normalized repartitioning is outside the invariance claim. OMA also assumes that the base optimizer exposes its designated episode-level outcome component and unreduced native objective after credit assignment, importance ratios, detach operations, and clipping.

Outcome-statistics identity. Let the source index be uniform over the KK trajectories. Expanding Cov⁡(n,y)\operatorname{Cov}(n,y) gives

Cov⁡i(ni,yi)=1K∑iniyi−(1K∑ini)(1K∑iyi).\operatorname{Cov}_{i}(n_i,y_i)=\frac{1}{K}\sum_i n_i y_i-\left(\frac{1}{K}\sum_i n_i\right)\left(\frac{1}{K}\sum_i y_i\right).

Dividing by Ei[ni]\mathbb{E}_i[n_i] yields μrow−μT\mu_{\mathrm{row}}-\mu_{\mathcal{T}}, proving the identity in main-paper Eq. (5). Thus row replication changes the processed outcome population exactly when expansion multiplicity covaries with outcome.

Objective-mass identity. Writing the native token mean as ∑iDiℓˉi/∑jDj\sum_i D_i\bar{\ell}_i/\sum_j D_j and Mass Alignment as K−1∑iℓˉiK^{-1}\sum_i\bar{\ell}_i, the same covariance expansion gives main-paper Eq. (9):

Ltoken−LMA=Cov⁡i(Di,ℓˉi)Ei[Di].\mathcal{L}_{\mathrm{token}}-\mathcal{L}_{\mathrm{MA}}=\frac{\operatorname{Cov}_i(D_i,\bar{\ell}_i)}{\mathbb{E}_i[D_i]}.

Representation-invariance claims. Outcome Alignment depends on the set of unique pairs (i,yi)(i, y_i), so duplicating rows while preserving source identities and outcomes leaves its statistics unchanged. Mass Alignment first sums valid-token contributions and divides by the corresponding source total DiD_i; duplicating a representation together with its token mass multiplies numerator and denominator by the same factor. Full OMA inherits both properties. The frozen-batch negative controls in Section G verify that each component moves when its protected accounting rule is deliberately removed.

Nature of the theoretical contribution. These results formalize outer-accounting identities and invariance contracts. The experiments test the predicted representation sensitivity in selected agent-training regimes, while ordinary WebShop supplies a boundary case.

Complete Experimental Setup

The original main-text comparisons use the first 150 trainer updates (Tupd=150T_{\mathrm{upd}} = 150). Each update samples eight trajectories per task group with batch size 16. ALFWorld permits at most 50 environment turns and WebShop at most 15. The actor learning rate is 10−610^{-6}, with one PPO epoch, KL-loss coefficient 0.01, and entropy coefficient 0.001. Validation is performed before training and every five updates. These original runs use seed 0 and four GPUs. The additional two-seed experiments are specified separately in Appendix A. Some comparisons span A800 and H20 hosts; trainer updates are therefore the primary protocol, while wall-clock and GPU-hour comparisons remain observational.

Data, Splits, and Preprocessing

ALFWorld and WebShop are existing, publicly available benchmarks cited in the main paper. ALFWorld is used through its text environment and in-distribution evaluation split. WebShop uses the public text-shopping environment and its official task goals. WebShop-SOL changes only the training outcome and successful-only termination rule; it uses the same WebShop tasks and ordinary WebShop validation metrics.

The training input files are Parquet task descriptors consumed by the common agent-training loader and bound to the corresponding environment at launch. No learned data filter, private annotation set, or result-dependent example selection is used. Benchmark assets remain governed by their original distributions.

Metrics and Their Motivation

ALFWorld exact success is the fraction of validation tasks completed successfully. WebShop exact success is the fraction of tasks for which the requested item and options are purchased; official task score retains graded partial credit. Exact success is the strict task-completion measure shared across the two environments, whereas WebShop score exposes progress that binary success omits.

For a validation metric g(t)g(t) at trainer update tt, we report the endpoint g(Tupd)g(T_{\mathrm{upd}}) and normalized area under the curve

nAUC⁡[t0,t1](g)=1t1−t0∫t0t1g(t) dt(12)\operatorname{nAUC}_{[t_0,t_1]}(g) = \frac{1}{t_1-t_0}\int_{t_0}^{t_1} g(t)\,\mathrm{d}t \tag*{(12)}

using linear interpolation between validation checkpoints. Overall nAUC uses [0,Tupd][0,T_{\mathrm{upd}}]; stage analysis uses early [0,50][0,50], middle [50,110][50,110], and late [110,Tupd][110,T_{\mathrm{upd}}] windows. A run that has not reached the end of a window is marked pending rather than extrapolated.

Endpoint values measure final matched-horizon quality. Normalized AUC measures learning over the entire matched update budget and prevents a late checkpoint from hiding early or middle behavior. Task-family success in ALFWorld diagnoses whether aggregate gains are concentrated in one interaction type. Actor entropy, KL loss, episode length, and signed PG loss are secondary mechanism diagnostics.

We separately inspect actor entropy, actor KL loss, mean episode length, and the signed policy-gradient (PG) surrogate loss over the full training trajectory. We do not compute AUC over them. The analysis instead considers their slopes, extrema, sustained changes, and temporal relationship to validation performance. Because OA and MA alter the population or reducer used by the actor objective, the logged entropy, KL, and PG values are method-native, objective-weighted diagnostics rather than reducer-neutral policy statistics.

Run Count, Lineage, and Randomness

Every original main-text method–environment–model cell is computed from one independent training lineage with seed 0. A lineage may contain multiple physical tracking segments when training resumes after interruption; resumed segments continue the same checkpoint namespace and are not additional seeds or independent replicates. Overlapping steps are resolved in canonical lineage order.

For the original main-text runs, the environment seed is set to 0 for training and offset by 1000 for validation environment construction. The WebShop environment applies the seed to Python, NumPy, and PyTorch sampling; ALFWorld receives the seed through its environment builder. Distributed kernels and asynchronous environment execution are not claimed to be bitwise deterministic. The original main-text results therefore report one observed optimization trajectory per cell; the additional experiments in Appendix § 8 report two seeds per included cell.

Paper-facing run manifest. ALFWorld includes GRPO at 1.5B and 3B with Base, OA, MA, and OMA, plus 3B GiGPO and GSPO Base–OMA pairs. WebShop includes the four GRPO variants at 1.5B and a Base–OMA pair at 3B. WebShop-SQL includes the four GRPO variants at 3B. Every original cell listed here uses one independent seed-0 lineage; the additional runs in Appendix § 8 are summarized separately.

Statistical and Development Scope

The original main-text comparisons report one seed per cell. Appendix § 8 reports per-seed results and two-seed means and sample standard deviations for the additional runs. No confidence interval or significance test is reported. Numerical differences are descriptive comparisons at a matched trainer-update horizon. Final configurations are recorded below.

Final Hyperparameters

The tables below report the final hyperparameter settings used in the original main-text comparisons, grouping identical values across settings.

Accounting variants. Base uses the native row-expanded signal and token mean. OA replaces only the outcome statistics with the unique-trajectory population. MA retains the native signal but reduces the valid-token objective within each trajectory and then across trajectories. OMA applies both changes while preserving the base optimizer’s ratio, detach construction, and clipping.

Optimizer-specific settings. GRPO uses γ=λ=1\gamma=\lambda=1 and the standard clipped tokenwise objective. GiGPO uses γ=0.95\gamma=0.95, λ=1\lambda=1, mean/std step normalization, and step-advantage weight 1. GSPO uses γ=λ=1\gamma=\lambda=1 and its sequence loss with lower and upper clips 0.0003 and 0.0004. Their OMA variants replace the designated episode component and outer reducer only. WebShop-SQL uses successful-only termination, success reward 10, failed-purchase penalty 0.1, and no-purchase penalty 0.05.

Infrastructure and Software

The original main-text experiments use one node and four GPUs. Recorded run metadata identify two accelerator classes: NVIDIA A800 PCIe Shared settings; “top-kk disabled” denotes top-kk = −1-1.

Shared settingFinal value
Actor optimizationlearning rate 10−610^{-6}; weight decay 0.01; gradient clip 1.0; one PPO epoch
Standard policy objectiveratio clip 0.2; low-variance KL loss coefficient 0.01; entropy coefficient 0.001
Reward and advantage controlsno KL term in reward; invalid-action penalty enabled with coefficient 0.1; standard GRPO normalization by group standard deviation
Training sample unit16 task groups per update; 8 trajectories per group
Generationtemperature 1.0 for training and 0.4 for validation; top-pp = 1.0; top-kk disabled
Model executionrollout dtype bfloat16; LoRA disabled
Validation and randomnessvalidation before training and every 5 updates; seed 0; one node with 4 GPUs

Table 10.

SettingALFWorldWebShopWebShop-SOL
ModelQwen2.5-1.5B/3B-InstructQwen2.5-1.5B/3B-InstructQwen2.5-3B-Instruct
Prompt / response limit2048 / 5124096 / 5124096 / 512
History / max turns2 / 502 / 152 / 15
Validation batch128128128
PPO minibatch / per-GPU microbatch256 / 3264 / 864 / 8
Tensor parallelism1 at 1.5B; 2 at 3B1 at 1.5B; 2 at 3B2

Table 11.

Final scientifically relevant hyperparameters: shared settings followed by environment and model deltas.

GPUs with 80 GB each and NVIDIA H20 GPUs with 96 GB each. Recorded host profiles contain 1007–1510 GB system memory and Intel Xeon Gold 6330 or Intel Xeon Platinum 8458P CPUs. Runs span Ubuntu 22.04.5/24.04.2, Python 3.10.20/3.12.11/3.12.13, and CUDA 12.4/12.9.

The two principal software families are PyTorch 2.8.0, Transformers 4.57.3, vLLM 0.11.0, and Ray 2.49.2/2.50.0 for the later ALFWorld and WebShop runs; and PyTorch 2.6.0, Transformers 4.51.1, vLLM 0.8.2, and Ray 2.49.2 for WebShop-SOL and earlier WebShop runs.

Complete Stage-Wise and Component Results

The stage decomposition sharpens the ALFWorld result. At 3B, MA has the largest early and middle nAUC (0.388 and 0.682), compared with 0.327 and 0.620 for Base and 0.346 and 0.663 for OMA. In the late window, OMA becomes strongest (0.754), slightly above MA (0.744) and Base (0.741). The 1.5B matrix shows the same division: MA is strongest in the early and middle windows (0.213 and 0.594), whereas OMA is strongest in the late window (0.776). Thus Mass Alignment is associated with the clearest early-to-middle acceleration, while joint alignment produces the strongest late and endpoint performance.

Ordinary WebShop exhibits a mixed component ordering. OA obtains the strongest score endpoint (0.797), MA the strongest success nAUC (0.392), and OMA the strongest success endpoint (0.703); none dominates all four metrics. This component-level inconsistency matches the weak or reversed expansion–outcome coupling observed for the benchmark.

The completed WebShop-SOL matrix shows a related but non-identical division of labor. OA improves success nAUC from 0.399 to 0.440, but its endpoint success is lower than Base (0.625 versus 0.648) and its score metrics are essentially unchanged. MA improves endpoint success to 0.664 and obtains the strongest score nAUC, 0.703, compared with 0.680 for Base. OMA is strongest on strict success, raising endpoint success to 0.734 and success nAUC to 0.511; it also obtains the strongest score endpoint, 0.856, although its score nAUC (0.694) remains below MA. OMA’s success advantage is present in all three windows: early nAUC increases from 0.137 to 0.262, middle from 0.490 to 0.609, and late from 0.590 to 0.674.

Learning-dynamics diagnostics. Figure 6 compares the full component matrices on ALFWorld-3B and WebShop-SOL.

On ALFWorld-3B, MA reduces entropy, increases KL, and shortens episodes earliest; OMA follows less extremely and gives the strongest late performance, while OA changes these quantities less. The dynamics therefore match MA’s early–middle advantage and OMA’s late advantage.

Near the beginning of a PPO update, signed PG loss approximates the negative objective-weighted mean advantage when the importance ratio is close to one. Across both settings, OA has a positive mean, MA a negative mean, and OMA a mean close to zero, while Base has a smaller positive offset. This pattern is consistent with joint alignment, but clipping and within-update changes also affect the scalar: zero is not an optimization target, and lower PG loss does not imply a better policy.

SettingVariantEarlyMiddleLateEndpoint
ALFWorld GRPO (3B)Base32.762.074.174.2
OA33.644.060.261.7
MA38.868.274.477.3
OMA34.666.375.481.2
ALFWorld GRPO (1.5B)Base15.646.873.473.4
OA11.022.935.438.3
MA21.359.475.576.6
OMA15.951.377.682.8
WebShop GRPO (1.5B)Base15.045.160.365.6
OA15.135.453.558.6
MA15.542.863.652.3
OMA15.942.063.270.3
WebShop GRPO (3B)Base9.734.258.064.8
OMA7.942.954.957.0
WebShop-SOL GRPO (3B)Base13.749.059.064.8
OA18.453.262.162.5
MA11.853.864.066.4
OMA26.260.967.473.4
ALFWorld GiGPO (3B)Base40.766.785.788.3
OMA38.878.486.489.8
ALFWorld GSPO (3B)Base31.843.156.065.6
OMA32.353.364.270.3

Table 12. Complete success-rate stage results (%). Early, middle, and late are normalized AUC over updates [0, 50], [50, 110], and [110, 150]; Endpoint is success at update 150. Bold marks the best value within each setting.

WebShop-SOL shows the same component separation under different outcome geometry: OA retains higher entropy and lower KL while improving success nAUC; MA produces stronger displacement and the best score nAUC; OMA has intermediate entropy/KL dynamics and the strongest strict-success curve. Entropy can reflect competence or collapse, KL measures displacement rather than quality, and episode length mixes behavior with the success/failure composition.

Frozen-Batch Gradient Audit

The audit isolates outer accounting from trajectory generation. For each real mixed eight-rollout group, it computes one full-model gradient basis vector per trajectory from mean response log-probability, then combines the unchanged basis under Raw, OA, MA, and OMA coefficients. The old log-probability is defined as the detached current value, so the importance ratio is one, clipping is inactive, and no optimizer step is executed. The available trajectory archive does not preserve historical token IDs; responses are therefore retokenized with strict agreement to the recorded token counts.

Table 7 reports the complete paper-facing matrix. For ALFWorld, increasing failure-to-success response-token asymmetry generally increases the magnitude of both accounting corrections, especially MA, while the exact angular relationship remains batch-conditioned. The near-symmetric WebShop batch keeps all four gradients closely aligned. On the matched ALFWorld task specification, both GRPO- and GiGPO-trained policies exhibit strong OA–MA separation, but these rows apply the same ratio-one outer accounting audit and do not replay GiGPO’s native ratio, clipping, or within-trajectory objective.

As a contract check, the audit also doubles failed-trajectory row multiplicity, token mass, or both without changing token-level gradient bases. OA remains invariant to row duplication, MA remains invariant to token-mass inflation, and OMA remains invariant to both in every reported batch; sensitive negative controls move in each case. These checks validate the intended accounting properties, while the main performance and ablation experiments establish learning outcomes.

Optimizer Instantiations

OMA replaces only the designated episode-outcome component and the outer reducer while retaining each optimizer’s within-trajectory mechanisms.

GRPO interface. Outcome Alignment replaces the episode score used to form the group-relative advantage and broadcasts the resulting AiOAA_i^{\mathrm{OA}} to that trajectory’s valid response tokens. The token likelihood ratio and PPO clipping remain unchanged. Mass Alignment is applied only after those native tokenwise surrogates are formed: valid-token contributions are summed within each trajectory, normalized by that trajectory’s valid-token count, and then averaged across the unique trajectories in the minibatch. OA-only retains the native token reducer, whereas MA-only retains the native GRPO advantage.

GiGPO interface. The designated episode-level term is replaced by AiOAA_i^{\mathrm{OA}}, while anchor-state grouping, the row-specific step advantage, their native mixing, and token-level clipping are preserved. The combined unreduced row objective is then passed to the same trajectory-balanced outer reducer.

GSPO interface. The aligned trajectory outcome replaces the corresponding episode signal, but the sequence likelihood ratio, detach construction, and sequence-level clipping remain native to GSPO. Mass Alignment acts after the clipped sequence objective is available, equalizing outer trajectory mass rather than changing the sequence-ratio geometry.

Audit Provenance and Contract Checks

The seven paper-facing gradient rows are fixed in an anonymized scientific audit record bound by digest e43e8937b62a. The record removes checkpoint paths, task identifiers, training-repository metadata, and original trajectory identifiers. Its manifest maps every row to opaque batch metadata, sufficient combined-gradient Gram entries, file hashes, the ratio-one contract, and invariance results. Validation verifies every recorded file hash, regenerates the paper-facing tables, and recomputes the reported token ratios, norm ratios, cosines, and invariance comparisons.

RowAuditPairFingerprintInv.
1WS base–0a67124112/12
2ALF low–422169c112/12
3ALF median–aca0014912/12
4ALF standard–07ff99a712/12
5ALF high–8e25624f12/12
6ALF GRPO paira4ea2649512/12
7ALF GiGPO paira21f6a5b412/12

Table 9. Anonymized gradient-audit snapshot. Fingerprints identify frozen eight-trajectory batches; Inv. reports passed invariance checks.

All audits pass the ratio-one, clipping-inactive contract. Row duplication leaves OA and OMA invariant, token inflation leaves MA and OMA invariant, and both perturbations leave only OMA invariant; every sensitive control exceeds the relative-change threshold.

References

  1. [1]Marwa Abdulhai, Isadora White, Charlie Snell, Charles Sun, Joey Hong, Yuexiang Zhai, Kelvin Xu, and Sergey Levine. 2023. LMRL gym: Benchmarks for multi-turn reinforcement learning with language models. Preprint, arXiv:2311.18232.arxiv.org/abs/2311.18232
  2. [2]Arash Ahmadian, Chris Cremer, Matthias Gallé, Marzieh Fadaee, Julia Kreutzer, Olivier Pietquin, Ahmet Üstün, and Sara Hooker. 2024. Back to basics: Revisiting REINFORCE style optimization for learning from human feedback in LLMs. Preprint, arXiv:2402.14740.arxiv.org/abs/2402.14740
  3. [3]Hao Bai, Rui Yang, Chenlu Ye, Spencer Whitehead, Aviral Kumar, and Tong Zhang. 2026. AsyncWebRL: Efficient multi-step RL for visual web agents. Preprint, arXiv:2606.05597.arxiv.org/abs/2606.05597
  4. [4]Lang Feng, Zhenghai Xue, Tingcong Liu, and Bo An. 2025. Group-in-group policy optimization for LLM agent training. Preprint, arXiv:2505.10978.arxiv.org/abs/2505.10978
  5. [5]Shuo He, Lang Feng, Qi Wei, Xin Cheng, Lei Feng, and Bo An. 2026. Hierarchy-of-groups policy optimization for long-horizon agentic tasks. Preprint, arXiv:2602.22817.arxiv.org/abs/2602.22817
  6. [6]Zhiyuan He, Xufang Luo, Yike Zhang, Yuqing Yang, and Lili Qiu. 2025. VL norm: Rethink loss aggregation in RLVR. Preprint, arXiv:2509.07558.arxiv.org/abs/2509.07558
  7. [7]Chenliang Li, Adel Elmahdy, Alex Boyd, Zhongruo Wang, Siliang Zeng, Alfredo Garcia, Parminder Bhatia, Taha Kass-Hout, Cao Xiao, and Mingyi Hong. 2026a. Stabilizing off-policy training for long-horizon LLM agent via turn-level importance sampling and clipping-triggered normalization. Preprint, arXiv:2511.20718.arxiv.org/abs/2511.20718
  8. [8]Jiazheng Li, Yawei Wang, Qiaojing Yan, Yijun Tian, Zhichao Xu, Huan Song, Panpan Xu, and Lin Lee Cheong. 2026b. SALT: Step-level advantage assignment for long-horizon agents via trajectory graph. In Findings of the Association for Computational Linguistics: EACL 2026, pages 4709–4725. Association for Computational Linguistics.
  9. [9]Zichen Liu, Changyu Chen, Wenjun Li, Penghui Qi, Tianyu Pang, Chao Du, Wee Sun Lee, and Min Lin. 2025. Understanding R1-Zero-like training: A critical perspective. Preprint, arXiv:2503.20783.arxiv.org/abs/2503.20783
  10. [10]Xufang Luo, Yuge Zhang, Zhiyuan He, Zilong Wang, Siyun Zhao, Dongsheng Li, Luna K. Qiu, and Yuqing Yang. 2025. Agent lightning: Train ANY AI agents with reinforcement learning. Preprint, arXiv:2505.03680.
  11. [11]Jiangweizhi Peng, Yuanxin Liu, Ruida Zhou, Charles Fleming, Zhaoran Wang, Alfredo Garcia, and Mingyi Hong. 2026. HiPER: Hierarchical reinforcement learning with explicit credit assignment for large language model agents. Preprint, arXiv:2602.16165.arxiv.org/abs/2602.16165
  12. [12]Eduardo Pignatelli, Johan Ferret, Matthieu Geist, Thomas Mesnard, Hado van Hasselt, Olivier Pietquin, and Laura Toni. 2024. A survey of temporal credit assignment in deep reinforcement learning. Preprint, arXiv:2312.01072.arxiv.org/abs/2312.01072
  13. [13]Qiuyi Qi, Tian Liang, Mutian Bao, Jinjian Zhang, Dongnan Liu, Wei Zhou, Linjian Mo, Ming Kong, Jie Liu, Feng Zhang, and Qiang Zhu. 2026. STAPO: Selective trajectory-aware policy optimization for LLM agent training. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 28371–28392. Association for Computational Linguistics.

Paper details

vlnc:W_89pmuu2b
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 12

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents