Counterfactual Rollout Replay: Forkable Environments as Free Process Rewards for Software Engineering Agents
Yuanhao Li, Hongbo Wang, Xuhong Chen, Yiming Cao, Xunzhu Tang
NeurIPS 2026
TL;DR. Counterfactual Rollout Replay exploits deterministic, forkable SWE environments to turn alternative-action replays into dense process rewards for code-agent RL.
Abstract. Outcome-only reinforcement learning gives software engineering (SWE) agents a terminal success signal but little direct guidance about intermediate decisions. We introduce Counterfactual Rollout Replay (CRR), a training-time procedure that uses forkable executable environments to obtain step-level return contrasts. CRR selects a small set of decision points, restores each state, samples an alternative action, and rolls the branch forward under the policy. It retains the realized training trajectory and replaces the advantage at selected steps with the difference between its terminal return and the sampled counterfactual return. The method needs no human process labels or learned process reward model; free refers to those supervision costs, not replay compute. With a 14B policy, CRR improves pass@1 on SWE-bench Verified, SWE-bench Live, and SWE-rebench, and combines with process-reward and trajectory-search methods. On SWE-bench Verified, an equal-wall-clock comparison on the same hardware yields 41.7% versus 36.7% for extended vanilla (outcome-only) GRPO, a 5.0-point gain with fork overhead included. These results apply to environments with affordable, reliable state restoration; stochastic continuations and expensive or imperfect replay remain limitations.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:46 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
Summary The paper targets terminal-reward credit assignment in RL for long-horizon SWE agents. Its observation is that containerized SWE tasks are exactly forkable (a commit hash plus image restores real state). Counterfactual Rollout Replay (CRR) exploits this at training time: from a small budget of selected high-uncertainty decision points it forks the environment, samples an alternative action, and rolls out to a terminal reward; the on-policy-minus-counterfactual return difference becomes a step-level advantage in PPO/GRPO, at the cost of replay compute.
Strengths Reviewers find the core idea clean and compelling, turning exact, auditable forkability into an environment-grounded process reward. The theory is appropriately based on an unbiased single-sample estimator for an action-conditional contrast in deterministic sandboxes, and the evaluation is broad.
Weaknesses
-
CRR requires deterministic sandboxes, the authors already discard ~7-10% of data via a 3-rerun filter and rely on HTTP replay layers and package mirrors. Table 10 shows 1.71x higher per-microbatch wall-clock plus heavy fork-pool parallelization. So the key open question is whether the sample-efficiency win survives strictly matched wall-clock / GPU-hour budgets, and in what fork-overhead regime CRR stops beating GRPO.
-
Novelty and positioning. The decision-point selection / branching overlaps a large prior family (MCTS, tree search for LM agents, uncertainty-guided expansion), and the paper neither differentiates nor baselines against it. (Note: the AC would like to see a more explicit position of CRR, training-time credit assignment, with respect to inference-time tree search).
What could shift the recommendation
- Report improvements under matched wall-clock / GPU-hours and characterize where CRR stops beating GRPO.
- Positioning. Explicitly separate CRR from inference-time tree search, engage the branching / uncertainty-selector literature, and add at least one baseline from it.
Final justification
I read the authors' response and the full discussion. The authors corrected the compute accounting to include the previously omitted fork-pool cost and added a matched wall-clock comparison showing that CRR still outperforms GRPO when replay overhead is fully counted. They also provided a break-even analysis that makes clear when fork cost becomes too high for CRR to remain beneficial. To address the novelty and positioning concern, the authors narrowed the claim from branching itself to using executable counterfactual branches for training-time credit assignment and added a matched Search-Select control, which supports this distinction. Additional experiments on approximate forkability, counterfactual quality, and proposal sensitivity further strengthen the evaluation. The remaining concerns are the method's dependence on forkable environments and its scalability when forking is expensive or trajectory lengths vary substantially.
CRR provides a clean and useful way to obtain environment-grounded process signals without human step labels or a learned reward model. The method has a narrower operating range because it requires reliable environment forking and additional replay compute, but these limitations are now clearly characterized and do not outweigh the conceptual and empirical contribution.
Read meta-review
Meta-review
Summary The paper targets terminal-reward credit assignment in RL for long-horizon SWE agents. Its observation is that containerized SWE tasks are exactly forkable (a commit hash plus image restores real state). Counterfactual Rollout Replay (CRR) exploits this at training time: from a small budget of selected high-uncertainty decision points it forks the environment, samples an alternative action, and rolls out to a terminal reward; the on-policy-minus-counterfactual return difference becomes a step-level advantage in PPO/GRPO, at the cost of replay compute.
Strengths Reviewers find the core idea clean and compelling, turning exact, auditable forkability into an environment-grounded process reward. The theory is appropriately based on an unbiased single-sample estimator for an action-conditional contrast in deterministic sandboxes, and the evaluation is broad.
Weaknesses
-
CRR requires deterministic sandboxes, the authors already discard ~7-10% of data via a 3-rerun filter and rely on HTTP replay layers and package mirrors. Table 10 shows 1.71x higher per-microbatch wall-clock plus heavy fork-pool parallelization. So the key open question is whether the sample-efficiency win survives strictly matched wall-clock / GPU-hour budgets, and in what fork-overhead regime CRR stops beating GRPO.
-
Novelty and positioning. The decision-point selection / branching overlaps a large prior family (MCTS, tree search for LM agents, uncertainty-guided expansion), and the paper neither differentiates nor baselines against it. (Note: the AC would like to see a more explicit position of CRR, training-time credit assignment, with respect to inference-time tree search).
What could shift the recommendation
- Report improvements under matched wall-clock / GPU-hours and characterize where CRR stops beating GRPO.
- Positioning. Explicitly separate CRR from inference-time tree search, engage the branching / uncertainty-selector literature, and add at least one baseline from it.
Final justification
I read the authors' response and the full discussion. The authors corrected the compute accounting to include the previously omitted fork-pool cost and added a matched wall-clock comparison showing that CRR still outperforms GRPO when replay overhead is fully counted. They also provided a break-even analysis that makes clear when fork cost becomes too high for CRR to remain beneficial. To address the novelty and positioning concern, the authors narrowed the claim from branching itself to using executable counterfactual branches for training-time credit assignment and added a matched Search-Select control, which supports this distinction. Additional experiments on approximate forkability, counterfactual quality, and proposal sensitivity further strengthen the evaluation. The remaining concerns are the method's dependence on forkable environments and its scalability when forking is expensive or trajectory lengths vary substantially.
CRR provides a clean and useful way to obtain environment-grounded process signals without human step labels or a learned reward model. The method has a narrower operating range because it requires reliable environment forking and additional replay compute, but these limitations are now clearly characterized and do not outweigh the conceptual and empirical contribution.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper proposes Counterfactual Rollout Replay (CRR), a training-time credit-assignment method for software-engineering agents that leverages the exact forkability of containerized SWE environments. Rather than assigning the same terminal reward to every action in a long trajectory, CRR selects a small number of high-uncertainty, high-impact decision points, restores the sandbox to those states, samples alternative actions, and rolls out counterfactual continuations. The difference between the original trajectory’s terminal return and the counterfactual return is used as a step-level advantage within a PPO/GRPO-style update. This provides an environment-grounded process signal without requiring learned process reward models, human step annotations, or hindsight labels, though it incurs additional replay compute. Empirically, the paper reports that CRR improves pass@1, sample efficiency, and per-step advantage signal-to-noise ratio over outcome-only GRPO on SWE-bench Verified, SWE-bench Live, and SWE-rebench, and that it composes additively with PRM-based supervision and trajectory-search rollouts.
Strengths and weaknesses
Technical novelty and innovation. CRR presents a simple but compelling way to convert the exact, auditable forkability of containerized SWE environments into a training-time credit-assignment signal. Rather than learning or inferring process rewards, the method directly executes counterfactual continuations from selected decision points and uses the difference in terminal returns as a step-level advantage. The idea is conceptually clean, complementary to PRM-based supervision and trajectory search, and theoretically framed with appropriate caution: the estimator is analyzed as a fixed-index action-conditional contrast, while the variance decomposition is presented as a diagnostic rather than a general guarantee.
Experimental rigor and validation. The evaluation is reasonably broad and carefully controlled, with results on SWE-bench Verified, SWE-bench Live, and SWE-rebench using a matched 14B backbone and common scaffold. The ablations over fork budget, selector, counterfactual horizon, and proposal temperature help isolate the main design choices. The sample-efficiency, advantage-SNR, and covariance diagnostics support the interpretation that CRR improves credit assignment, though the additional counterfactual replay compute remains important when assessing efficiency and fairness of comparison.
Clarity and significance. The paper is clearly written, with a well-motivated problem setup and a clear explanation of the selector, proposal distribution, PPO/GRPO integration, pseudocode, and implementation details. CRR targets an important bottleneck in long-horizon RL for SWE agents and demonstrates practical gains without human step labels or a separately trained PRM.
Questions
-
Since CRR incurs additional counterfactual replay compute, could the authors clarify how its gains should be interpreted under strictly matched wall-clock or GPU-hour budgets? In particular, how does the comparison account for asynchronous fork-pool utilization, replay overhead, and baseline reimplementations, and under what fork-overhead regime would CRR no longer dominate outcome-only GRPO?
-
How sensitive is CRR to the choice of counterfactual proposal beyond the reported temperature sweep? For example, what happens when sampled alternatives are lower-quality but still within policy support, when the proposal becomes stale as the policy changes during training, or when multiple counterfactual samples from the same state yield conflicting terminal returns?
-
CRR relies on deterministic forkability, while real SWE environments may contain flaky tests, nondeterministic tool outputs, external dependencies, or long-horizon state that is difficult to snapshot exactly. How robust is the estimator in such approximately forkable settings? Does K-shot averaging sufficiently address this, or can nondeterminism introduce systematic bias in the step-level advantages?
-
The selector prioritizes high-entropy and high-impact tool actions. Do these selected steps correspond to genuinely causal decisions in the final outcome, or mainly to uncertain or irreversible actions? Are there quantitative or human-interpretable diagnostics showing that selected steps align with bug localization, patch-quality decisions, or regression-inducing edits?
Limitations
yes
Final justification
Thanks for the response. I will keep my score positive while increasing my confidence score.
Formatting concerns
N/A
1 comment
- Rating
- 3/6
- Confidence
- 5/5
- Quality
- 4/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper tackles sparse credit assignment in reinforcement learning for long-horizon software engineering (SWE) tasks. Outcome-only RL methods such as PPO and GRPO assign a single terminal binary reward to trajectories spanning dozens of actions, which makes it impossible to distinguish crucial bug-fixing steps from irrelevant or noisy ones. The authors propose Counterfactual Rollout Replay (CRR) to address this. CRR exploits the forkability of containerized SWE sandboxes: during an on-policy rollout, it selects a small budget of high-leverage decision points (chosen via policy entropy and tool-type heuristics), forks the environment, samples an alternative counterfactual action, and rolls it out to completion. The gap between the on-policy terminal return and the counterfactual return then serves as a dense, step-specific advantage signal.
Strengths and weaknesses
Strengths
- The formulation of the CRR estimator, providing process-level rewards without learned reward models (PRMs) or human labels.
- Theoretical analysis demonstrating that CRR provides an unbiased single-sample estimator for an action-conditional counterfactual contrast within deterministic sandboxes.
- Extensive empirical evaluation showing that a CRR-trained 14B model achieves substantial sample efficiency gains (requiring ~4x fewer trajectories than GRPO) and absolute pass-rate improvements across SWE-bench Verified, SWE-bench Live, and SWE-rebench.
Weakness
- Practical Issue: the method strictly requires deterministic sandboxes. As acknowledged in Section F, the authors had to implement a 3-rerun consistency filter that discards ~7-10% of the SWE-Gym and SWE-rebench datasets. This engineering burden (including HTTP replay layers and deterministic package mirrors) might make CRR difficult to adapt to domains with inherently stochastic environments or live external dependencies.
- While the authors provide compute-matched evaluations, the critical-path wall-clock latency (Table 10) shows CRR is 1.71x more expensive per microbatch due to fork materialization. More importantly, it requires heavy parallelization (an asynchronous fork pool) to be tractable, which may lock out researchers without access to high-end infrastructure (e.g., 8xH100 nodes).
- The counterfactual proposal is sampled with . If the alternative action is trivially invalid (e.g., executing a nonsensical shell command or a structurally bad edit), the counterfactual return trivially becomes 0. While this correctly rewards the on-policy action, it might result in "cheap" advantages that don't teach the model the deeper semantic reasons for why an alternative code edit would fail.
Questions
See weakness
Limitations
See weakness
Formatting concerns
No concern
1 comment
Rebuttal
We thank R-raFf for the precise review. We give the full compute evidence here: G1 reconciles device-time, G2-A matches wall-clock, and G2-B measures the fork-cost break-even.
Table G1 — Canonical compute accounting for the main comparison (full-budget runs, [Table 1] setting; pass@1 is mean ± seed standard deviation over 3 seeds).
| Accounting item | Vanilla GRPO | SWE-TRACE | CRR (ours) |
|---|---|---|---|
| On-policy rollout device-time (H100-h) | 164 | 164 | 164 |
| Counterfactual fork-pool device-time (H100-h) | 0 | 0 | 133 |
| PRM scoring / aux device-time (H100-h) | 0 | 45 | 0 |
| Learner update device-time (H100-h) | 24 | 24 | 24 |
| Total device-time (H100-h) | 188 | 233 | 321 |
| Wall-clock on one 8×H100 node (h) | 23.5 | 29.1 | 40.1 |
| SWE-bench Verified pass@1 (%) | 36.4 ±0.8 | 39.1 ±0.7 | 41.7 ±0.6 |
The rows are mutually exclusive scheduler-attributed device-time: , . Fork workers are logical roles on the same node; the old total omitted their 133 hours. We will correct Table 11 and replace Table 12's mislabeled axis. Fork-slot utilization was 78%; 58% of fork time overlapped generation in wall time but remains charged to device-time.
Table G2-A — Equal-wall-clock curves and ledger (same 8×H100 node; 3-seed mean; tokens in millions).
| CRR full-time fraction | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| Training-window wall-clock (h) | 10.031 | 20.063 | 30.094 | 40.125 |
| GRPO pass@1 (%) | 34.6 | 36.1 | 36.5 | 36.7 |
| GRPO trajectories / updates | 11,648 / 1,941 | 20,992 / 3,499 | 29,632 / 4,939 | 37,824 / 6,304 |
| GRPO generated / effective tokens | 28.70 / 23.54 | 57.40 / 47.07 | 86.11 / 70.61 | 114.76 / 94.10 |
| CRR pass@1 (%) | 37.2 | 40.1 | 40.9 | 41.7 |
| CRR trajectories / updates | 8,704 / 1,451 | 14,464 / 2,411 | 19,456 / 3,243 | 24,000 / 4,000 |
| CRR on-policy / all-generated / effective tokens | 20.89 / 32.4 / 17.1 | 39.78 / 61.7 / 32.6 | 58.37 / 90.5 / 47.9 | 76.80 / 119.0 / 63.0 |
Each column is an actual checkpoint from one continuing run per seed; no point is interpolated. Generated tokens include CRR suffixes, while effective tokens are unique loss-masked on-policy tokens. Both arms use 100-update warmup to , then a constant rate. Timing covers dispatch through the last committed update, including tests, forks, waits, retries, optimization, and checkpoints; one-time loading, final evaluation, and separate ablations are excluded.
At strictly equal wall-clock on identical hardware, the observed G2-A endpoint retains a +5.0-point margin over vanilla GRPO (41.7 vs. 36.7). The gap survives with fork overhead charged in full.
Reduced-budget protocol for G2-B/R1/R2-b: fixed 48 H100-hours per arm, identical scaffold and hyperparameters except the tested factor, one seed, and greedy evaluation on all 500 Verified instances. Device-time is fixed; trajectory count varies with fork cost. Full-budget anchors come from [Table 1], not the old Table 12 axis.
Table G2-B — Fork-overhead sweep (equal 48 H100-hour budget; Verified pass@1 on all 500, %). multiplies only measured snapshot+restore+replay cost; rollout and learner costs stay fixed. is native cost, and larger completes fewer trajectories.
| Arm | m=1 (native) | m=2 | m=4 |
|---|---|---|---|
| CRR at equal wall-clock | 36.2 | 34.8 | 33.2 |
| Vanilla GRPO (same wall-clock) | 33.4 | ← same | ← same |
| CRR − GRPO | +2.8 | +1.4 | −0.2 |
| CRR completed on-policy trajectories | ≈6,000 | 4,312 | ≈2,760 |
Counts obey ; at , . They are async completions at cutoff. The margin changes sign between and ; linear interpolation gives m*≈3.8, a descriptive bracket.
W1 (approximate forkability). The executable substrate and 3-rerun filter are shared by all [Table 1] methods. Table R1 extends the submitted setting: a fraction of replayed steps receives output resampled from the recorded rerun distribution.
Table R1 — CRR under approximate forkability (reduced-budget protocol; Verified pass@1 (full 500), %).
| Injected nondeterminism ρ | 0% (paper) | 5% | 10% |
|---|---|---|---|
| CRR, K=1 | 36.2 | 35.6 | 34.8 |
| CRR, K=2 (averaged contrast) | — | 36.0 | 35.4 |
| Vanilla GRPO reference | 33.4 | ← same | ← same |
| Mean advantage shift (bias probe) | 0 (by construction) | 0.01 | 0.02 |
Degradation is gradual; recovers 0.4–0.6 points and mean shift remains 0.01–0.02. We will state the deterministic or -shot-averaged operating envelope in Limitations.
W2 (overhead and access). G1 charges all fork cost, G2-A matches wall-clock, and G2-B places crossover between and . The pool is useful but not load-bearing: with , CRR still reaches 34.8 versus GRPO 33.4 at equal wall-clock. [Table 6] gives throughput; released configs include .
W3 (invalid alternatives). An immediately invalid action need not force zero terminal reward because the branch may recover, but easy contrasts could still dominate. We classify 20,000 logged forks as (a) immediately invalid, (b) valid but failing, or (c) valid and succeeding:
Table R2 — Composition of counterfactual alternatives and a class-mean contrast diagnostic.
| Class of | Fraction of forks (%) | Mean differential R(τ)−R(τ̃) | Plug-in share (%) | |---|---:|---:|---:| | (a) immediately invalid | 12 | +0.15 | 8 | | (b) valid, fails | 46 | +0.40 | 83 | | (c) valid, succeeds | 42 | −0.05 | 9 |
Class (b) contributes 83% of the class-mean plug-in mass versus 8% for class (a); most signal comes from valid alternatives. Class (a) is 12%, with mean differential +0.15 rather than +1. We nevertheless test a validity-filtered proposal that resamples up to three times until a syntax/schema check passes, otherwise skipping the step.
Table R2-b — Validity-filtered proposal (reduced-budget protocol; Verified pass@1 (full 500), %).
| Variant | pass@1 |
|---|---|
| CRR, unfiltered proposal (paper) | 36.2 |
| CRR, validity-filtered proposal | 36.4 |
The +0.2 difference is below the 0.6–0.8-point seed SDs of G1 and does not establish equivalence; it provides no evidence here that CRR depends on class-(a) contrasts. We will report both rows as a robustness check; any default change would use the development split.
We hope these results address the reviewer's concerns about compute cost, approximate forkability, and invalid counterfactuals.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies credit assignment for long-horizon software engineering agents trained with terminal verifier rewards. The authors try to address the more efficient rollout problem to collect denser rewards. The authors propose Counterfactual Rollout Replay (CRR), a training-time method that exploits the forkability of containerized SWE environments: from selected high-uncertainty decision points, the environment is restored, an alternative action is sampled, and the counterfactual trajectory is rolled out to obtain a terminal reward difference. This difference is used as a per-step advantage signal inside PPO/GRPO-style training. The paper evaluates CRR with a 14B Qwen3-based SWE agent on SWE-Gym/SWE-rebench training data and reports improvements on SWE-bench Verified, SWE-bench Live, and SWE-rebench, as well as gains in sample efficiency and advantage SNR.
Strengths and weaknesses
Strengths:
- Strong empirical gains across SWE-bench Verified, SWE-bench Live, and SWE-rebench with a consistent 14B backbone, matched scaffolds, and multiple seeds.
- Thorough ablations on fork budget, decision-point selector, counterfactual horizon depth, and proposal temperature.
- Clear problem statement, method description (including selector and proposal distribution), and integration with GRPO.
Weaknesses:
- The paper only reports pass@1, it should also discuss pass@k=P(at least one of k sampled trajectories succeeds) and P(all k sampled trajectories succeed).
- The theoretical analysis stops at a fixed-index contrast; once selection is introduced, the objective becomes selector-weighted with no convergence guarantees to maximization of expected return under the base objective. Only a single counterfactual sample per selected step (K=1) is evaluated in the main results; the sensitivity to K and potential variance/signal quality trade-offs are not explored beyond brief mention.
- The paper's novelty is in doubt. The decision-point selection / branching part is not very novel by itself. There is a large family of prior methods that already do selective branching, rollout allocation, tree search, uncertainty-guided expansion, or training-time rollout improvement.
- First, classic Monte Carlo Tree Search already treats decision making as selective branching plus rollout evaluation.
- Tree Search for Language Model Agents uses best-first search in the actual environment space for interactive agents.
- Authors may refer to the tree search based family approaches like https://arxiv.org/abs/2407.01476, https://arxiv.org/abs/2509.21240,
- Stronger baselines and differentiation are required given a family of methods are not covered.
Questions
- Can you add more metrics in terms both performance and computation cost?
- Can you discuss the sensitivity and impact of hyperparameters (e.g. k decision points and b choices)
Limitations
- The authors acknowledge the “free” means free of auxiliary process labels and reward-model training, while still incurring extra environment-replay compute. That means, the method can be very costly to work in an environment that state recovery is expensive.
- The authors explicitly note that CRR does not reduce harness subversion and recommend test-suite hardening and execution-free corroboration.
- A literature https://arxiv.org/pdf/2604.12126 shows similar motivation to use entropy as decision point selector, the authors may discuss more about this strategy.
Final justification
Weaknesses:
- The novelty is overclaimed
- The scalability is a critical issue for long-horizon tasks
- The code is not released, which makes reproducibility a concern.
Formatting concerns
No
3 comments
Rebuttal
We thank R-sniS for the careful reading and the concrete pointers. The review is right that the submission's evaluation rested too heavily on pass@1. On search-style branching, the submission already states the mechanism-level distinction in Sec. 2 and includes TSR+GRPO in Table 1, but both points were under-emphasized. This response surfaces that existing evidence and adds pass@k/all-k results, a fixed-total-fork-budget K sweep, and a more mechanism-matched Search-Select control. We address the four weaknesses and both questions in order.
W1 (only pass@1). We agree pass@k and all-k are informative and have added them. Using the final checkpoints from [Table 1], temperature sampling with k=8 per instance:
Table S1 — pass@k and all-k on SWE-bench Verified (%; k=8 samples, T=0.6, 3 seeds).
| Method | pass@1 (greedy) | pass@1 (sampled) | pass@2 | pass@4 | pass@8 | all-8 (all samples succeed) |
|---|---|---|---|---|---|---|
| Vanilla GRPO | 36.4 | 35.9 | 43.4 | 48.8 | 53.8 | 18.7 |
| SWE-TRACE | 39.1 | 38.6 | 45.7 | 50.8 | 55.6 | 21.2 |
| CRR (ours) | 41.7 | 41.2 | 48.1 | 53.1 | 57.7 | 23.9 |
Two observations. First, CRR's margin over GRPO is preserved at pass@8 (+3.9 points), so the gain is not an artifact of sampling luck that resampling would wash out. Second, CRR improves the all-8 metric by +5.2 points; all-8 measures across-sample consistency (the fraction of instances on which all 8 independent samples succeed), so this indicates CRR's success is more reproducible across samples rather than concentrated in a few lucky draws. It does not directly measure per-step decision quality; that question is probed separately by the selector-alignment diagnostics in Table M1 of our response to Reviewer 69MH.
W2 (theory stops at fixed-index contrast; K=1; selector-weighted objective). We intentionally scoped the theory to the result we establish: the fixed-index estimator is an unbiased action-conditional contrast (Prop. 1). The implemented algorithm optimizes a selector-weighted objective; our analysis does not establish convergence for that reweighted objective, and we will make this boundary explicit in [Sec. 4.1 and the Discussion]. The submission already reports an initial sweep in App. G: add +0.4/+0.6 points at 1.6×/3.2× counterfactual cost, with SNR scaling approximately as . Table S2 extends that result by holding the total fork budget fixed and directly comparing breadth with depth:
Table S2 uses the reduced-budget protocol specified in our response to Reviewer raFf: fixed 48 H100-hour device-time per arm, identical scaffold and hyperparameters except for the varied K, single seed, and greedy evaluation on all 500 SWE-bench Verified instances. Device-time, not completed trajectory count, is the invariant across arms.
Table S2 — Sensitivity to the number of counterfactual samples K (reduced-budget protocol; Verified pass@1 (full 500), %; advantage SNR measured as in [Fig. 3]).
| Configuration | Total forks / trajectory | pass@1 | advantage SNR (rel. GRPO) |
|---|---|---|---|
| K=1, k=4 (paper default) | 4 | 36.2 | 2.0× |
| K=2, k=4 (2× fork budget) | 8 | 36.6 | 2.5× |
| K=2, k=2 (matched budget) | 4 | 35.8 | 2.3× |
| K=4, k=1 (matched budget) | 4 | 35.0 | 2.6× |
Summary: at matched fork budget, breadth (more decision points) performs at least as well as depth in this sweep, consistent with the diminishing returns over k in [Fig. 4a]. K=2 at fixed k increases advantage SNR by 25% at 2× fork cost; the observed +0.4-point pass@1 change is not resolved by this single-seed comparison (for scale, the G1 anchors have seed standard deviations of 0.6–0.8 points). We will also make the conditioning level of the variance diagnostic uniform (task/bucket level) across Prop. 2, App. C and Table 3 in the camera-ready.
W3 (novelty vs. MCTS / tree search) and W4 (stronger baselines). The submitted Sec. 2 already distinguishes two uses of branching: search methods use branches to choose a better action or trajectory, whereas CRR never overrides the policy's realized action and uses branch returns only to score that realized action through an otherwise unchanged PPO/GRPO update. The submitted Table 1 also includes TSR+GRPO [Djuhera et al., 2026], an existing trajectory-search-augmented training baseline (38.0 vs. CRR 41.7), and Table 2 shows that CRR combines beneficially with it (CRR+TSR 43.6). These points were not prominent enough in the submission. On the reviewer's specific pointers, we will additionally cite and discuss arXiv:2407.01476 and arXiv:2509.21240 as part of the search family, and arXiv:2604.12126 as concurrent entropy-selector work in a different setting without environment-executed counterfactual scoring; our selector additionally uses tool-type structure, and both components are ablated separately in [Fig. 4b].
Matched Search-Select control (Table G3). To answer the reviewer and meta-review more directly, Table G3 compares CRR with Search-Select using the same number of fork executions per realized trajectory, selector, branch-scoring verifier and horizon, group size, device-time budget, and clipped learner. The difference is how fork data enter training: Search-Select trains on the verifier-best available sequence, whereas CRR retains the realized trajectory and uses the counterfactual differential only for credit assignment. Search-Select reaches 34.4 vs. CRR 36.2 (means over three seeds; CRR is higher on all three). We will also clarify the forkability claim: determinism and state restoration are shared with games and simulators (e.g., Go-Explore exploits exactly this); what is distinctive in the SWE setting is that forks run on the real task with the same verifier used for evaluation, with auditable provenance and no sim-to-real gap.
Q1 (more performance and compute metrics). The canonical compute accounting (Table G1) and the equal-wall-clock and fork-overhead tables (G2-A/B) appear in full in our response to Reviewer raFf; the decisive number is stated here: at strictly equal wall-clock on identical hardware, the observed G2-A endpoint retains a +5.0-point margin over vanilla GRPO (41.7 vs. 36.7) — the gap survives when the fork overhead is charged in full. For scale, the main-comparison anchors in G1 report seed variability of 0.6–0.8 points. The G2-B sweep observes the crossover between m=2 and m=4, with a descriptive interpolation of m*≈3.8.
Q2 (sensitivity to k decision points and b choices). k is ablated in [Fig. 4a] (k∈{0,1,4,16}: 0→1 recovers 2.2 of the 5.6-point maximum; k=4 recovers 5.3). App. G already sweeps the branching factor per point (b in the reviewer's notation, K in ours) over ; Table S2 adds the fixed-total-fork-budget breadth-vs.-depth comparison.
We hope these results address the reviewer's concerns about evaluation breadth and support reconsideration of the score.
Response to authors
The authors addressed some of my concerns with relevant additional experiments and agreed to cite the missing related work. The response meaningfully improves the evaluation by adding pass@k/all-k, a fixed-budget K sweep, and a mechanism-matched Search-Select control. However, I still think the novelty should be framed more modestly, since selective branching and entropy-guided rollout allocation are not new. The reproducibility concerns and scalability concerns remain, especially when different trajectory lengths varies a lot for long horizon tasks. I would like to slightly increase my score and change some of my assessments.
Thank You and Clarification on Remaining Concerns
Dear Reviewer sniS,
Thank you for revisiting our response and for your constructive reassessment.
We agree that the novelty should be framed more modestly. In the revision, we will treat selective branching and entropy-guided rollout allocation as established ideas, expand the discussion of the relevant branching and tree-search literature, and state our contribution more narrowly: using executable counterfactual forks for training-time credit assignment while retaining the realized trajectory, rather than proposing branching itself.
We also agree that heterogeneous trajectory lengths are an important reproducibility and scalability concern. The equal-wall-clock comparison and the W=1 control show that CRR retains a gain at the measured operating points without relying on fork-pool parallelism, but they do not isolate severe trajectory-length skew in long-horizon tasks. We will state this boundary explicitly and document the scheduler, caps, cost accounting, and measured break-even regime in the revision.
Thank you again for the careful reading and helpful feedback.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We thank R-69MH for the thorough summary and the four questions; each is answered below with new measurements. During the discussion period we added: (1) a strictly matched wall-clock comparison and fork-overhead break-even (Tables G1, G2-A/B; full tables in our response to Reviewer raFf); (2) a search-based training control at matched fork budget (Table G3, below); (3) pass@k/all-k and a K-sensitivity sweep (Tables S1, S2; full tables in our response to Reviewer sniS); (4) counterfactual-quality composition and a validity-filtered proposal (Tables R2, R2-b; in our response to Reviewer raFf); (5) selector-alignment diagnostics (Table M1, below). Brief answers with pointers:
Q1 (interpretation under strictly matched wall-clock / GPU-hours; async fork-pool utilization; where CRR no longer dominates). Table G1 (full table in our response to Reviewer raFf) gives a corrected one-node accounting separating rollout, fork-pool, and learner device-time. The submitted Table 11/12 convention omitted 133 H100-hours recorded by the logical fork-worker pool, so we correct CRR's total from 188 to 321 H100-hours and will relabel or replace Table 12. Table G2-A supplies the strict equal-wall-clock comparison and its cumulative ledger: at 40.125 hours, CRR completes 24,000 trajectories/4,000 updates and reaches 41.7, while the genuinely extended GRPO run completes 37,824/6,304 and reaches 36.7. The observed +5.0-point margin includes fork overhead in full; G1 seed variability is 0.6–0.8 points. Fork worker-slot utilization was 78%, with 58% of fork device-time overlapped in wall time with on-policy generation; overlap is not subtracted from allocated device-time. Table G2-B observes the crossover between m=2 and m=4 (descriptive interpolation m*≈3.8). Baseline reimplementations share the scaffold, prompts, and evaluation protocol ([Sec. 5.1]).
Matched Search-Select control (Table G3). To answer the AC's and R-sniS's request directly, G3 compares CRR with Search-Select using the same number of fork executions per realized trajectory, selector, branch-scoring verifier and horizon, group size, device-time budget, and clipped learner. The submitted Sec. 2 already distinguishes branch selection from counterfactual credit assignment, and Table 1 already includes TSR, an existing trajectory-search comparator. In G3, Search-Select trains on the verifier-best available sequence, whereas CRR retains the realized trajectory and uses the counterfactual differential only for credit assignment; this is the intended difference between the two fork-using arms.
Table G3 follows the 48 H100-hour reduced-budget protocol specified in our response to Reviewer raFf, except that every arm is run for 3 seeds. Each final checkpoint is evaluated greedily on all 500 SWE-bench Verified instances; the table reports the mean and seed standard deviation.
Table G3 — Matched fork protocols, two uses: credit assignment vs. search (same fork count per trajectory for CRR and Search-Select; equal device-time across all arms; Verified pass@1 (full 500), mean ± seed standard deviation over 3 seeds, %).
Search-Select-GRPO reaches 34.4 versus CRR's 36.2; CRR is higher on all 3 paired seeds. The +1.8-point mean gap is consistent with the benefit of using fork data for credit assignment rather than branch selection under these matched protocols.
Search-Select-GRPO protocol. Branch selection uses the same verifier return R(⋅) as CRR's contrasts — no PRM or judge. Each realized trajectory uses the same selector, k=4 fork count, rollout cap, and verifier endpoint as CRR. The verifier-best fork-derived sequence replaces the realized training sequence only if R(τ~)>R(τ); ties retain the realized sequence. The resulting G=8 sequences form the unchanged GRPO group, with standard group-relative advantages on their returns; unselected branches are discarded and enter neither the group nor the advantage computation, so no CRR-style differential is reused. We retain each generated sequence's behavior-policy log-probabilities and recompute its current-policy log-probabilities during optimization to form the usual clipped current/behavior ratio. This ratio handles policy drift; branch selection deliberately defines the expert-iteration-style training distribution. The selected-branch replacement rate is 12%, and 26% of tokens in selected replacement sequences activate PPO clipping.
Q2 (proposal sensitivity beyond temperature: low-quality in-support alternatives; staleness; conflicting multiple samples). Three parts. (i) Low-quality alternatives: quantified in Table R2 (full table in our response to Reviewer raFf) — class-(a) alternatives are 12% of forks and contribute 8% of the class-mean plug-in contrast mass; a validity-filtered proposal changes pass@1 by only 0.2 (Table R2-b). (ii) Staleness: the proposal is the current policy, tempered; it is resampled at rollout time within the same batch as the on-policy trajectory, so it lags the learner by at most one optimizer round — the same lag PPO already tolerates for its behavior policy; there is no separately-trained proposal network that could go stale. (iii) Multiple samples: submitted App. G already sweeps K∈{1,2,4}, averages conflicting returns, and reports the SNR/cost trade-off. Table S2 (full table in our response to Reviewer sniS) extends this with a fixed-total-fork-budget comparison; breadth performs at least as well as depth in this sweep.
Q3 (approximate forkability; does K-shot averaging suffice; systematic bias). Table R1 (full table in our response to Reviewer raFf) injects controlled nondeterminism at ρ∈{5,10}% of replayed steps: degradation is gradual, K=2 recovers 0.4–0.6 points, and the observed mean-advantage shift stays small at 0.01–0.02, consistent with symmetric injection primarily increasing variance. We will add a formal statement specifying the conditions under which replay noise preserves the mean contrast, together with the corresponding variance-inflation term.
Q4 (are selected steps genuinely causal? interpretable diagnostics). New diagnostics — hit-rate column computed on 2,000 logged training trajectories; the two |Â| columns computed on a 300-trajectory probe in which we additionally fork at random, stride, and entropy-only step sets so that all selectors are scored on the same |Â| distribution:
Table M1 — Do selected steps align with decision-relevance proxies?
Selected steps are 3.2× more likely than random to coincide with the first edit touching a gold-patch file and show a 2.8× enrichment in top-decile advantage magnitude. Thus the selector allocates fork evaluations to steps enriched for decision-relevant edits and large counterfactual contrasts, while these diagnostics do not establish per-step causality. Two worked case studies (a localisation commitment and a regression-inducing edit) are prepared for the appendix of the revision; happy to paste one into this thread if useful.
Camera-ready commitments: (1) positioning paragraph and related-work engagement as given in our response to Reviewer sniS; (2) revised forkability wording; (3) adoption of the consolidated compute accounting (G1) as the single reference for cost reporting; (4) uniform statement of the variance diagnostic at the task/bucket conditioning level across [Prop. 2, App. C, Table 3]; (5) explicit definitions of the tool-type scores type(a_t), the Random/Stride selector controls, and the verifier endpoint used for truncated counterfactual horizons; (6) a broader-impacts summary moved into the main text.
We hope these measurements answer the reviewer's four questions.