Manuscript Offprint

arXiv:2610.31544

Same Luck, Different Choice: Twin-World Credit Assignment for Agentic Reinforcement Learning

Zeropy Surio, Tobias Engel, Mei-Lin Chou, Anika Raman, Samuel Okafor

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Agentic reinforcement learning rewards a complete episode, yet the policy needs credit for every decision inside it. Counterfactual branching estimates this credit by re-running the episode after an alternative decision, but the branch draws its sampling noise independently of the factual episode, so the outcome difference mixes the effect of the decision with the luck of everything that follows. We observe that in agentic search the retriever, the corpus, and the grader are deterministic, so an episode is a deterministic function of the policy's decisions and its sampling noise. Twin worlds are therefore realizable: the same noise, a different decision. We introduce TWICE (TWIn-world Credit Estimation), which keys the Gumbel noise of every token by turn and line, rolls out counterfactual twins that inherit the factual episode's downstream noise, and turns their paired outcome differences into turn-level advantages for policy-gradient updates on actor-sampled trajectories; only the actor is deployed. Twin credit is unbiased for any coupling quality, its variance is that of an independent counterfactual scaled by 1−ρ1 - \rho, where ρ\rho is the twins' outcome correlation, and under coupling the number of rollouts needed to resolve an advantage of size Δ\Delta falls from Θ(Δ−2)\Theta(\Delta^{-2}) to Θ(Δ−1)\Theta(\Delta^{-1}). A square-root rule spends the twin budget where outcomes are predicted to disagree per unit cost. On seven question-answering benchmarks, TWICE improves the average exact match of GRPO by 5.3 and 4.5 points on Qwen2.5-3B and 7B, outperforms tree-search and counterfactual-branching baselines, and uses 68% fewer auxiliary tokens than VinePPO.

1 Introduction

Reinforcement learning (RL) has turned language models into search agents that interleave reasoning with retrieval calls and are rewarded only for the correctness of their final answer (Jin et al., 2025; Song et al., 2025; Chen et al., 2025; Sun et al., 2025; Zheng et al., 2025a). The reward says whether an episode went well; it does not say which decision—a query, the choice to search again, or the final answer—was responsible. GRPO (Shao et al., 2024) broadcasts one scalar to every token of the episode, and PPO (Schulman et al., 2017) relies on a critic that must learn values of long, retrieval-laden contexts; either way, a good query in a failed episode is punished and a wasted query in a lucky one is rewarded (Wei et al., 2025; Zhang et al., 2025a).

A growing literature assigns finer credit to agent decisions. Critics are hard to train on language states (Kazemnejad et al., 2025), and hierarchical critics add their own machinery (Zhou et al., 2024a); process rewards come from information gain, judges, or annotated sub-goals (Wang et al., 2026a; Zheng et al., 2025b; Wang et al., 2026b; Liu et al., 2026; Zhang et al., 2026a); identical states can be grouped across rollouts (Feng et al., 2025); and tree rollouts compare siblings that share a

Preprint.

(a) Independent credit is floored

Figure

(b) Sign of a Δ=0.1\Delta = 0.1 advantage

extra rollouts per decision

(c) Coupling changes the rate

pairs J

advantage Δ\Delta

(d) Shared noise couples policies

TV between next-token laws

Figure 1: Why twins (exact curves). (a) Variance of credit for a decision with Q=0.55, V=0.45: subtracting a Monte Carlo baseline from the realized return is floored by the return’s own variance; independent pairs decay as 1/J; twin pairs are lower by the factor 1 - ρ\rho (Prop. 2). (b) Probability of assigning the wrong sign to a Δ=0.1\Delta=0.1 advantage with J pairs. (c) Pairs needed for 95% sign accuracy: ∝Δ−2\propto \Delta^{-2} for independent pairs, ∝Δ−1\propto \Delta^{-1} for twins (Prop. 3). (d) Shared Gumbel noise makes two nearby next-token distributions emit the same token almost as often as an optimal coupling (Lemma 1); independent noise does not.

prefix (Ji et al., 2026; Zong et al., 2026; Zhang et al., 2026b; Fu et al., 2026). The most direct estimators re-run the episode from a visited decision with an alternative action and compare outcomes (Li et al., 2026; Samanta et al., 2026; Kazemnejad et al., 2025). All of them compare continuations whose sampling noise is drawn independently.

This choice has a cost that is easy to miss. Would this episode have succeeded had the agent issued a different query? is a counterfactual question about the realized episode (Pearl, 2009). An independently sampled branch answers an interventional question instead: the outcome difference contains the effect of the decision plus the difference in luck of every later sampling step—which follow-up query was drawn, whether the agent stopped early, how the answer was phrased. The factual episode’s own luck never averages out, so estimators that use the realized return have a variance floor that no number of extra rollouts removes (Figure 1a), and resolving an effect of size Δ\Delta takes Θ(Δ−2)\Theta(\Delta^{-2}) rollouts (Figure 1c).

We observe that agentic search admits a better answer. The retriever, the corpus, and the grader are deterministic, so once sampling is written with the Gumbel-max trick (Maddison et al., 2014; Oberst and Sontag, 2019), an episode is a deterministic function of the policy's decisions and its exogenous noise. The factual episode's twin world (Balke and Pearl, 1994)—the same noise, a different decision at one turn—can then be rolled out exactly. Downstream luck is shared, so the twin's outcome difference isolates the decision, as in counterfactual generation from language models (Ravfogel et al., 2025; Chatzi et al., 2025) and common random numbers in simulation (Glasserman and Yao, 1992; Ng and Jordan, 2000). Coupling is also strongest exactly where credit is hardest: a decision that barely changes the downstream distribution yields a twin that reproduces the factual continuation and ties, instead of a noisy ±1\pm1.

We build TWICE on this observation. It (i) keys the Gumbel noise of each token by episode, turn, line, and position, so twins stay aligned when lengths differ and every trajectory remains an exact sample from the policy; (ii) turns the paired outcome difference of a factual decision and its twin into a turn-level advantage for PPO-style updates on actor-sampled trajectories; and (iii) branches each decision with a probability proportional to predicted discordance/cost\sqrt{\text{predicted discordance}/\text{cost}}, reweighting to stay unbiased. Our contributions:

• Insight and theory. Credit assignment in agentic RL asks a counterfactual question that independent branching cannot answer cheaply. We show that twin credit is unbiased for any coupling quality, scales variance by 1−ρ1 - \rho, changes the sign-detection rate from Δ2\Delta^2 to Δ\Delta, and admits a square-root budget rule ( §5\S5).

• Method. TWICE realizes twins with keyed noise, two exact shortcuts, and unbiased budgeting; it leaves the RL loss unchanged and deploys the actor alone ( §4§4).

• Evidence. On seven QA benchmarks and two backbones, TWICE outperforms nine RL baselines, cuts wrong-sign credit from 21.7% to 6.9% relative to independent counterfactuals, and uses 68% fewer auxiliary tokens than VinePPO ( §6§6).

References (100)

Couldn't load all references. Reload the page to try again.