Manuscript Offprint
arXiv:2611.12587AgentOPSD: Turn-Level Credit Assignment via Recursive Belief Revision
Abstract
Reinforcement learning with verifiable rewards ordinarily spreads a single advantage over a whole trajectory, a granularity too coarse to isolate the few decisions on which success in a long, multi-turn interaction actually turns. Privileged self-distillation supplies denser supervision, but it leaves unanswered how a set of local teacher-student discrepancies should be converted into credit along a sequence. We introduce AgentOPSD, a critic-free scheme that assigns credit recursively, one interaction turn at a time. Inside a turn, the token-level log-probability gaps between a skill-conditioned self-teacher and the student are summed, and that sum acts as evidence in a recursive Bayesian update carried out in log-odds space; the resulting revisions reallocate the outcome-derived advantage across turns through a multiplier that is bounded and preserves its sign. With Qwen2.5-3B and Qwen2.5-7B as policy backbones on ALFWorld, the method improves consistently on GRPO and on self-distillation baselines, and attains 89.1% success at the 7B scale. Ablations attribute the gain to aggregating evidence at turn boundaries and to making the belief revision depend on history, rather than to the local gap by itself.
1 Introduction
Teaching large language models to act as agents has become a principal avenue for extending their capacity on difficult tasks (Guo et al., 2025; Team et al., 2025; Yang et al., 2025; Comanici et al., 2025; Team et al., 2026b). The setting is not static single-turn reasoning: an agent inhabits a partially observable world and keeps acting, choosing from what it currently sees and then observing the
world's response before deciding again (Shen et al., 2023; Shi et al., 2025; Jimenez et al., 2023). Verification, moreover, often becomes possible only once a trajectory has finished, so a training procedure must infer the role of one intermediate step from a single sparse terminal signal. Yet steps inside a trajectory are far from interchangeable: a successful run can contain redundant, spurious or misleading actions, and a failing run can contain sensible reasoning.
Group-relative policy optimization, with GRPO (Shao et al., 2024; Yu et al., 2025) being the canonical instance alongside its agentic descendants (Dong et al., 2025; Feng et al., 2025), derives a single advantage for the whole trajectory from the outcome reward and applies it unchanged at every position. Credit that is spread this flatly cannot separate a handful of pivotal decisions from routine operations around them, and the distortion worsens as turns accumulate. Per-turn credit is therefore a prerequisite both for locating decisions that actually drive the outcome and for supervising long horizons at finer granularity.
Denser token-level supervision has been pursued along a separate line. In on-policy distillation (Ye et al., 2026; Yang et al., 2026; Team et al., 2026a), a student is trained under a teacher on rollouts of its own, while the self-distillation variants of this idea (Zhao et al., 2026; He et al., 2026) do away with any separate teacher by conditioning one and the same policy on privileged information that exists only during training (Lu et al., 2026b). Reinforcement learning has likewise used such signals as an auxiliary supervision source.
Two mismatches appear once OPSD meets agentic reinforcement learning. The first concerns granularity: token-level signals sit awkwardly against an interaction in which many tokens jointly constitute one action and the environment reacts only when a turn ends. The second concerns memory: even step-aware methods score each turn sep-
*This manuscript is a rewritten, single-environment condensation of our earlier technical report (arXiv:2608.05987v1). The ALFWorld results reported here are reproduced from that work.


Figure 1: Training dynamics and robustness to horizon of AgentOPSD on Qwen2.5-7B-Instruct / ALFWorld. (a) Validation success rate over the course of training. (b) How accuracy decays as the task horizon grows, quantified by OLS slopes of per-sub-task success against the mean number of turns taken by successful episodes. (c) Policy entropy over the course of training.
arately (Zhang et al., 2026), leaving earlier evidence unused. What must be solved, then, is how local OPSD signals become turn-level credit that depends on history.
We begin from the position that what should govern a turn's credit is not its local signal taken on its own, but how far that signal moves the estimated probability of eventual success. Precision comes from reading the per-turn self-distillation gap as newly arrived evidence driving a Bayesian belief update (Åström, 1965; Kaelbling et al., 1998). The belief state is then the probability of eventual task success given the history so far.
This observation leads us to AgentOPSD (agentic on-policy self-distillation), a method that assigns credit turn by turn in long-horizon agents. Token-level teacher-student log-probability gaps are first pooled by AgentOPSD into turn-level evidence. A Bayesian belief state, initialized at the mean group success rate, is then revised recursively turn after turn in log-odds space, with neither extra rollouts nor a learned critic required. The verifier fixes the direction of optimization globally, while the belief updates redistribute the trajectory-level learning signal over individual turns. AgentOPSD is evaluated on ALFWorld (Shridhar et al., 2020) at two model scales, and Figure 1 shows it to outperform GRPO and strong self-distillation baselines consistently. The ablations point to two sources of the improvement: pooling token-level signals at the turn boundaries that coincide with environment transitions, and reframing a gap that stands on its own as a revision of belief that recurs along the trajectory.
We summarize the contributions of this work below:
• Credit at the level of a turn is cast as the amount by which one turn revises the estimated chance that the run ends in success. Carrying the recursion in log-odds space ties the evidence of one turn to a Bayesian update applied repeatedly, and makes plain that a self-distillation gap on its own does not amount to sequential credit.
• We propose AgentOPSD, which collapses teacher-student log-probability gaps at the token level into turn-level evidence that lines up with environment transitions, then carries it recursively through the belief over trajectory success; neither extra rollouts nor a learned critic is required.
• On ALFWorld, at two model scales, experiments together with ablations show AgentOPSD to outperform GRPO and strong self-distillation baselines consistently, and the ablations confirm that aggregating at turn boundaries and revising belief by recursion bring benefits that are complementary.
2.1 Task, Interaction, and Notation
Each episode opens with a task and an initial observation , so that the interaction starts from the state . At turn the policy emits an action conditioned on the interaction history that the agent can currently see; we denote that action by , its -th token by , and the token count of the action by . The observation returned by the environment then extends

Figure 2: An overview of AgentOPSD. Left: the loop in which the agent acts, exchanging with the environment across turns 1, ..., K. Middle: in three steps, AgentOPSD turns the single sequence-level advantage of GRPO into advantages reshaped at the turn level: (1) the token-level teacher–student gaps are aggregated inside a turn, giving the turn-level gap ; (2) a belief state , started from the group success rate, is updated recursively, and its marginal revision is read off; (3) the sequence-level advantage is reshaped for each turn as . Right: vanilla GRPO instead sends one and the same to all tokens and turns. Every token of turn therefore takes on .
the history through . Chain-ing these steps over turns produces a trajectory , to which a verifier attaches a binary outcome reward .
Every task is handled by drawing trajectories under group-relative policy optimization, from whose rewards a sequence-level advantage is derived. Throughout, the index runs over these samples, and are the mean reward of the group and its standard deviation, and the small positive constant recurs everywhere as a guard against division by zero and against unbounded log-odds. The resulting advantage is handed to all tokens of trajectory in exactly the same form, so no distinction of credit between turns is ever drawn.
2.2 Turning Outcome Influence into Bayesian Turn Evidence
The counterfactual influence of turn could be quantified head-on only by averaging the outcome
reward over all continuations that might follow , and for interactions spanning many turns that marginalization is hopeless. Our stance is instead retrospective and evidential. Let denote the event in which the trajectory ends successfully. An action that advances the task should occur more often inside successful behavior than inside unsuccessful behavior, and Bayes' rule turns this observation into a change of belief about , captured by a likelihood ratio on the action side (ström, 1965; Kaelbling et al., 1998):
The map converts a probability into log-odds. What sits on the right is the ideal Bayes factor (Kass and Raftery, 1995), i.e., the ratio between the likelihood of under success and its likelihood under failure; its sign tells us at once whether the turn adds to the case for eventual success or subtracts from it.
Neither outcome-conditional behavioral distribution can be inspected directly, so the Bayesian evidence has to be recovered after the fact. We obtain it from a per-turn self-distillation contrast that is actually computable: a privileged self-teacher, associated with success, is set against the ordinary student policy. The two share the parameters and both score the same action, as sampled from the student (Zhao et al., 2026). Such a contrast supplies a tractable stand-in for a belief update that would otherwise stay out of reach, and the quality of the stand-in, together with the assumptions that justify it, is examined below. The two branches are told apart only by the token context they receive:
In this notation is the prefix of tokens already emitted within turn , while is a skill retrieved at training time only, summarizing subgoals and action patterns of use for the task (Xia et al., 2026). The skill-conditioned branch stands in for success-associated behavior, whereas the branch that sees no skill supplies the background likelihood.
For a generated token , the detached likelihood contrast is written as
Whenever is positive, the skill has made the generated token more probable than it would otherwise be. Summing the contrast over the tokens that make up the turn gives the turn-level evidence
The quantity therefore acts as a computable, retrospective surrogate for the ideal turn evidence of Eq. (3); Appendix A.1 states the conditions under which the two agree. Bayes' rule also permits a more general identity:
Read this way, is an evidential score, and its sign records the direction in which moves the support for eventual success. Sign agreement of this kind is the very property that AgentOPSD draws on, which is why is treated here as an evidence proxy that is both tractable and Bayesian in spirit.
2.3 Recursive Evidence State
Taken on its own, a local score cannot tell whether the evidence it carries is decisive or whether earlier turns have already made it redundant. We therefore keep an accumulator of evidence that decays over turns, and score each turn according to how far it moves the support state maintained so far:
with and . The seed value is the proportion of successful trajectories in a group of size , namely , which is exactly the group mean GRPO already forms (Prop. 7); is then obtained by clipping that fraction into with , and the resulting log-odds remain finite even for a group that is uniformly correct or uniformly wrong. Evidence is gathered in , and discounts it geometrically as turns recede; the discount touches alone, since the prior logit() enters every step unchanged. Setting gives back the plain, undiscounted sum of log-likelihood ratios familiar from sequential testing (Wald, 1945), whereas weights recent turns more heavily, so evidence gathered many turns ago can no longer pin the support level. Because is produced by the self-teacher (§2.2), is read as a relative level of support rather than as a calibrated probability of success.
Turn importance is then defined through the marginal revision that a turn induces in this support:
(9)
What the increment contains is the newly arrived evidence once the decayed carry-over has been removed, and the increment is multiplied by the state sensitivity : evidence counts for most while support is still uncertain, and its effect fades as support approaches saturation. At the expression reduces to . We apply the recursion at turn boundaries, keeping a token-level variant purely as an ablation.
Credit oriented by the outcome. The revision becomes outcome-aware once it is oriented by the terminal update, after which both its size and its direction can be read off:
The magnitude measures how large a revision the turn makes, while the sign sign( ) records whether that revision matches the outcome signal supplied by the verifier. After the within-trajectory standardization described below, turns scoring above the average are amplified and turns scoring below it are attenuated; the multiplier itself stays strictly positive, so the direction of the GRPO update is never reversed.
2.4 Bounded Multiplicative Reshaping
What the raw credit is allowed to touch is the magnitude of the advantage derived from the verifier, and nothing else. Trajectory i contributes turn-wise credits; we standardize them and pass the result through a bounded multiplier:
(11)
Here is the average credit inside trajectory and its standard deviation, is the credit after standardization, with keeping the normalization stable, the constant confines to , and sets how much reshaping is applied.
Every token t inherits the advantage of its own
turn, , so that the training objective reads
In this expression is the clipped per-token surrogate, the mask selects the response tokens that count, returns the turn to which token belongs, is the importance ratio between the current policy and the rollout policy , fixes the clipping radius, and scales the final term. Nothing is added in the way of a separate distillation loss: the detached signal from the self-teacher reaches the objective through and through nothing else.
3 Experiments
3.1 Experimental Setup
Benchmark. Every experiment reported here is run on ALFWorld (Shridhar et al., 2020), a benchmark in which embodied agents act through text. Its task suite is organized into six families of household activity: Pick and Place (Pick), Pick Two and Place (Pick2), Pick Clean then Place (Clean), Pick Cool then Place (Cool), Pick Heat then Place (Heat), and Look at Object in Light (Look).
Training configuration. Qwen2.5-3B/7B-Instruct models are trained with GPUs. Privileged skills are drawn from the SkillBank released with SkillRL (Xia et al., 2026) and matched by keywords; they are supplied during training alone, and no external skill is consulted at inference. The prior is initialized to the share of successful rollouts within each GRPO group, which coincides with the usual group mean . Every remaining optimization detail is inherited from our common protocol. Full tables of training and AgentOPSD-specific hyperparameters are given in Table 3 of Appendix F.
Compared methods. Three families of baselines enter the comparison. (1) No training:
Table 1: Results on ALFWorld. We report success rates (%) for each of the six task categories along with their sample-weighted average. All methods access skills at training time only, apart from those tagged with *, which keep them at validation as well. AgentOPSD itself requires no skills at test time. Top and runner-up entries are marked per model scale.
| Method | ALFWorld | ||||||
|---|---|---|---|---|---|---|---|
| Pick | Look | Clean | Heat | Cool | Pick2 | Avg | |
| Qwen2.5-3B-Instruct | |||||||
| Vanilla | 44.4 | 11.1 | 6.2 | 15.4 | 28.6 | 12.5 | 21.9 |
| Skill-Prompt* | 51.7 | 66.7 | 48.4 | 0.0 | 4.3 | 10.0 | 28.9 |
| OPSD | 48.8 | 41.7 | 16.7 | 0.0 | 15.8 | 16.7 | 28.1 |
| GRPO | 91.2 | 62.5 | 96.2 | 61.9 | 65.0 | 47.4 | 75.0 |
| Skill-GRPO | 88.9 | 71.4 | 58.8 | 70.6 | 40.7 | 29.2 | 60.2 |
| Skill-GRPO* | 94.3 | 57.1 | 100 | 66.7 | 73.1 | 57.1 | 80.5 |
| GRPO+OPSD | 100 | 82.4 | 85.7 | 75.0 | 70.0 | 60.0 | 81.2 |
| StepOPSD | 82.4 | 66.7 | 82.6 | 52.2 | 73.7 | 75.0 | 73.4 |
| AgentOPSD | 100 | 68.8 | 86.4 | 66.7 | 84.6 | 73.7 | 84.4 |
| Qwen2.5-7B-Instruct | |||||||
| Vanilla | 36.1 | 22.2 | 3.1 | 0.0 | 0.0 | 0.0 | 12.5 |
| Skill-Prompt* | 51.7 | 50.0 | 32.3 | 5.3 | 4.3 | 0.0 | 23.4 |
| OPSD | 50.0 | 60.0 | 22.7 | 21.4 | 17.6 | 9.5 | 32.8 |
| GRPO | 91.2 | 87.5 | 96.2 | 81.0 | 65.0 | 57.9 | 81.2 |
| Skill-GRPO | 88.5 | 66.7 | 65.2 | 61.1 | 57.7 | 73.1 | 69.5 |
| Skill-GRPO* | 100 | 83.3 | 96.4 | 83.3 | 75.0 | 78.9 | 88.3 |
| GRPO+OPSD | 91.4 | 61.5 | 100 | 87.5 | 76.5 | 52.2 | 80.4 |
| StepOPSD | 98.1 | 75.0 | 100 | 90.5 | 80.0 | 63.2 | 88.4 |
| AgentOPSD | 91.2 | 87.5 | 100 | 90.5 | 75.0 | 84.2 | 89.1 |
Vanilla, i.e. the backbone as released, and Skill-Prompt, which concatenates retrieved skills onto the inference-time context. (2) Group-relative RL: GRPO (Shao et al., 2024); Skill-GRPO, for which skills are added to the training prompt and evaluation is run either with them (Skill-GRPO*) or without. (3) Self-distillation RL: OPSD (Zhao et al., 2026), StepOPSD (Zhang et al., 2026), and their combination GRPO+OPSD; these three differ in the route by which the teacher–student gap reaches the policy. Backbone, data, and training budget are held identical across every row, and complete algorithmic descriptions are deferred to Appendix B.
3.2 Main Results
Gains trace to credit construction, not to privileged information. AgentOPSD and the privileged baselines consume an identical pool of retrieved skills, so what separates them is chiefly the way a skill-induced teacher–student discrepancy is converted into a learning signal. On ALFWorld, AgentOPSD beats every baseline it is compared against at both model scales. Holding the available information constant in this fashion localizes the origin of the improvement: a gap measured locally between teacher and student does not by itself amount to a dependable credit signal. Once that gap is accumulated into a belief state and credit is granted according to how the belief is revised, the turns that actually alter the predicted outcome are pinned down far more precisely.
The margin widens as the interaction horizon lengthens. Because AgentOPSD is aimed at the setting in which a uniformly assigned credit does the greatest harm, a second question follows: how quickly does accuracy fall away when tasks need more turns? In Figure 1(b), success on each sub-task is regressed against the empirical mean turn count of successful episodes on ALFWorld with Qwen2.5-7B, so that a fitted slope reads as the number of success points surrendered for each extra turn. GRPO, which broadcasts one advantage to all turns alike, sheds −2.91 points per turn, whereas
AgentOPSD stays markedly flatter at -0.54. Such a gap is what turn-level credit predicts: every added decision in a long trajectory must otherwise share a single broadcast advantage, so a revision conditioned on history pays off more as the horizon stretches.
3.3 Ablating the Mechanism Components
Table 2 takes up each design decision separately on ALFWorld with Qwen2.5-7B, removing or substituting one ingredient per row. With every ingredient present, success reaches 89.1.
Turn-level granularity and recursive revision. Belief tracking at the level of turns preserves the full-method score; when accumulation is instead done token by token, success drops to 85.9. Feedback from the environment is delivered for a whole action and never for an isolated token, so splitting a decision into token-sized units loosens the tie between the gap and the outcome. A further decline, to 82.8, follows from discarding the recursive revision in favour of the raw local gap . The raw quantity scores every turn on its own, whereas records the change that the gap induces in the belief assembled from all preceding turns; a local gap that looks decisive while the outcome is still undecided therefore turns redundant once the accumulated state already indicates how the episode will end. Isolating the recursion in this controlled manner substantiates the central claim of the paper, namely that a local gap is not yet sequential credit.
Sign alignment with the verifier outcome. If the sign is dropped and only the magnitude is kept (Eq. 10), that is, if is standardized in place of the signed , success falls back to 80.5. A magnitude reveals that the belief state has shifted, yet it cannot say whether the shift agrees with the outcome returned by the verifier: one and the same upward revision is consistent with success and inconsistent with failure. Making the direction explicit separates those two cases, so that revisions agreeing with the outcome are rewarded more and revisions contradicting it are rewarded less.
Anchoring to the state prior. Discarding the empirical prior term brings success down to 78.9. Before any trajectory-specific gap accumulates, the group success rate already supplies an estimate of task difficulty grounded in the verifier; beyond that, sets the initial log-odds and therefore the region in which
the gate operates. Lacking such an anchor, the starting uncertainty of a trajectory is arbitrary, early revisions of the belief may be rescaled wrongly, and the early turns that look pivotal can be misjudged. Read together, the three ablations assign distinct roles: localizing credit is the task of belief revision, agreeing with the final outcome is the task of the signed direction, and holding the reference point steady is the task of prior anchoring.
3.4 Hyperparameter Sensitivity
The mechanism ablation has established that each component is necessary; the question here is how far AgentOPSD depends on the continuous hyperparameters. One knob is varied while all others stay at the full-AgentOPSD values (, , ; Appendix F), and two configurations are examined in Figure 3, namely Qwen2.5-7B on ALFWorld (89.1) and Qwen2.5-3B on ALFWorld (84.4), with both checkpoints collected in the grid below.
Weight of the reshaping term . The sweep moves the objective from pure GRPO () towards fully reshaped beliefs. Of all the knobs this one matters most: gives the best result, and every smaller value costs accuracy (89.1 at versus 84.4/85.9/83.6), as expected when a smaller weakens the bounded multiplier until turn-level credit is effectively discarded. We therefore keep everywhere.
Decay of accumulated evidence . Turn-level evidence is accumulated geometrically, ; in log-odds form, is the offset plus the discounted sum . For the result moves by only a handful of points (87.5/82.0/85.2) with no monotone ordering, which indicates that the recursion does not hinge on the rate at which older evidence is discounted. All main results consequently adopt the mild choice .
Clipping of the policy ratio . Holding fixed while is varied (clip-higher (Yu et al., 2025)), AgentOPSD barely moves (88.3 for both 0.2 and 0.28), suggesting that the reshaped objective retains the trust-region robustness of GRPO. Taken as a whole, is the sole knob whose effect is systematic; at either ALFWorld scale examined here the remaining knobs stay within a few points of the full configuration, so AgentOPSD is insensitive to these sec-
| Ablated component | Alteration | ALFWorld |
|---|---|---|
| AgentOPSD (full) | bounded reshaping of turn-level credit, | 89.1 |
| Turn-level granularity of credit | score tokens individually rather than turns | 85.9 |
| Recursive revision of the belief state (8) | use the raw local gap in place of | 82.8 |
| Outcome-signed credit direction (10) | keep only the magnitude and drop the outcome sign | 80.5 |
| Anchor at the state prior | initialize without the empirical rate | 78.9 |
Table 2: Component-wise ablation of AgentOPSD on ALFWorld with Qwen2.5-7B; values denote success rate (%). Each row removes or replaces exactly one mechanism while every other setting remains unchanged. Removing the outcome-signed direction or the anchor on the state prior causes the largest drop, whereas the recursive revision of the belief state and the turn-level granularity of credit bring smaller yet consistent improvements.
ondary hyperparameters.
4 Related Work
4.1 Reinforcement Learning for Long-Horizon Agents
Work on RL with verifiable rewards initially targeted single-turn reasoning (Shao et al., 2024; Guo et al., 2025; Yu et al., 2025; Lu et al., 2026a), then progressed toward agents that act across many steps in embodied text environments (Shridhar et al., 2020; Lu et al., 2025). Only a sparse terminal reward is available in such settings, so identifying the turns that merit credit becomes particularly hard. Vanilla GRPO avoids this question altogether: it spreads one trajectory-level advantage evenly across all turns. GiGPO (Feng et al., 2025) improves matters on the reward side by pairing episode-level advantages with step-level counterparts estimated from anchor states that reappear across trajectories. AgentOPSD, by contrast, grounds its turn-level evidence in privileged teacher–student likelihood gaps, and apportions credit through recursive updates of a belief state. The two approaches therefore rely on complementary sources of information—environment rewards in the case of GiGPO, self-distillation evidence in the case of AgentOPSD.
4.2 Distilling On-Policy Signals
In on-policy distillation, a policy is optimized on its own rollouts with guidance from a teacher (Agarwal et al., 2024; Gu et al., 2026; Wen et al., 2023). Newer self-distillation variants drop the separate teacher entirely, conditioning the teacher branch instead on privileged information that is accessible only during training (Zhao et al., 2026; He et al., 2026; Lu et al., 2026b). The teacher–student log-probability gap produced in this way has lately been brought into RLVR in the form of local supervision, where it may be reweighted, annealed on a schedule, or folded into a denser reward (Xu et al., 2026; Wang et al., 2026; Ye et al., 2026; He et al., 2026). Throughout this literature the gap is mostly handled as a token-level or step-level quantity. Yet such local signals align poorly with action turns, whose contribution depends on evidence gathered across earlier interactions. StepOPSD (Zhang et al., 2026) moves in this direction by pooling the teacher–student signal across action-centered step spans, though each span is still scored by its local log-ratio. AgentOPSD abandons this local perspective: it pools token-level gaps within individual turns and then recursively incorporates that evidence into a running support state.
4.3 Assigning Credit over Long Horizons
Assigning credit over long horizons is a problem with a long history. PPO trains a value function and, through GAE, converts it into per-step temporal-difference signals (Schulman et al., 2017, 2016). Under sparse, delayed rewards, two families of methods recover intermediate structure: return-decomposition approaches such as RUDDER push the terminal reward back onto the steps responsible for it (Arjona-Medina et al., 2019), whereas process reward models and Monte-Carlo credit schemes like VinePPO infer intermediate value from additional rollouts or a learned scorer (Cui et al., 2025; Kazemnejad et al., 2024). Both regain per-step resolution at exactly the cost GRPO was meant to avoid—an extra trained critic, reward model, or heavy rollout budget. AgentOPSD restores a per-turn value signal inside the critic-free, group-

Figure 3: Sensitivity of AgentOPSD to its hyperparameters. Rows correspond to ALFWorld with Qwen2.5-7B and ALFWorld with Qwen2.5-3B. Each column varies a single knob (, , ) while the other two keep our values. Each curve is a rolling mean, and the shaded bands give a local standard deviation.
relative framework, and pays only for one teacher forward pass. Here the belief state plays a role analogous to GAE's value baseline, and its per-turn revision parallels the TD signal, all without learning a value network.
5 Conclusion
This paper tackles credit assignment for long-horizon language agents, where a trajectory-level reward can hardly separate decisive actions from routine or redundant ones. The central claim of this work is that a turn's credit should capture more than its local signal: it should capture the way in which that signal revises an accumulated belief about the trajectory's eventual success. AgentOPSD realizes this idea by aggregating token-level self-distillation gaps within turn boundaries that follow the environment's structure, and by recursively maintaining a belief about trajectory success in log-odds space. The resulting belief revisions spread the trajectory-level advantage across turns, requiring neither additional rollouts nor a learned critic. On ALFWorld and at two model scales, AgentOPSD consistently outperforms GRPO as well as strong self-distillation baselines, and ablations verify that turn-level aggregation and history-dependent belief revision both matter. Overall, these results suggest that recursive belief updating offers a simple yet
effective route to recovering fine-grained temporal credit for critic-free agentic RL.
6 Limitations
The empirical evaluation is confined to one text-based embodied benchmark, ALFWorld, and to two checkpoints of a single model family. We therefore make no claim that the observed gains carry over to other environments, larger model scales, or other modalities. The formulation presupposes that turn boundaries can be read off the environment's interaction structure and that a skill-conditioned self-teacher is available during training; settings with continuous feedback or without a usable teacher signal would call for a different construction. Group-relative advantages still require several rollouts per prompt, so the approach does not remove the sampling cost of GRPO-style training. The analysis in the appendix is developed under simplifying assumptions about the belief update and does not establish optimality or convergence of the complete training objective. Hyperparameter sensitivity is measured through one-dimensional sweeps around a single operating point; interactions between the knobs and behaviour at horizons beyond those present in ALFWorld remain unexamined. Finally, success rate is the only reported metric, and may not reflect other desiderata such as sample efficiency or robustness to distribution shift.
References
Rishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos, Matthieu Geist, and Olivier Bachem. 2024. On-policy distillation of language models: Learning from self-generated mistakes. Preprint, arXiv:2306.13649.
Jose A. Arjona-Medina, Michael Gillhofer, Michael Widrich, Thomas Unterthiner, Johannes Brandstetter, and Sepp Hochreiter. 2019. Rudder: Return decomposition for delayed rewards. Preprint, arXiv:1806.07857.
Karl Johan Åström. 1965. Optimal control of markov processes with incomplete state information i. Journal of Mathematical Analysis and Applications, 10:174–205.
Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, et al. 2025. Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261.
Ganqu Cui, Lifan Yuan, Zefan Wang, Hanbin Wang, Yuchen Zhang, Jiacheng Chen, Wendi Li, Bingxiang He, Yuchen Fan, Tianyu Yu, Qixin Xu, Weize Chen, Jiarui Yuan, Huayu Chen, Kaiyan Zhang, Xingtai Lv, Shuo Wang, Yuan Yao, Xu Han, and 6 others. 2025. Process reinforcement through implicit rewards. Preprint, arXiv:2502.01456.
Guanting Dong, Hangyu Mao, Kai Ma, Licheng Bao, Yifei Chen, Zhongyuan Wang, Zhongxia Chen, Jiazhen Du, Huiyang Wang, Fuzheng Zhang, et al. 2025. Agentic reinforced policy optimization. arXiv preprint arXiv:2507.19849.
Lang Feng, Zhenghai Xue, Tingcong Liu, and Bo An. 2025. Group-in-group policy optimization for llm agent training. arXiv preprint arXiv:2505.10978.
Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. 2026. Minillm: On-policy distillation of large language models. Preprint, arXiv:2306.08543.
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948.
Yinghui He, Simran Kaur, Adithya Bhaskar, Yongjin Yang, Jiarui Liu, Narutatsu Ri, Liam Fowl, Abhishek Panigrahi, Danqi Chen, and Sanjeev Arora. 2026. Self-distillation zero: Self-revision turns binary rewards into dense supervision. Preprint, arXiv:2604.12002.
Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. 2023. Swe-bench: Can language models resolve real-world github issues? arXiv preprint arXiv:2310.06770.
Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra. 1998. Planning and acting in partially observable stochastic domains. Artificial Intelligence, 101(1–2):99–134.
Robert E. Kass and Adrian E. Raftery. 1995. Bayes factors. Journal of the American Statistical Association, 90(430):773–795.
Amirhossein Kazemnejad, Milad Aghajohari, Eva Portelance, Alessandro Sordoni, Siva Reddy, Aaron Courville, and Nicolas Le Roux. 2024. Vineppo: Refining credit assignment in rl training of llms. Preprint, arXiv:2410.01679.
Zhengxi Lu, Yuxiang Chai, Yaxuan Guo, Xi Yin, Liang Liu, Hao Wang, Han Xiao, Shuai Ren, Pengxiang Zhao, Guangyi Liu, et al. 2026a. Ui-r1: Enhancing efficient action prediction of gui agents by reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, pages 17608–17616.
Zhengxi Lu, Zhiyuan Yao, Jinyang Wu, Chengcheng Han, Qi Gu, Xunliang Cai, Weiming Lu, Jun Xiao, Yueting Zhuang, and Yongliang Shen. 2026b. Skill0: In-context agentic reinforcement learning for skill internalization. Preprint, arXiv:2604.02268.
Zhengxi Lu, Jiabo Ye, Fei Tang, Yongliang Shen, Haiyang Xu, Ziwei Zheng, Weiming Lu, Ming Yan, Fei Huang, Jun Xiao, et al. 2025. Ui-s1: Advancing gui automation via semi-online reinforcement learning. arXiv preprint arXiv:2509.11543.
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. 2016. High-dimensional continuous control using generalized advantage estimation. Preprint, arXiv:1506.02438.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. Preprint, arXiv:1707.06347.
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al. 2024. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300.
Yongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li, Weiming Lu, and Yueting Zhuang. 2023. Hugging-gpt: Solving ai tasks with chatgpt and its friends in hugging face. Advances in Neural Information Processing Systems, 36:38154–38180.
Zhengliang Shi, Shen Gao, Lingyong Yan, Yue Feng, Xiuyi Chen, Zhumin Chen, Dawei Yin, Suzan Verberne, and Zhaochun Ren. 2025. Tool learning in the wild: Empowering language models as automatic tool agents. In Proceedings of the ACM on Web Conference 2025, pages 2222–2237.
Mohit Shridhar, Xingdi Yuan, Marc-Alexandre Côté, Yonatan Bisk, Adam Trischler, and Matthew Hausknecht. 2020. Alfworld: Aligning text and embodied environments for interactive learning. arXiv preprint arXiv:2010.03768.
Core Team, Bangjun Xiao, Bingquan Xia, Bo Yang, Bofei Gao, Bowen Shen, Chen Zhang, Chenhong He, Chiheng Lou, Fuli Luo, Gang Wang, Gang Xie, Hailin Zhang, Hanglong Lv, Hanyu Li, Heyu Chen, Hongshen Xu, Houbin Zhang, Huaqiu Liu, and 107 others. 2026a. Mimo-v2-flash technical report. Preprint, arXiv:2601.02780.
Kimi Team, Yifan Bai, Yiping Bao, Y Charles, Cheng Chen, Guanduo Chen, Haiting Chen, Huarong Chen, Jiahao Chen, Ningxin Chen, et al. 2025. Kimi k2: Open agentic intelligence. arXiv preprint arXiv:2507.20534.
Meituan LongCat Team, Anchun Gui, Bei Li, Bingyang Tao, Bole Zhou, Borun Chen, Chao Zhang, Chen Gao, Chen Zhang, Chengcheng Han, et al. 2026b. Longcat-flash-thinking-2601 technical report. arXiv preprint arXiv:2601.16725.
Abraham Wald. 1945. Sequential tests of statistical hypotheses. The Annals of Mathematical Statistics, 16(2):117–186.
Jiaqi Wang, Wenhao Zhang, Weijie Shi, Yaliang Li, and James Cheng. 2026. Tcod: Exploring temporal curriculum in on-policy distillation for multi-turn autonomous agents. Preprint, arXiv:2604.24005.
Yuqiao Wen, Zichao Li, Wenyu Du, and Lili Mou. 2023. f-divergence minimization for sequence-level knowledge distillation. Preprint, arXiv:2307.15190.
Peng Xia, Jianwen Chen, Hanyang Wang, Jiaqi Liu, Kaide Zeng, Yu Wang, Siwei Han, Yiyang Zhou, Xujiang Zhao, Haifeng Chen, Zeyu Zheng, Cihang Xie, and Huaxiu Yao. 2026. Skillrl: Evolving agents via recursive skill-augmented reinforcement learning. Preprint, arXiv:2602.08234.
Yuanda Xu, Hejian Sang, Zhengze Zhou, Ran He, Zhipeng Wang, and Alborz Geramifard. 2026. Tip: Token importance in on-policy distillation. Preprint, arXiv:2604.14084.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388.
Wencai Yang, Weijie Liu, Ruobing Xie, Kai Yang, Saiyong Yang, and Yankai Lin. 2026. Learning beyond teacher: Generalized on-policy distillation with reward extrapolation. Preprint, arXiv:2602.12125.
Tianzhu Ye, Li Dong, Xun Wu, Shaohan Huang, and Furu Wei. 2026. On-policy context distillation for language models. Preprint, arXiv:2602.12275.
Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Weinan Dai, Tiantian Fan, Gaohong Liu, Lingjun Liu, et al. 2025. Dapo: An open-source llm reinforcement learning system at scale. arXiv preprint arXiv:2503.14476.
Yanfei Zhang, Xu Lin, and Chenglin Wu. 2026. Stepopsd: Step-aware online preference distillation for agent reinforcement learning. Preprint, arXiv:2605.27140.
Siyan Zhao, Zhihui Xie, Mengchen Liu, Jing Huang, Guan Pang, Feiyu Chen, and Aditya Grover. 2026. Self-distilled reasoner: On-policy self-distillation for large language models. Preprint, arXiv:2601.18734.
Table of Contents
1 Introduction 1
2 Methodology 2
2.1 Task, Interaction, and Notation . . 2
2.2 Turning Outcome Influence into Bayesian Turn Evidence . . . . . 3
2.3 Recursive Evidence State . . . . . 4
2.4 Bounded Multiplicative Reshaping 5
3 Experiments 5
3.1 Experimental Setup . . . . . . . . 5
3.2 Main Results . . . . . . . . . . . 6
3.3 Ablating the Mechanism Components . . . . . . . . . . . 7
3.4 Hyperparameter Sensitivity . . . . 7
4 Related Work 8
4.1 Reinforcement Learning for Long-Horizon Agents . . . . . . . . . 8
4.2 Distilling On-Policy Signals . . . 8
4.3 Assigning Credit over Long Horizons 8
5 Conclusion 9
6 Limitations 9
A Theoretical Derivations 14
A.1 Self-Teacher Contrast as a Surrogate for the Bayes Factor . . . . . 14
A.2 Properties of the Reshaped Advantage . . . . . . . . . . . 14
B Training Algorithm 16
C Datasets 18
D Baseline Details 18
E Evaluation Metrics 18
F Hyperparameters 18
G Training Dynamics 19
H Prompt 20
A Theoretical Derivations
A.1 Self-Teacher Contrast as a Surrogate for the Bayes Factor
We take the turn-wise Bayes factor as the reference quantity,
while AgentOPSD substitutes the self-teacher contrast in its place,
Throughout, stands for eventual success and . Two assumptions underpin the derivation: (A1) the skill-conditioned branch behaves as the success-conditional policy, ; (A2) in the rare-success regime ( small), failed rollouts dominate the marginal, .
The marginal action distribution mixes the success- and failure-conditioned policies,
Substituting (15) into (14) under (A1) gives
Hence (A2) isolates the regime, where the contrast coincides with the Bayes factor. Under (A1) alone, on the other hand, reduces to the pointwise mutual information
which is positive if and only if increases the posterior probability of success. In (16), the correction is monotone in ; it follows that , meaning preserves the ordering of turns by evidential strength. AgentOPSD consults solely through this sign and ordering.
A.2 Properties of the Reshaped Advantage
Let denote the group-relative advantage, and let denote the per-turn belief revision. We further write for its within-trajectory standardization, for the bounded multiplier with , and for the reshaped advantage with .
Proposition 1 (Bounded Perturbation). , so that .
Proof. implies , while .
Proposition 2 (Preservation of Sign). holds at each turn k.
Proof. because , ; multiplication by a strictly positive factor leaves the sign unchanged.
Proposition 3 (GRPO as a Special Case). When , at every token, and the AgentOPSD gradient reduces to the GRPO gradient.
Proof. Setting yields ; hence identically, whatever the belief signal.
Proposition 4 (First-Order Expansion of the Belief Revision). With , , and , we have
Proof. , where ; Taylor expansion to first order about yields . The gating factor peaks at and tends to zero as .
Proposition 5 (Telescoping Property of the Idealized Recursion). Summing the idealized increments telescopes to the net change, .
Proof. .
Proposition 6 (Non-Identifiability of Turn-Level Contributions). One can find two trajectories sharing the same outcome reward—and therefore the same broadcast advantage—whose per-turn contributions nevertheless differ; turn-level credit is thus not recoverable from the trajectory's return by itself.
Proof (by construction). Consider within a single group satisfying , whence and GRPO broadcasts one scalar to all turns. Suppose succeeds via one decisive turn ( concentrated), whereas succeeds via progress spread evenly across turns. Although the returns agree, the underlying per-turn contributions do not, so recovering them calls for an extra per-turn signal.
Proposition 7 ( as an Estimate of the Group Success Rate). Consider a task whose success probability is , together with a group of trajectories, of which succeed given a binary reward. The maximum-likelihood estimator of equals the group success fraction , i.e., the usual GRPO group mean; accordingly, AgentOPSD initializes .
Proof. The MLE under a Binomial likelihood equals . Clipping () merely keeps finite for groups that are entirely correct or entirely wrong; such groups carry zero group-relative advantage and therefore contribute nothing to the update.
B Training Algorithm
Algorithm 1 summarizes one AgentOPSD training iteration at the granularity of turns. Relative to GRPO, the added components are limited to one teacher forward pass at every turn, along with the belief-reshaping block applied per turn; all remaining steps follow the standard group-relative update.
Token-level variant. In the token-level variant, the same recursion runs over the response-masked, flattened stream of tokens rather than over turns: accumulates directly at token level, undergoes standardization across all tokens of a trajectory, and is assigned token by token. This variant appears in Table 2 as the granularity ablation.
Cost. Compared with GRPO, the only added overhead is one teacher forward pass per trajectory. Since the belief-reshaping block acts elementwise, it introduces neither extra rollouts nor any trainable parameters.
Algorithm 1 AgentOPSD: Turn-Level Credit Assignment via Recursive Belief Updates
Require: policy , verifier of rewards , group size , plus a skill retriever; mixing coefficient , clipping range , evidence discount
1: for every training iteration do
2: sample a mini-batch of tasks
3: for each task together with its retrieved skill do
4: draw trajectories ; each trajectory contains turns sample on-policy rollouts
5: for do
6: obtain from the verifier the reward
7: end for
8: group-relative advantage estimate
9: for do
10: ; initialize the prior using the empirical success fraction (Prop. 7)
11:
12: for do iterate over turns, evolving the belief state
13: one extra teacher forward pass
14: ; ; ;
15: end for
16: for all sign credit by the trajectory outcome
17: standardize per trajectory
18: clip into a bounded multiplier
19: ; each token takes the of the turn it belongs to
20: end for
21: end for
22: optimize on the clipped GRPO objective using perform the policy-gradient update
23: end for
C Datasets
We run all experiments in ALFWorld, one multi-turn, text-based embodied environment focused on household reasoning.
ALFWorld (Shridhar et al., 2020) contains six task categories—Pick and Place, Look at Object in Light, Pick Clean then Place, Pick Heat then Place, Pick Cool then Place, and Pick Two and Place. Given a language goal together with the textual observations it receives, the agent repeatedly chooses among the admissible actions until the goal is achieved.
D Baseline Details
We evaluate AgentOPSD against baselines from three families, all assessed under a common protocol. By default the model only observes the standard task prompt together with the interaction history the environment returns; a method marked with * additionally receives a retrieved skill at validation and test time. The * flag therefore marks the only departure from this shared protocol.
Vanilla. Here the off-the-shelf instruction-tuned backbone is evaluated directly, with its parameters untouched by post-training.
Skill-Prompt*. Parameters remain frozen as in Vanilla, but a retrieved task-relevant skill is added in front of the context during validation and testing. This isolates the inference-time benefit of skills in the absence of any parameter update.
GRPO (Shao et al., 2024). GRPO is a critic-free, group-relative RL method: for every task it samples a group of trajectories, maps their terminal rewards onto normalized relative advantages, and then optimizes a clipped surrogate objective, assigning the resulting sequence-level advantage uniformly to each token in the trajectory.
Skill-GRPO / Skill-GRPO*. This variant adds a retrieved skill to the GRPO training prompt. Skill-GRPO withholds the skill at inference, testing whether the guidance has been internalized, while Skill-GRPO* retains it.
OPSD (Zhao et al., 2026). An on-policy self-distillation scheme: a teacher branch with access to privileged context during training re-evaluates each token sampled by the student, producing dense token-level targets through distribution matching.
The teacher's outputs are detached, while the privileged context is dropped at inference.
GRPO+OPSD. Here the GRPO loss at trajectory level and the OPSD objective at token level are optimized jointly, combining outcome-based RL with generic self-distillation in a straightforward way.
StepOPSD (Zhang et al., 2026). This baseline applies the self-distillation signal at the granularity of turns (steps) instead of tokens, and uses the local signal of each step in isolation.
All post-training baselines use the same backbone models, the ALFWorld environment interface, the training data, and the training budget as AgentOPSD; what distinguishes them is chiefly the optimization objective and whether retrieved skills are provided at training time or at evaluation.
E Evaluation Metrics
ALFWorld. We measure the overall success rate on the evaluation tasks, i.e., the proportion of episodes that attain the specified goal; this equals a sample-weighted average across the six per-category success rates.
F Hyperparameters
Table 3 lists the hyperparameters of AgentOPSD used in all of our experiments. We deliberately adopt a single configuration for the two ALF-World backbone sizes (Qwen2.5-3B and Qwen2.5-7B) rather than tuning per scale: AgentOPSD works at the granularity of turns, with reshaping weight , multiplier band , gap accumulation decay , policy clipping , and takes the (clipped) empirical group success rate as the prior of the state. The sensitivity analysis of §3.4 varies , and around this configuration and finds that none of the swept values improves on it meaningfully, so we keep one shared setting for both scales rather than per-scale tuning.
A single optimization recipe is shared by both ALFWorld model scales: learning rate, group size, clipping range, and KL coefficient as given in Table 3, plus a dual-clip constant c=3.0, gradient clipping 1.0, entropy coefficient 0.001, a single PPO epoch per update, and FSDP on one node. The remaining settings specific to ALFWorld appear in Table 4.
Table 3: Hyperparameters. Here is the learning rate and the group size; give the PPO clip range, while is the coefficient of the KL penalty toward the reference policy. SRS denotes the strategy used for skill retrieval (KM = keyword matching). The AgentOPSD-specific knobs are the reshaping weight (mult_lambda), the multiplier band (mult_band), and the gap-accumulation decay (gap_decay_gamma). A single shared setting covers both ALFWorld model scales.
| Method | SRS | |||||||
|---|---|---|---|---|---|---|---|---|
| AgentOPSD | 8 | 0.2/0.24 | 0.01 | 0.5 | 0.2 | 0.95 | KM |
Table 4: ALFWorld training configuration. Optimization settings already covered by the recipe in Table 3 are not repeated; only ALFWorld-specific settings are listed below.
| ALFWorld | |
|---|---|
| Training steps | 150 |
| Train batch size | 16 |
| Rollout group size | 8 |
| Max prompt length | 2048 |
| Max response length | 512 |
| Max interaction turns | 50 |
| Rollout temperature (train / val) | 1.0 / 0.4 |
| GPUs (tensor-parallel size) | 8 (2) |

Figure 4: Teacher-Student Gap recorded while training Qwen2.5-3B and Qwen2.5-7B on ALFWorld.
G Training Dynamics
Figures 4–5 present the complete training dynamics for AgentOPSD on ALFWorld at both model scales, following how the teacher–student gap and the reward evolve as training proceeds.

Figure 5: Reward Curve recorded while training Qwen2.5-3B and Qwen2.5-7B on ALFWorld.
H Prompt
Figure 6 shows the full prompt template that AgentOPSD uses on ALFWorld. The placeholder {skill_context} carries the retrieved skill during training and is left empty at inference. All other placeholders are filled in from the current interaction state, so the policy only observes its own history together with the environment feedback.
Prompt of AgentOPSD on ALFWorld
You are an expert agent operating in the ALFRED Embodied Environment. Your task is to: {task_description}.
{skill_context}
Prior to this step, you have already taken {step_count} step(s). Below are the most recent {history_length} observations and the corresponding actions you took: {action_history}
You are now at step {current_step} and your current observation is: {current_observation}
Your admissible actions of the current situation are: [{admissible_actions}].
Now it's your turn to take an action. You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <think> </think> tags. Once you've finished your reasoning, you should choose an admissible action for current step and present it within <action> </action> tags.
Figure 6: The complete prompt given to AgentOPSD for ALFWorld.