Critical-State RL: Finding the Call Worth Training
Multi-turn RL spreads credit across long interactions; Critical-State RL diagnoses an action-dependent, improvable call and trains only that call.
Read the paper ↗What it is
- Critical occurrence A particular call in a multi-turn interaction whose action can affect the task-relevant local reward and has room to improve.
- Nested sampling Compare possible calls at the same context, then repeat outcomes while holding each call fixed to tell action effects from later randomness.
- Local update Train the chosen call’s output tokens; use the surrounding interaction for context or reward without updating it.
Why it matters
A batch with both successes and failures can still contain no useful learning signal at the decision being trained. Critical-State RL checks whether changing that call changes its expected local reward, whether the reward relates to task success, and whether the policy has an action worth improving—then confines the update to that call.
Before getting into the machinery, here is the basic idea: a long tool interaction may contain one call that really decides whether the task can recover. Critical-State RL tries to find that call, checks whether its choices actually change a useful reward signal, and trains just that call instead of pushing the whole interaction around.
-
Credit assignment: A trajectory’s final reward does not tell us which call deserves the update. The concrete example is a missing-function interaction: deciding not to make a state-changing write can be good if a later recovery finds the needed tool. The decision and the later recovery matter together, but they do not both need to receive gradient. How do we tell whether the decision itself is learnable?
-
Mixed outcomes are not enough: A group with successes and failures looks useful at first glance, but the variation might come from what happened after the candidate call. The canonical example is the no-think Gemma missing-function pilot: every surviving rollout made the same clean refusal without a tool call, while rewards still ranged from zero to one (within-group standard deviation 0.477). A mixed-outcome filter would keep that group, even though the observed decision did not separate the outcomes. So the useful question is whether changing the action changes expected reward, not merely whether rewards differ. How can we isolate that without mistaking downstream luck for an action effect?
-
Hold the context still: Imagine comparing two choices in the same notebook entry, then replaying the later events for each choice. If the outcomes vary even when a choice is fixed, that is continuation noise; if the average differs across choices, that is an action signal. The analogy is not exact: a real model also samples prefixes, so upstream variation has to be handled too. Critical-State RL samples a policy prefix, compares actions at that fixed prefix, then resamples continuations with each action held fixed. The law of total variance writes the distinction as . In words, total label variation is action-mean variation plus average within-action variation. What else must be true before a high-variance call is worth training?
-
Qualify, then update locally: A useful candidate needs a label tied to benchmark return, an action whose mean beats the reference policy, and action-conditioned means that vary under the base policy. The concrete example is a selected tool-decision call whose downstream recovery is scored: the recovery can provide the consequence, while only the selected call gets the policy loss. Surrounding calls provide context or reward, not gradient. This focuses credit, but it does not directly train those surrounding calls from this update. Which candidate gets selected depends on the corrected action-dependent variance estimate across sampled prefixes.
My take is that this is a better diagnosis than “the batch had mixed rewards,” but it is only as useful as its local label and sampling design. What happens when the proxy label does not capture the full task chain?
Read the deep dive
Why People Wanted It
A multi-turn tool interaction can contain several model calls, yet only some calls determine whether the task succeeds. Training every generated token treats a refusal, a useful tool choice, and a downstream recovery as if they were equally responsible for the reward. The real question is not simply which trajectory earned reward, but which occurrence has a learnable action signal that is relevant to the task.
A mixed batch of successes and failures does not answer that. Outcomes may vary because the continuation is noisy even when the decision at the candidate call never changes. Critical-State RL therefore separates action-dependent variation from continuation noise, checks that the local label is tied to benchmark return and has room to improve, and then updates only the selected call.
The Core Move
Find the occurrence whose action-conditioned local reward is both useful and variable, then apply the learning loss to that call alone. At a fixed prefix, the variance of the local label splits into action signal and continuation noise:
The first term asks whether changing the action changes its expected label; the second asks how much the label still fluctuates when the action is held fixed.
Why a Mixed Reward Group Can Be Misleading
Now the version for readers who want more of the machinery: a nonzero reward variance across completions does not establish that the candidate action carries a trainable signal. Let be the prefix, the action at the candidate occurrence, and its occurrence-local label. The law of total variance gives the split above: variation between action-conditioned means is distinct from variation among continuations for the same action.
A concrete counterexample is the no-think Gemma missing-function pilot: sampled groups had mixed rewards, but every surviving rollout made the same clean refusal with no tool call. Reward varied from to with within-group standard deviation , so a mixed-outcome filter would retain a group whose observed decision behavior did not distinguish the rewards. The diagnostic asks a sharper question: if the action were fixed, would the reward still vary? If so, raw group variance may mostly be continuation noise. That leaves the question of how to estimate the two sources without confusing them.
Why Fixed Prefixes Separate Signal from Noise
Here is the part that gets technical: nested sampling keeps the prefix fixed while comparing actions, then keeps each action fixed while resampling reward-only continuations. Sample a policy prefix ; draw candidate actions at that prefix; for each action, draw repeated continuations and observe the local label. The mean label for an action estimates its conditional mean, while variation among its repeated continuations estimates continuation noise.
The action-dependent component is the variance across those action means, with a finite-sampling correction for estimation noise. Repeating this across sampled prefixes and averaging yields a candidate-level estimate. Pooling raw labels across model-generated prefixes would mix upstream-prefix variation with action variation; using ground-truth teacher-forced prefixes can instead hide recovery-turn trainability when the candidate action distribution is saturated. After candidates pass the action-sufficiency and headroom screens, the diagnostic ranks them by estimated action-dependent label variance under a common label. What makes the selected call worth improving rather than merely variable?
Why Selection Needs Both Headroom and Local Training
Now the exact qualification conditions: a phase is critical only when its occurrence-local label mediates the action-to-benchmark-return relationship (action-sufficiency), some action’s label mean exceeds the reference-policy mean (headroom), and action-conditioned label means vary under the base policy (trainability). Task structure supplies the candidate phase and label; reference-policy and base-policy rollouts measure headroom and trainability.
The diagnosis is not itself the update. Once an occurrence is selected, optimize the policy with its local label and apply the RL loss only to that call’s generated tokens. Its prefix supplies context; a downstream continuation can supply the consequence and reward, but receives no gradient. This makes the selected occurrence—not the whole trajectory—the training unit. The remaining design question is what useful context or consequence can be supplied without moving the gradient boundary.
Minimal Causal Code
This sketch isolates the training boundary. In practice, diagnosis needs nested samples and the task-specific label; the loop below makes the local update visible rather than fast.
# One selected occurrence: prefix is context; continuation supplies reward only.
for batch in training_batches:
prefix = batch.prefix
action_tokens = policy.generate_call(prefix)
continuation = environment.run_without_grad(action_tokens)
label = local_label(action_tokens, continuation)
logp = policy.log_prob(prefix, action_tokens)
loss = -(label * logp).mean()
optimizer.zero_grad()
loss.backward() # gradients flow through the selected call only
optimizer.step()
What You Gain, and What You Lose
You gain a principled way to distinguish action-dependent reward signal from a merely mixed batch, and a clear boundary for local credit assignment. The selection rule also makes headroom explicit instead of treating every variable reward as an opportunity.
You pay for nested sampling: prefixes, candidate actions, and repeated continuations must be evaluated before training, and finite-sample estimates can misrank candidates. The label must also be designed so that it is action-sufficient for benchmark return; a convenient proxy can grade a local behavior without capturing the full task chain. Finally, local updates deliberately leave surrounding calls without gradient. That can focus credit, but it also means the method does not directly train those calls from this selected occurrence's reward.
Mixed rewards tell you that outcomes differ; nested fixed-prefix sampling tells you whether the candidate action is why.