Selective Rollout: Mid-Trajectory Termination for Multi-Sample Agent RL

Zhiyuan Zhai, Xin WangNeurIPS 2026

TL;DR

Training LLM agents with Group Relative Policy Optimization (GRPO) requires generating multiple parallel interaction trajectories per prompt, which eats up about 95% of wall-clock training time. Roughly 40% of the time, every trajectory in a group gets the exact same reward—yielding zero variance, zero advantage, and zero learning signal. By checking partway through a rollout whether the parallel agents are all taking nearly identical actions, we can predict these uninformative groups early, pull the plug mid-trajectory, and save 10.7% of total training time without hurting model performance.

What Problem Does This Paper Address?

If you want to fine-tune a language model using reinforcement learning today, Group Relative Policy Optimization (GRPO) is likely your go-to algorithm. Instead of maintaining a separate, memory-heavy value model to judge how well the policy is doing, GRPO takes a simpler route: for a single prompt, it generates a small group of parallel attempts (say, 8 rollouts) and compares their final rewards against the group's average.

In multi-turn agentic environments—where an LLM has to read observations and issue commands over 20 to 30 steps—generating 8 parallel dialogues per prompt dominates compute, taking up roughly 95% of total wall-clock time.

Here is the catch: GRPO learns only from differences within the group. If all 8 attempts fail (reward 0) or all 8 succeed (reward 1), the reward variance is zero. Every trajectory gets an advantage of zero, contributing nothing to the policy gradient. In practice, around 40% of groups end up with zero variance. Existing tricks either filter these dead-weight groups out after paying the full generation cost (like DAPO), or try to guess which prompts are duds before starting (like GRESO). Neither approach uses the rich behavioral clues that emerge during the rollout itself.

Figure 1: Selective rollout. Standard GRPO pays the full cost of converged groups (left); our gate predicts low-variance groups and stops them mid- rollout (right); false cuts remain possible.

Methods

The authors introduce a remarkably simple, one-parameter selective-rollout gate that sits inside the environment loop.

In standard agentic GRPO, you run $G=8$ parallel rollouts up to a maximum horizon (e.g., $T_{\max} = 30$ steps). What is new here is an intermediate checkpoint at step $K$ (set to step 10 in the main experiments). At step $K$, the system pauses the group and extracts the sequence of parsed environment commands each trajectory has issued so far, ignoring observations and internal Thought: chains.

It then computes $d_K$, the mean pairwise prefix edit distance:

  1. For every pair of trajectories in the group, calculate the Levenshtein edit distance between their command sequences up to step $K$, normalized by the longer sequence length.
  2. Average those distances across all pairs in the group to get a single divergence score between 0 (identical action histories) and 1 (completely different).

If $d_K$ falls below a calibrated threshold $d_L$ (set to 0.12), the gate fires: all active rollouts in that group are immediately terminated, and the entire group is dropped from the gradient update batch. This saves both the remaining environment generation steps and the forward/backward training passes.

Datasets

No new benchmarks are introduced. All calibration, training, and evaluation take place in ALFWorld (valid_seen split), a text-based household simulator where an agent issues discrete textual commands (like take mug 1 from countertop 1) across six task families: placing one object, placing two objects, cleaning, heating, cooling, and examining an object under a light. Offline analysis and off-policy tests use a buffer of 100 task groups (800 trajectories), while on-policy training uses 10 prompts per iteration and evaluates on a disjoint set of 50 unseen tasks.

Key Insights and Ideas

  • Behavioral convergence predicts zero variance—for both wins and losses. Low divergence at step 10 happens for two very different reasons: either the policy knows exactly how to solve the task and all 8 rollouts march confidently toward success, or the policy is stuck in a repetitive loop of failing actions. Either way, the group is heading toward uniform rewards and zero gradient signal.
  • There is a "Goldilocks" step for checking divergence. Testing seven different diversity metrics across steps 5, 10, 15, and 20 revealed that predictive power peaks around $K \in \{10, 15\}$. Check too early ($K=5$), and trajectories haven't separated yet; check too late ($K=20$), and you leave very few remaining steps to actually save.
Figure 2: Spearman ρ (left) and AUROC for non-zero-variance classification (right) for each (metric, K) cell, N =100, G=8. The single-axis signal peaks at K ∈{10, 15} and degrades at the extremes.
  • Chaotic failure creates an asymmetric blind spot. While succeeding groups cluster tightly at low edit distances (the gate catches half of them), all-fail groups have a heavy tail of high divergence—agents can fail in wildly different ways while still all scoring zero. Raising the threshold to catch those chaotic failures would accidentally cut too many useful, mixed-reward groups. This makes mid-rollout gating naturally complementary to post-rollout filtering like DAPO.
  • Dropping dead groups rescales gradients. In standard batch averaging, zero-advantage trajectories contribute 0 to the numerator of the loss but still sit in the denominator, shrinking the overall gradient. Dropping them shrinks the denominator and boosts gradient norms—a subtle normalization side effect shared with post-rollout filtering.

Key Results

Using Qwen2.5-7B-Instruct with group size $G=8$, horizon $T_{\max}=30$, checkpoint $K=10$, and threshold $d_L=0.12$:

  • Offline Calibration: On 100 groups (39% zero-variance), the gate cuts 21 groups with 0.81 precision (17 true zero-variance groups, 4 false cuts of mixed groups). It recovers 11.93% of actual environment actions while retaining 96.7% of the advantage vector's $L^2$-norm.
  • Rollout-Only & Off-Policy Speedups: In isolated A/B tests, gating reduces summed task rollout duration by 13.25% and off-policy LoRA training step time by 32.2%.
  • End-to-End On-Policy GRPO: Across 4 random seeds over 60 training iterations, the gated runs finish 10.7% faster in total wall-clock time (statistically significant; bootstrap 95% CI excludes zero). Gradient $L^2$-norms rise by 1.16$\times$, and held-out success on 50 unseen tasks shifts from 41.5% to 44.0% (+2.5 percentage points, statistically inconclusive across 4 seeds).

Limitations and Future Work

  • False cuts introduce bias: The gate is heuristic, not lossless. Prematurely killing mixed-reward groups (~6.6% of mixed groups in calibration) discards real learning signal and biases deterministic updates.
  • Calibration sensitivity: Both the checkpoint $K$ and threshold $d_L$ depend on the task, policy, and group size (e.g., scaling to $G=16$ required retuning and yielded a smaller 7.0% fixed-horizon saving).
  • Narrow empirical scope: Experiments are restricted to a single model (Qwen2.5-7B) and environment (ALFWorld) over 4 seeds, which is enough to prove wall-clock savings, but not enough to claim guaranteed policy improvements or transferability to other domains like web navigation or single-turn math reasoning.
  • Future directions: Combining mid-rollout gating with post-rollout DAPO filtering in end-to-end training, auditing false cuts as trajectory lengths shift over longer training runs, and testing randomized-continuation corrections to eliminate gradient bias.

Summary updated

Abstract

Group Relative Policy Optimization (GRPO) samples a small group of parallel rollouts for every training prompt and uses their within-group reward spread to compute per-trajectory advantages. In agentic environments each rollout is a long multi-turn dialogue with one LLM call per step, so this multi-sample multiplier dominates the total training cost. When every rollout of a prompt ends with the same reward, the group has zero reward variance and contributes no group-relative reward gradient, so the extra rollouts add no information; such groups are common in practice (typically around 40% of all groups), so the wasted-compute fraction is substantial rather than marginal. Existing methods filter such groups at the prompt level, either after their rollouts are paid for or before any rollout begins, but both decide without using information that becomes available during the rollout itself. We instead ask whether the in-group divergence between the partial trajectories at an intermediate step can already predict that the group will be zero-variance: when the parallel rollouts have already converged on the same action prefix, the group is on track to produce a single reward, and we can stop early. We propose a one-parameter gate that stops a group when the mean pairwise prefix edit distance between its partial action sequences falls below a threshold. On a 60-iteration on-policy GRPO run on ALFWorld with Qwen2.5-7B, averaged over four random seeds, the gated arm finishes 10.7% faster in wall-clock (bootstrap 95% CI excludes 0) and shifts held-out success rate on 50 unseen tasks by +2.5 percentage points (not statistically significant across four seeds). The gate is predictive rather than lossless in general; false cuts and task-specific calibration remain important limitations.
BibTeX
@inproceedings{zhai2026selective,
  author = {Zhiyuan Zhai and Xin Wang},
  title = {{Selective Rollout: Mid-Trajectory Termination for Multi-Sample Agent RL}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=cFDtppAAdg},
}
Figure