WorksComputer Science
Failed Rollouts Still Teach: Teacher-Free Supervision for Code Repair
Abstract
Reinforcement learning for code repair pays one verifier call per proposal, yet a failed call reveals only that the program is wrong, not what it should have been. On HumanEval+ repair, over three quarters of GRPO updates have uniform rewards and no reward gradient. We introduce repair witnesses, which supervise each failed proposal with the nearest program in a bank of verified implementations under canonical token edit distance. Bootstrapping the bank from the model's own passing proposals needs no teacher or reference. One retrieval rule yields three operating points: offline (no online calls), online, and success-projected witnesses. Under equal online budgets, online witnesses learn faster and finish above GRPO in all 19 settings (five benchmarks, ten models, 1.7B to 32B), repairing 73% to 82% of held-out HumanEval+ bugs at low temperature, 37 to 58 points above GRPO. With a self-bootstrapped bank, construction included, Qwen3-14B reaches 94% on a hard repair task in 230 calls and matches GRPO's 1,600-call accuracy of 68% with 6.5 times less training GPU time. From a cold start on MBPP+ and LiveCodeBench, witnesses repair 52% and 47% of held-out bugs on functions that begin with a self-generated program, versus GRPO's 1% and 4% (78% against 7% on MBPP+ at 1,200 calls). On every HumanEval+ model, online witnesses write correct programs outside the bank more often than GRPO succeeds at all and beat GRPO even when it mixes a reference into every group. The nearest witness teaches faster than farther ones in every comparison, and the trained policies transfer to unseen functions.
Introduction
When reinforcement learning trains a language model to repair code, verifier calls are the unit of cost. The policy proposes a program, the verifier runs its tests, and the learner receives one bit: pass or fail. This loop underlies much of the progress in code generation and reasoning [38, 12] (Le et al. 2022), but on hard repairs most of these bits report failure. When every proposal in a group receives the same reward, the group-relative advantage is zero and the reward contributes no gradient at all. On HumanEval+ repair, 78% to 98% of group relative policy optimization (GRPO) updates carry all-zero advantages. On Hanoi-Hard, the budget runs out before the policy improves: Qwen3-14B with GRPO ends at 41.9% after 400 calls, no higher than its 43.0% base accuracy.
Existing remedies leave this problem open. Rejection fine-tuning and self-training keep only verified successes and discard the failures [50, 7, 41]. Feedback methods return explanations or execution traces at the cost of further calls or turns [5, 9]. Methods mixing expert solutions into on-policy updates imitate a fixed reference regardless of what the policy wrote [47, 51] (Ma et al. 2026), and rewriting a failed attempt takes a stronger model [6].
A failed call tells the policy only that its program is wrong, leaving no target to move toward. Yet correct programs already exist, and the model writes them itself: a policy that fails on one defect passes the verifier on other samples for the same function. Each such program is a verified implementation bought with one verifier call. The one nearest to a failed attempt changes the least of it. Verification decides whether a repair is correct. Distance to verified programs decides what a failure should teach.
We introduce repair witnesses, which turn failed verifier calls into supervision (Figure 1). A bank holds verified implementations of each training function, and the model’s own passing proposals suffice to build it. A failed proposal retrieves its repair witness, the bank member nearest to it in canonical token edit distance, and learns from that program without extra verifier calls. One retrieval rule defines three operating points. Offline witnesses supervise each training defect with its nearest bank member, without online calls.
Figure 1. Failed proposals still supply a learning target. Left: on a HumanEval+ defect in words_string, every proposal fails, so GRPO gets no reward gradient, while repair witnesses retrieve the nearest verified program in the bank (here the model’s own one-line fix, not the two-line reference) as a supervised target. Right: on HumanEval+ repair, Qwen3-14B learns faster with repair witnesses than with GRPO or rejection fine-tuning (RFT) at the same verifier budget. Shading shows 95% seed-bootstrap intervals.
Online witnesses, our default, retrieve a witness for each failure as the policy learns, keep successful proposals as their own targets, and add a group-centered policy gradient. Success-projected witnesses also project successful proposals onto the bank.
We evaluate on five benchmarks (HumanEval+ repair of human-written bugs ([30, 23]), Hanoi-Hard, Algo-8, and cold-start MBPP+ and LiveCodeBench) and test transfer to unseen functions. With a bank of only Qwen3-14B’s own proposals, repair witnesses reach 93.6% on Hanoi-Hard in 230 verifier calls (construction included), whereas GRPO reaches 68.3% in 1,600 calls (Figure 2). On functions that begin with a self-generated program, self-bootstrapped HumanEval+ banks outperform curated banks with the EvalPlus reference, and from a cold start on MBPP+ and LiveCodeBench, online witnesses repair about half of the held-out bugs on such functions while GRPO barely moves (Figure 3, Table 3). Our contributions are as follows.
Figure 2. With every bank-construction call charged, self-bootstrapped repair witnesses reach GRPO’s 1,600-call accuracy after 177.6 calls on Hanoi-Hard with Qwen3-14B. Top: held-out accuracy against total verifier calls, construction hatched. Bottom: total calls to reach and keep GRPO’s 1,600-call mean accuracy over 12 paired seeds. Bands show 95% seed-bootstrap intervals and the whisker a 95% paired interval.
Figure 3. Online witnesses learn from a cold start where GRPO stalls, with Qwen3-1.7B on MBPP+ and Qwen3-8B on LiveCodeBench. Solid blue and dashed red show held-out bugs on functions that begin with a self-generated program, and dotted blue shows unseen functions. Bands are 95% seed-bootstrap intervals.
| Model | Self bank (%) | Baseline (%) | ∆ accuracy | ||
| [95% CI] | |||||
| HumanEval+ | Curated | ||||
| Qwen3-1.7B | 70.3 | 80.5 | 63.3 | 75.9 | +7.0 [0.8, 13.3] |
| Qwen3-14B | 86.6 | 95.5 | 82.1 | 87.8 | +4.5 [0.0, 8.8] |
| Pooled | +5.8 [1.9, 9.6] | ||||
| MBPP+ | GRPO | ||||
| Qwen3-1.7B | 52.1 | 65.4 | 0.9 | 0.9 | +51.2 [47.9, 55.1] |
| SmolLM3-3B | 56.9 | 69.4 | 26.8 | 27.1 | +30.1 [21.7, 38.3] |
| MBPP+, 1,200 calls | GRPO | ||||
| Qwen3-1.7B | 78.2 | 85.9 | 7.3 | 7.3 | +70.9 [65.0, 76.1] |
| LiveCodeBench | GRPO | ||||
| Qwen3-8B | 47.1 | 53.1 | 3.8 | 2.1 | +43.3 [39.2, 46.9] |
Table 3. On functions whose bank begins with a self-generated program, self-bootstrapped banks outperform the curated bank on HumanEval+, and online witnesses outperform GRPO from a cold start. Rows score held-out bugs of these training functions. Self bank is online witnesses on the self-bootstrapped bank, and Baseline is online witnesses on the curated bank or GRPO. is Self bank minus Baseline at with 95% paired seed-bootstrap intervals over 12 seeds (six at 1,200 calls).
Self-bootstrapped repair witnesses. Each failure learns from its nearest program in a bank of verified implementations without extra calls, and banks of the model’s own passing proposals need no teacher or reference solution. One retrieval rule gives three operating points: offline witnesses beat all outcome-reward and reference-mixing baselines without online calls, online witnesses add accuracy and outside-bank correctness, success-projected witnesses are more accurate still, and offline and online witnesses compose (§ 1.1, § 3.3, and § 3.4).
Call, GPU-time, and scale efficiency. Online witnesses beat GRPO in all 19 settings across ten models from five families, at every GRPO learning rate and batch shape we tested, and from a shared offline-witness start. They reach GRPO’s accuracy with less training GPU time in every timed comparison, lift 1.7B and 3B models above 14B to 32B GRPO models, stay ahead when GRPO gets four times the budget, and learn from a cold start where GRPO, DAPO, and Dr. GRPO stall (§ 3.1 to § 3.3).
Why the model’s own nearest fix. Learning comes from the witness targets: without them, REINFORCE only matches GRPO, and they alone keep most of the lead of online witnesses. The nearest witness teaches faster than farther ones in every comparison, and the model’s own programs, more likely under the policy, beat an external reference placed in a curated bank or added to every GRPO group. Witness-trained policies write correct programs outside the bank more often than GRPO succeeds at all and transfer to unseen functions (§ 3.1, § 3.3, and § 3.5).
Self-Bootstrapped Repair Witnesses
Code Repair under a Verifier Budget
An input contains a function specification and a defective implementation, and the policy outputs a complete repaired function . The verifier runs the tests of function on . We count each verification as one verifier call, whether the program passes, fails, or times out. The online budget of a run counts the calls on proposals (rollouts) sampled during training, and the total budget adds every call spent building the bank. Each training function has a bank of verified implementations. Held-out defects differ from training defects and bank programs, and the policy repairs them without the bank.
Self-Bootstrapped Banks
A self-bootstrapped bank holds only the policy’s own passing programs, with no teacher or reference implementation. Before the first update, we sample repair proposals or specification-conditioned generations from the base model, verify each once, and keep the passing, canonically distinct ones as the bank (Appendices § 7.§ 4 and § 8). A growing bank admits each canonically new passing proposal after the update that sampled it, without extra calls. A curated bank combines a reference implementation with verified alternatives and stays fixed.
Nearest Repair Witnesses
For a program , the repair witness is
where is token Levenshtein distance and canon strips comments and formatting and renames local variables (Appendix § 8). Ties are broken uniformly at random. Because distance is measured from each new proposal, the witness follows the policy as it learns, and failures on the same input can retrieve different bank members. Retrieval calls neither a model nor the verifier.
A Family of Witness Objectives
The retrieval rule defines a family of three objectives.
Online witnesses combine a group-centered policy gradient [44] with supervision on verified targets. Each batch samples proposals for each of inputs from the current policy. For proposal of input and function , let and let be the reward centered within its input’s group. Write for the mean continuation-token log probability of , including the end-of-sequence token when present. For a batch of proposals, the loss is
where , , , and advantages are treated as constants under differentiation. When a whole group fails, the policy-gradient term vanishes but the supervised term remains wherever the bank holds a member. Algorithm 1 in Appendix § 8 lists one update.
Offline witnesses keep only the supervised term and run without online calls: each training input is supervised with , the witness of its defective program .
Success-projected witnesses set for every proposal, passing or failing, and keep the policy-gradient term.
As baselines, rejection fine-tuning keeps only success supervision and REINFORCE only the policy gradient.
Experimental Setup
Tasks, Models, and Banks
HumanEval+ repair asks the policy to fix the human-written bugs of HumanEvalFix [30] on HumanEval specifications [4], and the extended EvalPlus tests verify each repair [23]. For each model and function, we sample 16 programs from the specification and verify each once. Failures among these samples become the natural training defects, and passes join the EvalPlus reference in the bank. Most bank members are the model’s own programs (Table 5 in Appendix § 7), and the bank excludes the original implementation behind each human-written bug. For each model, a fixed rule selects functions with base repair accuracy at most 75%, and all methods share that set. We train Qwen3-1.7B, Qwen3-14B, Qwen3-32B [48], and SmolLM3-3B [16], and evaluate each on the held-out bugs (Appendix § 7). For Qwen3-1.7B and Qwen3-14B we also train on self-bootstrapped banks, which drop every EvalPlus reference and grow with passing proposals.
| Task | Model | Training inputs | Distinct | Held-out | Bank | Model’s own | Generations/point |
| HumanEval+ | Qwen3-1.7B | 160 | 142 | 40 | 123 | 84 (68.3%) | |
| SmolLM3-3B | 160 | 156 | 40 | 121 | 82 (67.8%) | ||
| Qwen3-14B | 108 | 103 | 27 | 80 | 54 (67.5%) | ||
| Qwen3-32B | 108 | 103 | 27 | 102 | 75 (73.5%) | ||
| Hanoi-Hard | Eight models | 40 | 40 | 40 | 12 | – | |
| Algo-8 | Four models | 160 | 160 | 160 | 48 | – | |
| MBPP+ | Qwen3-1.7B | 412 | 364 | 129 | 87 | 87 (100.0%) | |
| SmolLM3-3B | 612 | 546 | 191 | 248 | 248 (100.0%) | ||
| LiveCodeBench | Qwen3-8B | 640 | 624 | 220 | 191 | 191 (100.0%) |
Table 5. Data and evaluation sets. Training inputs are equally weighted. Distinct counts different defective programs, Bank counts canonically distinct verified implementations, and Model’s own counts those sampled from the model being trained. Hanoi-Hard and Algo-8 share one dataset across their models, and on MBPP+ and LiveCodeBench, Held-out has one held-out bug for every training and unseen function. Generations/point is held-out inputs times samples per input at each evaluation point.
Hanoi-Hard gives every model the same 40 training and 40 held-out defects of cyclic and linear Tower-of-Hanoi variants, each produced by two single-node abstract-syntax-tree mutations of a verified implementation. We train eight models on it: Qwen3-1.7B, SmolLM3-3B, Granite-4.2-3B [17], Qwen3-14B, Mistral-Small-3.2-24B [29], Qwen3.6-27B [33], Muse Glimmer-30B [1], and Qwen3-32B. All eight share a curated bank of six implementations per function. For Qwen3-14B we also build a self-bootstrapped bank from verified base-model proposals (Appendix § 7.§ 4).
Algo-8 uses eight QuixBugs functions [22], each with 20 training and 20 held-out single-node mutation defects and six curated bank implementations. We train Qwen3-1.7B, SmolLM3-3B, Granite-4.2-3B, and Qwen3.5-4B (Qwen Team, [32]) on it.
We test a cold start with Qwen3-1.7B and SmolLM3-3B on MBPP+ (Austin et al., [3]; Liu et al., [23]) and Qwen3-8B on LiveCodeBench (Jain et al., [18]). Each benchmark uses only the model’s own specification-conditioned samples: failures become the defects and passes form a growing self-bootstrapped bank. Initial banks cover 39 of 103 training functions on MBPP+ with Qwen3-1.7B, 80 of 153 with SmolLM3-3B, and 51 of 160 on LiveCodeBench, with further functions held out as unseen (Appendix § 7).
We evaluate transfer without further training on 69 HumanEvalFix and 10 QuixBugs functions absent from the training sets and banks (Appendix § 7.§ 3).
Methods and Budgets
Online methods default to 400 verifier calls and draw a fresh batch for every update. Online witnesses take 100 updates of two inputs with two proposals each and use one optimization configuration for every model and task. GRPO (Shao et al., [38]) takes 100 updates of four proposals for one input, normalizes centered rewards by the group standard deviation, and adds a KL penalty toward the base policy. On HumanEval+ (Table 1 and Table 7 in Appendix § 9), further outcome-reward baselines are rejection fine-tuning (RFT), larger-group GRPO (), KL-free GRPO, decoupled clip and dynamic sampling policy optimization (DAPO), and Dr. GRPO (Yu et al., 2025; Liu et al., [25]), with the last two also on MBPP+. LUFFY-style off-policy guidance (Yan et al., [47]) adds the reference to every GRPO group. Algo-8 and HumanEval+ add group-centered REINFORCE. We also give GRPO four times the budget on Hanoi-Hard and continue GRPO and online witnesses to 1,200 calls on MBPP+.
Table 1. Repair witnesses outperform GRPO, RFT, and LUFFY-style guidance on HumanEval+ repair, and offline witnesses do so without online calls. At , Outside bank and (online witness minus the row’s method) follow § 2.3, as do Fewer calls, Less GPU time, , dashes, and the 95% paired seed-bootstrap intervals in brackets. Bold marks each model’s highest accuracy. Before training, the base models repair 12.0%, 22.0%, 17.1%, and 21.8% of held-out bugs over 16 attempts each.
| Model | Method | Calls | Accuracy (%) | Accuracy (%) | Outside bank (%) | AUC [95% CI] | accuracy [95% CI] | Fewer calls () | Less GPU time () |
| Qwen3-1.7B | Online witness | 400 | 58.6 | 73.2 | 40.2 | – | – | – | – |
| Qwen3-1.7B | Offline witness | 0 | 57.4 | 70.6 | 30.4 | – | – | – | – |
| Qwen3-1.7B | GRPO | 400 | 15.6 | 15.0 | 15.2 | +17.6 [14.8, 20.4] | +43.0 [32.7, 51.0] | 3.3 [2.7, 3.7] | 1.8 [1.6, 2.1] |
| Qwen3-1.7B | RFT | 400 | 24.7 | 24.6 | 23.9 | +14.1 [8.5, 19.1] | +33.9 [22.8, 44.5] | 2.6 [1.8, 3.4] | 1.3 [1.0, 1.6] |
| Qwen3-1.7B | LUFFY-style | 400 | 3.8 | 9.1 | 2.9 | +24.1 [21.2, 27.0] | +54.8 [50.8, 58.6] | 19.1 [4.6, 293.9] | >4.8 |
| SmolLM3-3B | Online witness | 400 | 66.1 | 81.5 | 40.7 | – | – | – | – |
| SmolLM3-3B | Offline witness | 0 | 64.1 | 78.6 | 21.7 | – | – | – | – |
| SmolLM3-3B | GRPO | 400 | 26.2 | 37.3 | 24.8 | +15.4 [12.4, 18.3] | +39.9 [31.4, 48.3] | 3.4 [3.0, 4.4] | 3.2 [2.8, 4.0] |
| SmolLM3-3B | RFT | 400 | 34.9 | 44.2 | 33.7 | +11.1 [8.0, 13.9] | +31.2 [24.3, 38.0] | 2.7 [2.0, 3.1] | 1.9 [1.5, 2.1] |
| SmolLM3-3B | LUFFY-style | 400 | 21.0 | 41.4 | 19.0 | +25.4 [23.0, 27.7] | +45.1 [38.8, 51.4] | 4.1 [3.5, 4.7] | 4.7 [4.0, 5.4] |
| Qwen3-14B | Online witness | 400 | 75.5 | 81.9 | 53.5 | – | – | – | – |
| Qwen3-14B | Offline witness | 0 | 74.4 | 82.5 | 35.8 | – | – | – | – |
| Qwen3-14B | GRPO | 400 | 38.7 | 38.6 | 34.6 | +23.2 [18.7, 28.4] | +36.8 [28.9, 45.6] | 3.4 [2.7, 4.3] | 2.3 [1.8, 3.2] |
| Qwen3-14B | RFT | 400 | 45.6 | 47.1 | 42.7 | +15.9 [11.2, 21.1] | +29.9 [23.0, 37.6] | 2.7 [2.3, 3.4] | 1.6 [1.4, 1.8] |
| Qwen3-14B | LUFFY-style | 400 | 37.1 | 44.5 | 34.6 | +15.8 [11.0, 20.9] | +38.4 [27.4, 50.8] | 3.5 [2.5, 5.1] | 3.2 [2.3, 4.8] |
| Qwen3-32B | Online witness | 400 | 74.2 | 82.2 | 54.7 | – | – | – | – |
| Qwen3-32B | Offline witness | 0 | 69.1 | 76.5 | 28.4 | – | – | – | – |
| Qwen3-32B | GRPO | 400 | 43.7 | 45.1 | 41.7 | +17.8 [14.1, 21.3] | +30.5 [25.3, 36.2] | 2.8 [2.2, 3.7] | 1.7 [1.4, 2.3] |
| Qwen3-32B | LUFFY-style | 400 | 38.4 | 44.4 | 35.3 | +16.1 [11.7, 20.7] | +35.8 [28.4, 44.5] | 3.5 [2.4, 4.9] | 2.5 [1.8, 3.5] |
Table 1.
| Model | Method | Accuracy (%) | Zero adv. (%) | AUC [95% CI] | accuracy [95% CI] | Fewer calls () | Less GPU time () |
| Qwen3-1.7B | GRPO | 15.6 | 98.2 | +17.6 [14.8, 20.4] | +43.0 [32.7, 51.0] | 3.3 [2.7, 3.7] | 1.8 [1.6, 2.1] |
| GRPO () | 14.5 | 99.2 | +18.5 [16.7, 20.2] | +44.1 [39.3, 48.6] | 3.4 [3.0, 3.7] | 1.3 [1.2, 1.4] | |
| GRPO (no KL) | 13.9 | 93.8 | +16.0 [10.0, 21.7] | +44.7 [34.3, 53.2] | 3.4 [2.8, 5.7] | 2.4 [1.9, 4.3] | |
| DAPO | 17.5 | 99.1 | – | +41.1 [32.8, 48.1] | 3.1 [2.7, 3.6] | – | |
| Dr. GRPO | 15.5 | 99.2 | – | +43.1 [35.4, 49.1] | 3.3 [2.9, 3.7] | – | |
| Random-bank SFT | 50.4 | – | +2.1 [0.4, 3.8] | +8.2 [6.0, 10.4] | – | – | |
| SmolLM3-3B | GRPO | 26.2 | 78.0 | +15.4 [12.4, 18.3] | +39.9 [31.4, 48.3] | 3.4 [3.0, 4.4] | 3.2 [2.8, 4.0] |
| GRPO () | 30.6 | 63.5 | +14.2 [11.1, 17.0] | +35.5 [27.8, 42.4] | 3.0 [2.5, 3.5] | 2.0 [1.7, 2.3] | |
| GRPO (no KL) | 18.4 | 80.4 | +22.2 [18.5, 26.0] | +47.7 [38.5, 56.8] | 4.6 [3.3, 6.4] | 4.9 [3.7, 6.3] | |
| Random-bank SFT | 59.7 | – | +2.5 [0.9, 4.2] | +6.4 [0.9, 12.0] | – | – | |
| Qwen3-14B | GRPO | 38.7 | 84.8 | +23.2 [18.7, 28.4] | +36.8 [28.9, 45.6] | 3.4 [2.7, 4.3] | 2.3 [1.8, 3.2] |
| GRPO () | 40.4 | 83.5 | +27.3 [24.0, 30.5] | +35.1 [29.1, 40.9] | 3.3 [2.8, 3.8] | 1.4 [1.3, 1.6] | |
| GRPO (no KL) | 42.9 | 83.7 | +17.8 [14.3, 22.2] | +32.6 [24.1, 43.1] | 2.9 [2.4, 4.0] | 2.2 [1.7, 3.2] | |
| Random-bank SFT | 72.0 | – | +2.3 [0.0, 4.7] | +3.5 [−3.1, 10.0] | – | – |
| Model | GRPO setting | AUC (%) | Accuracy (%) | Online witness – row AUC [95% CI] | Online witness – row accuracy [95% CI] | Row – standard GRPO AUC [95% CI] | Row – standard GRPO accuracy [95% CI] |
| Qwen3-1.7B | Standard | 15.8 | 22.1 | +17.9 [13.4, 22.4] | +35.6 [18.5, 50.0] | – | – |
| LR | 15.8 | 20.8 | +17.9 [10.6, 24.3] | +36.9 [15.6, 55.6] | 0.0 [−6.5, 7.4] | −1.3 [−15.8, 14.4] | |
| LR | 9.7 | 4.8 | +24.0 [21.3, 25.8] | +52.9 [47.5, 57.3] | −6.1 [−10.2, −2.0] | −17.3 [−29.0, −6.7] | |
| , 50 updates | 12.0 | 15.6 | +21.7 [19.0, 24.6] | +42.1 [36.0, 47.3] | −3.8 [−7.5, −0.3] | −6.5 [−19.0, 5.6] | |
| Qwen3-14B | Standard | 25.0 | 34.8 | +28.7 [23.4, 35.3] | +43.2 [33.7, 56.4] | – | – |
| LR | 20.0 | 24.3 | +33.7 [30.1, 38.6] | +53.7 [45.5, 62.8] | −5.0 [−9.4, 1.2] | −10.5 [−21.4, 2.5] | |
| LR | 19.8 | 8.6 | +33.9 [27.6, 41.4] | +69.4 [57.6, 80.9] | −5.2 [−13.5, 4.0] | −26.2 [−38.5, −12.1] | |
| , 50 updates | 23.6 | 30.7 | +30.1 [25.6, 34.1] | +47.3 [34.2, 58.8] | −1.4 [−7.9, 8.2] | −4.1 [−18.7, 20.2] |
Table 7. Online witnesses outperform every GRPO variant on HumanEval+, and no tested learning rate or batch shape beats standard GRPO. Top: larger-group GRPO (), KL-free GRPO (no KL), DAPO, Dr. GRPO, and random-bank SFT (no online calls) below each model’s GRPO row of Table 1, with metrics following Table 1 at over 12 seeds; DAPO and Dr. GRPO are evaluated after 400 calls. Zero adv. is the percentage of updates in which every proposal of the group has the same reward (for DAPO, which skips such groups, of sampled groups). Bottom: GRPO with learning rate (LR) or , or with two inputs of four proposals () per update for 50 updates, against standard GRPO (LR , one input of four proposals, 100 updates) at with 95% paired seed-bootstrap intervals over six of the 12 seeds, so the Standard rows differ from the GRPO rows above.
Offline witnesses match online witnesses in inputs, batch size, and update count, and success-projected witnesses keep the online configuration. Unless stated otherwise, repair witnesses and witness-trained policies refer to the online form. The random farther control keeps the bank and loss fixed and, when a predesignated far anchor lies beyond the nearest witness, swaps that witness for a random strictly farther member (Appendix § 8).
Metrics
We measure learning efficiency by the normalized area under the 400-call held-out accuracy curve (AUC) and by accuracy at the end of training. Accuracy is the pass rate at the training temperature , and we also decode final policies at . Rates are percentages, and all differences, including AUC differences, are in percentage points (points). Fewer calls divides a baseline’s budget by the call count after which witnesses stay at or above its final accuracy, including bank-construction calls for self-bootstrapped banks. Less GPU time divides the baseline’s full-budget training GPU time by the witnesses’ time up to that call count (Appendix § 10). Where the 95% interval of calls to match the baseline reaches zero, the ratio has no upper bound and its lower 95% bound is shown as . A dash marks an untimed or inapplicable entry. Outside-bank correctness is the fraction of all outputs that pass and differ canonically from every bank member. We pair methods on the same training seeds, report 95% paired seed-bootstrap intervals, and weight settings equally in pooled effects (Appendix § 10).
Results
Faster Learning at the Same Verifier Budget
On HumanEval+ repair, online witnesses beat GRPO, RFT, and LUFFY-style guidance in AUC and final accuracy and nearly double GRPO’s accuracy on Qwen3-14B (Table 1). They match the final accuracy of these baselines and four GRPO variants with at least 2.6 times fewer calls (Table 1 and Table 7 in Appendix § 9). At the lead widens: witness-trained policies repair 73.2% to 82.2% of the held-out bugs, 37.1 to 58.2 points above GRPO.
GRPO spends most of its budget on updates whose reward teaches nothing: all proposals in a group receive the same reward, even at (Table 7). DAPO skips such groups, which make up 99.1% of those samples on Qwen3-1.7B. Every witness update carries a verified target for each proposal whose function has a bank member. Tuning does not rescue GRPO: no tested learning rate (–) or batch shape (two inputs of four proposals over 50 updates) beats standard GRPO on Qwen3-1.7B or Qwen3-14B, and online witnesses lead in every setting (Table 7).
Giving GRPO verified programs does not close the gap, whether they are mixed into every group or train the policy it starts from. With a reference solution in every group, LUFFY-style guidance trails online witnesses by 35.8 to 54.8 points and finishes 6.0 points below GRPO, pooled over the four models (Table 1). Nine of its 48 runs collapse to zero accuracy, against one GRPO run and no online witness run (Appendix § 9). From a shared online-witness start, online witnesses lead GRPO in AUC and in final accuracy at both temperatures on Qwen3-1.7B and Qwen3-14B and reach its 400-call accuracy with 4.5 and 2.1 times fewer calls (Table 15 in Appendix § 13).
| Model | Method | Accuracy (%) | Accuracy (%) | Offline → online − row AUC | Offline → online − row [95% CI] | Offline → online − row [95% CI] | Offline → GRPO − row [95% CI] | Offline → GRPO − row [95% CI] |
| Qwen3-1.7B | Offline → online | 72.7 | 82.3 | – | – | – | – | – |
| Offline → GRPO | 62.3 | 69.4 | +4.1 [2.5, 5.6] | +10.4 [3.0, 18.0] | +12.9 [8.1, 18.6] | – | – | |
| Online witness | 57.8 | 73.9 | – | +14.9 [9.2, 20.6] | +8.4 [4.8, 12.2] | +4.5 [0.0, 8.6] | −4.5 [−8.9, −0.2] | |
| Offline witness | 55.9 | 69.5 | – | +16.8 [12.3, 21.4] | +12.8 [7.7, 18.4] | +6.4 [1.6, 10.0] | −0.1 [−7.0, 4.8] | |
| Qwen3-14B | Offline → online | 84.1 | 91.4 | – | – | – | – | – |
| Offline → GRPO | 75.6 | 79.4 | +3.6 [1.4, 5.9] | +8.5 [1.9, 15.5] | +12.0 [6.4, 17.1] | – | – | |
| Online witness | 75.5 | 81.9 | – | +8.6 [2.6, 14.8] | +9.5 [4.1, 13.4] | +0.1 [−3.7, 3.9] | −2.5 [−6.5, 1.5] | |
| Offline witness | 74.4 | 82.5 | – | +9.7 [5.0, 14.5] | +8.9 [4.1, 13.0] | +1.2 [−3.6, 5.9] | −3.1 [−7.5, 1.0] |
Table 15. Started from the same offline-witness policy, online witnesses outperform GRPO on HumanEval+. Offline → online and Offline → GRPO continue each seed’s final offline-witness policy with 400 calls of online witnesses or GRPO, and Online witness and Offline witness are the runs of Table 1. Accuracies are final percentages, and differences are in points with 95% paired seed-bootstrap intervals over the 12 seeds of Table 1 with Qwen3-14B and eight of them with Qwen3-1.7B, whose Online witness and Offline witness rows therefore differ from Table 1.
Counting only correct programs outside the bank, online witnesses exceed the total accuracy of every outcome-reward and reference-mixing baseline, beating GRPO’s by 11.0 to 24.6 points on all four models (Table 1 and Table 7).
Witnesses Teach Where GRPO Stalls
On Hanoi-Hard, repair witnesses outperform GRPO in AUC and final accuracy on all eight models and reach GRPO’s 400-call accuracy with at least 5.4 times fewer calls (Table 2). The lead is largest where base accuracy is low and outcome rewards have little to reinforce. Supervised fine-tuning also lets small models overtake large ones: all three witness-trained models at 1.7B and 3B finish above every GRPO-trained model from 14B to 32B, up to 19 times their size (Table 2).
Table 2. Repair witnesses outperform GRPO on Hanoi-Hard for all eight models. Accuracies are percentages: Witness and GRPO at 400 calls, and Base over 16 samples per defect before training. Differences follow Table 1, and the two ratios and follow § 2.3. Less GPU time marked † is estimated from total run time (Appendix § 10).
| Model | Base | Witness | GRPO | AUC [95% CI] | accuracy [95% CI] | Fewer calls () | Less GPU time () |
| Qwen3-1.7B | 7.2 | 77.0 | 8.5 | +45.7 [43.9, 47.5] | +68.5 [63.8, 73.0] | 6.5 [5.7, 8.4] | 4.0 [3.5, 5.3] |
| SmolLM3-3B | 5.5 | 79.2 | 9.5 | +56.9 [54.8, 59.0] | +69.7 [65.0, 74.2] | 15.4 [12.8, 24.3] | 12.0 [10.3, 17.8] |
| Granite-4.2-3B | 13.0 | 80.0 | 1.3 | +62.5 [59.8, 65.2] | +78.7 [73.4, 83.5] | >45 | >32 |
| Qwen3-14B | 43.0 | 87.8 | 41.9 | +27.8 [23.0, 32.6] | +45.9 [34.7, 57.4] | 5.4 [4.7, 6.5] | 2.9 [2.5, 3.5]† |
| Mistral-24B | 10.5 | 77.1 | 3.4 | +65.6 [61.5, 70.1] | +73.7 [56.2, 88.3] | >66 | >60 |
| Qwen3.6-27B | 45.0 | 90.9 | 67.1 | +19.3 [14.8, 23.9] | +23.8 [8.4, 41.9] | 11.1 [2.9, 26.6] | 5.8 [2.0, 12.0]† |
| Muse Glimmer-30B | 13.1 | 78.5 | 18.8 | +56.1 [50.7, 60.8] | +59.7 [49.0, 70.0] | >21 | >18 |
| Qwen3-32B | 36.6 | 82.9 | 53.4 | +20.6 [18.2, 22.9] | +29.5 [20.4, 37.2] | 5.7 [3.8, 6.6] | 3.3 [2.4, 3.8]† |
Table 2.
Including Qwen3.5-4B on Algo-8 (Table 9 in Appendix § 11) and Qwen3-8B on LiveCodeBench, we test ten models from five families. Repair witnesses lead GRPO in AUC and final accuracy across all 19 model-task settings (every interval excludes zero), by 26.9 AUC points [26.2, 27.7] and 38.4 accuracy points [36.3, 40.6] pooled. At 192 calls, their mean accuracy exceeds GRPO’s 400-call accuracy in every setting.
Repair witnesses outperform outcome-reward baselines on Algo-8. Accuracies are percentages: Base before training, and Witness and Baseline at 400 calls. With Qwen3.5-4B, REINFORCE pairs with its own online witness runs on the same 12 seeds. values are witness minus baseline in points, and Fewer calls, Less GPU time, >, and dashes follow § 2.3. Intervals are 95% paired seed-bootstrap intervals over 12 seeds.
| Model | Method | Base | Witness | Baseline | AUC [95% CI] | accuracy [95% CI] | Fewer calls (×) | Less GPU time (×) |
| Qwen3-1.7B | GRPO | 59.2 | 91.7 | 72.5 | +12.6 [8.8, 16.5] | +19.2 [10.3, 30.1] | 12.0 [3.5, 30.9] | – |
| REINFORCE | 59.2 | 91.7 | 63.4 | +12.3 [9.0, 15.6] | +28.3 [17.5, 42.1] | 19.9 [8.0, 61.0] | – | |
| SmolLM3-3B | GRPO | 69.6 | 90.5 | 73.7 | +9.5 [7.4, 12.2] | +16.8 [6.1, 32.4] | >2.7 | >2.5 |
| Granite-4.2-3B | GRPO | 77.4 | 89.4 | 56.5 | +21.9 [16.8, 27.5] | +32.9 [19.8, 48.4] | 26.5 [6.0, 570.1] | – |
| Qwen3.5-4B | GRPO | 83.2 | 91.6 | 84.0 | +4.1 [1.2, 7.3] | +7.6 [3.8, 11.7] | 3.1 [1.8, 6.6] | 2.7 [1.6, 5.6] |
| REINFORCE | 83.2 | 91.9 | 59.3 | +13.9 [8.2, 19.7] | +32.6 [14.7, 52.6] | >8.0 | – |
Table 9. Repair witnesses outperform outcome-reward baselines on Algo-8. Accuracies are percentages: Base before training, and Witness and Baseline at 400 calls. With Qwen3.5-4B, REINFORCE pairs with its own online witness runs on the same 12 seeds. values are witness minus baseline in points, and Fewer calls, Less GPU time, >, and dashes follow § 2.3. Intervals are 95% paired seed-bootstrap intervals over 12 seeds.
Witnesses reach GRPO’s 400-call accuracy with at least 1.7 times less training GPU time (Table 1 and Table 2, and Table 8 and Table 9 in Appendices § 10 and § 11).
| Task | Model | Baseline | Update ratio | GPU minutes | Fewer calls (×) | Less GPU time (×) |
| Hanoi-Hard | Qwen3-14B | GRPO | ||||
| Qwen3.6-27B | GRPO | |||||
| Qwen3-32B | GRPO | |||||
| Qwen3-14B | GRPO, 1,600 calls | |||||
| Qwen3-14B, self-bootstrapped bank | GRPO, 1,600 calls | |||||
| MBPP+ | Qwen3-1.7B | GRPO | ||||
| GRPO, 1,200 calls | ||||||
| SmolLM3-3B | GRPO | |||||
| LiveCodeBench | Qwen3-8B | GRPO |
Table 8. Repair witnesses reach the accuracy of GRPO with less training GPU time. Update ratio is the mean per-seed ratio of update time, witness over baseline, and GPU minutes give the witness’s training time up to its matching cost and the baseline’s for its full budget. † marks rows whose witness runs, and any 400-call GRPO runs they pair with, kept only their total time. Fewer calls, Less GPU time, and > follow § 2.3, with 95% paired seed-bootstrap intervals over 12 seeds (six for the 1,200-call row).
Self-Bootstrapped Banks under a Total Budget
Repair witnesses need no correct program from outside the model. On Hanoi-Hard, the self-bootstrapped bank of Qwen3-14B holds none of the curated implementations and costs 102 verifier calls to build. With these calls charged, repair witnesses reach 93.6% after 230 total calls (Figure 2 and Appendix § 12), whereas GRPO reaches 68.3% in 1,600 calls, an accuracy witnesses match with 9.0 times fewer calls and 6.5 times less training GPU time (Table 8). The self-bootstrapped bank also teaches faster than the curated one, gaining 10.9 AUC points (Appendix § 12). Its programs are more likely under the policy: on fixed failed proposals, base Qwen3-14B gives the self-bootstrapped witness a per-token negative log-likelihood (NLL) of 0.26 nats, against 0.49 for the curated one.
Natural bugs need no reference either. On HumanEval+, self-bootstrapped banks for Qwen3-1.7B and Qwen3-14B more than double by admitting passing proposals and let online witnesses match GRPO’s final accuracy with 12.0 and 5.0 times fewer calls (Table 12 in Appendix § 12). Without any reference, these witnesses also finish 56.7 and 28.4 points above LUFFY-style guidance. On functions that begin with a self-generated program, these banks outperform the curated bank of Table 1 by 5.8 points pooled (Table 3).
| Model | Method | Calls | Outside bank (%) | accuracy [95% CI] | Fewer calls () | ||
| Qwen3-1.7B | Online witness | 400 | 60.5 | 69.2 | 51.3 | – | – |
| Offline witness | 0 | 55.5 | 65.4 | 33.1 | – | – | |
| GRPO | 400 | 15.6 | 15.0 | 15.2 | +44.9 [36.1, 51.8] | 12.0 [4.4, 31.1] | |
| RFT | 400 | 24.7 | 24.6 | 23.9 | +35.8 [26.1, 44.7] | 4.1 [2.8, 11.5] | |
| LUFFY-style | 400 | 3.8 | 9.1 | 3.2 | +56.7 [51.6, 61.4] | 40.5 [24.9, 129.1] | |
| Qwen3-14B | Online witness | 400 | 65.5 | 72.6 | 50.9 | – | – |
| Offline witness | 0 | 59.3 | 63.0 | 33.5 | – | – | |
| GRPO | 400 | 38.7 | 38.6 | 34.6 | +26.8 [20.1, 36.1] | 5.0 [3.6, 11.9] | |
| RFT | 400 | 45.6 | 47.1 | 42.7 | +19.9 [14.5, 25.8] | 3.8 [2.4, 4.7] | |
| LUFFY-style | 400 | 37.1 | 44.5 | 34.7 | +28.4 [18.5, 39.6] | 5.2 [3.2, 16.4] |
Table 12. With a self-bootstrapped bank and no reference implementation, online witnesses outperform GRPO, RFT, and LUFFY-style guidance on HumanEval+.
The same recipe works from a cold start. With Qwen3-1.7B on MBPP+ and Qwen3-8B on LiveCodeBench, the base policies repair 0.2% and 0.5% of held-out bugs on the training functions, and online witnesses raise these rates to 22.6% and 15.8% in 400 calls, against 0.3% and 1.2% for GRPO (Table 13 in Appendix § 12). On the subset that begins with a self-generated program, they repair 52.1% and 47.1%, against 0.9% and 3.8% for GRPO (Figure 3, Table 3). On MBPP+, the lead holds with a second model family and at 1,200 calls, where witnesses match GRPO’s accuracy with 12.2 times less training GPU time (Table 3 and Table 8), while DAPO and Dr. GRPO stall at 400 calls (Table 13).
| Method | With a program | Empty bank | Method − GRPO | AUC | Fewer calls () | Method − GRPO | ||||
| MBPP+, Qwen3-1.7B | ||||||||||
| Online | 22.6 | 28.6 | 52.1 | 4.6 | +22.3 [20.8, 23.8] | +13.1 [12.6, 13.5] | >16 | 11.9 | 11.9 | +11.6 [8.7, 14.7] |
| GRPO | 0.3 | 0.3 | 0.9 | 0.0 | – | – | – | 0.3 | 0.3 | – |
| DAPO | 0.5 | 0.7 | – | – | +0.2 [−0.4, 0.6] | – | – | 0.3 | 0.3 | 0.0 [−1.0, 1.0] |
| Dr. GRPO | 0.1 | 0.1 | – | – | −0.2 [−0.6, 0.2] | – | – | 0.0 | 0.0 | −0.3 [−1.0, 0.0] |
| MBPP+, SmolLM3-3B | ||||||||||
| Online | 31.4 | 37.9 | 56.9 | 3.4 | +16.6 [12.0, 21.0] | +14.0 [12.3, 15.6] | 7.2 [5.4, 9.4] | 22.1 | 24.1 | +10.3 [5.7, 14.9] |
| GRPO | 14.8 | 15.0 | 26.8 | 1.7 | – | – | – | 11.8 | 13.2 | – |
| MBPP+, Qwen3-1.7B, 1,200 calls | ||||||||||
| Online | 35.9 | 39.0 | 78.2 | 10.2 | +33.0 [30.1, 35.4] | – | 29.4 [15.6, 85.8] | 14.7 | 15.4 | +12.1 [5.1, 17.9] |
| GRPO | 2.9 | 2.9 | 7.3 | 0.3 | – | – | – | 2.6 | 1.3 | – |
| LiveCodeBench, Qwen3-8B | ||||||||||
| Online | 15.8 | 17.6 | 47.1 | 1.2 | +14.6 [13.2, 15.8] | +8.2 [7.7, 8.8] | 18.0 [9.1, 43.3] | 10.6 | 11.0 | +8.1 [6.4, 9.7] |
| GRPO | 1.2 | 0.8 | 3.8 | 0.1 | – | – | – | 2.5 | 1.9 | – |
Table 13. Online witnesses learn from a cold start on MBPP+ and LiveCodeBench and finish above GRPO, DAPO, and Dr. GRPO on training and unseen functions alike.
One Family, Three Operating Points
Without online calls, offline witnesses finish 25 to 54 points above every HumanEval+ outcome-reward and reference-mixing baseline (Table 1 and Table 7 in Appendix § 9). Online witnesses beat offline witnesses in all ten settings of Table 14 in Appendix § 13, by 3.8 points pooled, with 1.3 to 1.9 times as much outside-bank correctness on HumanEval+ (Figure 4). Unlike offline witnesses, they follow the policy’s current proposals and keep its successes.
Figure 4. Online witnesses exceed GRPO’s total accuracy on every HumanEval+ model with outside-bank correctness alone. Each bar splits a method’s final accuracy, in its color, into passes outside the bank (solid) and reproduced bank members (hatched), and the dotted line marks GRPO’s total accuracy. Offline, Online, and Projected (success-projected, run on the three smaller models) are the three witness forms.
| Task | Model | Online (%) | Offline (%) | accuracy [95% CI] | outside bank [95% CI] |
| HumanEval+ | Qwen3-1.7B | 58.6 | 57.4 | +1.2 [−1.9, 4.6] | +9.8 [7.3, 12.3] |
| SmolLM3-3B | 66.1 | 64.1 | +2.0 [−2.2, 6.7] | +19.0 [14.9, 23.0] | |
| Qwen3-14B | 75.5 | 74.4 | +1.1 [−4.2, 6.5] | +17.7 [11.7, 23.5] | |
| Qwen3-32B | 74.2 | 69.1 | +5.1 [0.2, 9.8] | +26.3 [21.4, 30.7] | |
| Qwen3-1.7B, self-bootstrapped bank | 60.5 | 55.5 | +5.0 [0.7, 9.0] | +18.2 [13.6, 21.9] | |
| Qwen3-14B, self-bootstrapped bank | 65.5 | 59.3 | +6.2 [2.3, 10.0] | +17.4 [11.8, 23.3] | |
| Hanoi-Hard | Qwen3-1.7B | 77.0 | 66.8 | +10.2 [5.1, 15.9] | – |
| Qwen3-14B | 87.8 | 87.3 | +0.5 [−3.4, 4.8] | – | |
| MBPP+ | Qwen3-1.7B | 22.6 | 19.2 | +3.4 [1.3, 5.7] | +4.4 [2.3, 6.7] |
| LiveCodeBench | Qwen3-8B | 15.8 | 12.4 | +3.4 [2.2, 4.8] | +3.7 [2.2, 5.2] |
| All ten settings, pooled | +3.8 [2.5, 5.1] | – | |||
| Self-bootstrapped banks, pooled | +4.5 [2.9, 6.0] | +10.9 [9.0, 12.8] |
Table 14. Online witnesses finish above offline witnesses in all ten settings and write more correct programs outside the bank in all eight settings that count them. Accuracies are final percentages at on held-out defects (of the training functions for MBPP+ and LiveCodeBench), and is online minus offline witness in points with 95% paired seed-bootstrap intervals over 12 seeds. Outside-bank correctness counts against the initial bank on self-bootstrapped banks, and the Hanoi-Hard rows omit it because their held-out defects are mutations of bank members. The Self-bootstrapped banks row pools the four self-bootstrapped settings.
On HumanEval+, success-projected witnesses learn faster than online witnesses with Qwen3-1.7B, SmolLM3-3B, and Qwen3-14B and finish 4.4 and 5.9 points above online and offline witnesses pooled (Figure 4 and Appendix § 13). Keeping the policy’s own successes drives outside-bank correctness: online witnesses reach 40.2% to 53.5%, versus 17.5% to 25.0% for success-projected witnesses (Figure 4).
Offline and online witnesses also compose: started from the offline-witness policy, online witnesses repair 82.3% and 91.4% of held-out HumanEval+ bugs at with Qwen3-1.7B and Qwen3-14B, 8.4 and 9.5 points above those started from the base model with the same 400 calls (Table 15).
Why the Nearest Fix and What Transfers
Witness gains come from the supervised term and its choice of target. Without that term, REINFORCE finishes 28.3 and 32.6 points below repair witnesses on Algo-8 with Qwen3-1.7B and Qwen3.5-4B (Table 9 in Appendix § 11), and on HumanEval+ it only matches GRPO, 41.7 and 43.1 points below online witnesses with Qwen3-1.7B and Qwen3-14B (Table 10). That term alone keeps 97.9% and 90.2% of the AUC lead of online witnesses over GRPO and 98.3% and 98.9% of their lead, and the policy-gradient term adds 2.3 AUC points [0.3, 4.3] on Qwen3-14B.
| Model | Method | AUC (%) | AUC [95% CI] | accuracy, [95% CI] | accuracy, [95% CI] | ||
| Qwen3-1.7B | Online witness | 32.5 | 58.6 | 73.2 | – | – | – |
| CE-only | 32.1 | 57.9 | 72.5 | +0.4 [−2.3, 2.8] | +0.7 [−3.6, 4.7] | +0.7 [−2.9, 4.0] | |
| REINFORCE | 13.2 | 16.9 | 17.2 | +19.3 [15.6, 22.6] | +41.7 [34.4, 49.2] | +56.0 [47.3, 64.4] | |
| Likelihood witness | 40.5 | 62.6 | 73.4 | −8.0 [−10.1, −6.0] | −4.0 [−8.0, −0.2] | −0.2 [−3.8, 3.6] | |
| GRPO | 14.9 | 15.6 | 15.0 | +17.6 [14.8, 20.4] | +43.0 [32.7, 51.0] | +58.2 [50.8, 64.3] | |
| CE-only lead kept (%) | 97.9 | 98.3 | 98.7 | ||||
| Qwen3-14B | Online witness | 52.4 | 75.5 | 81.9 | – | – | – |
| CE-only | 50.1 | 75.1 | 83.8 | +2.3 [0.3, 4.3] | +0.4 [−4.9, 5.3] | −1.9 [−4.1, 0.4] | |
| REINFORCE | 29.1 | 32.4 | 33.7 | +23.3 [18.0, 28.2] | +43.1 [34.3, 52.0] | +48.2 [38.7, 57.8] | |
| Likelihood witness | 55.5 | 77.8 | 85.1 | −3.1 [−4.7, −1.5] | −2.3 [−6.8, 2.4] | −3.2 [−6.5, 0.2] | |
| GRPO | 29.2 | 38.7 | 38.6 | +23.2 [18.7, 28.4] | +36.8 [28.9, 45.6] | +43.3 [36.7, 51.3] | |
| CE-only lead kept (%) | 90.2 | 98.9 | 104.5 |
Table 10. Cross-entropy on witness targets carries the lead of online witnesses over GRPO on HumanEval+: CE-only keeps most of it, REINFORCE matches GRPO, and likelihood witnesses learn faster still. Accuracies are at 400 calls, and is online witness minus the row’s method in points with 95% paired seed-bootstrap intervals over 12 seeds. CE-only lead kept is CE-only minus GRPO as a percentage of online witness minus GRPO.
Nearest witnesses beat random farther ones by 7.6 AUC points on Algo-8 with Qwen3-1.7B (Figure 5a) and lead in all 14 comparisons across seven models and three tasks, including the self-bootstrapped bank, by 4.3 points pooled (Figure 5b and Table 11 in Appendix § 11). Proximity in tokens is proximity to the policy. On fixed failed Hanoi-Hard proposals, base Qwen3-14B gives the nearest self-bootstrapped witness a per-token NLL of 0.26 nats, against 0.48 for farther members (Figure 5c). Likelihood witnesses, which retrieve the bank member that the current policy finds most likely, learn faster still, by 8.0 and 3.1 AUC points on HumanEval+ with Qwen3-1.7B and Qwen3-14B, and finish level at (Table 10). Edit distance picks the same target for most failures without running the policy on the bank.
Figure 5. The policy learns faster from the nearest witness, which is more likely under the policy than farther bank members. (a) Nearest against random farther witnesses on Algo-8 with Qwen3-1.7B. (b) Nearest minus random farther AUC in all 14 comparisons and the pooled effect (self bank marks the self-bootstrapped bank). (c) Per-token NLL of the nearest witness and the mean over farther self-bootstrapped members on fixed failed Hanoi-Hard proposals under base Qwen3-14B. Bands in (a) and whiskers in (b) are 95% seed-bootstrap intervals, paired in (b).
By AUC over the 400-call budget, the nearest witness learns faster than a random farther witness in all 14 comparisons. Entries are nearest minus random farther witness in AUC points, with 95% paired seed-bootstrap intervals over 12 seeds (53 for Algo-8 with Qwen3-1.7B).
| Model | Algo-8 | Hanoi-Hard | HumanEval+ |
| Qwen3-1.7B | +7.6 [6.6, 8.7] | +4.5 [2.0, 7.2] | +4.3 [2.3, 6.1] |
| SmolLM3-3B | +5.5 [3.6, 7.8] | +2.0 [−0.1, 4.0] | +0.3 [−1.6, 2.1] |
| Granite-4.2-3B | +4.4 [1.1, 8.2] | – | – |
| Qwen3.5-4B | +1.4 [−1.1, 3.8] | – | – |
| Qwen3-14B | – | +7.9 [5.8, 10.1] | +2.5 [0.4, 4.3] |
| Qwen3-14B, self-bootstrapped bank | – | +6.8 [4.7, 8.8] | – |
| Qwen3.6-27B | – | +5.5 [2.4, 8.5] | – |
| Qwen3-32B | – | +4.3 [2.0, 6.8] | +2.5 [−1.0, 6.3] |
| All 14 comparisons, pooled | – | +4.3 [3.6, 4.9] | – |
Table 11. By AUC over the 400-call budget, the nearest witness learns faster than a random farther witness in all 14 comparisons. Entries are nearest minus random farther witness in AUC points, with 95% paired seed-bootstrap intervals over 12 seeds (53 for Algo-8 with Qwen3-1.7B).
Beyond the training functions, witness-trained policies outperform GRPO in all six transfer evaluations on HumanEvalFix and QuixBugs (Table 4), and on QuixBugs, Qwen3-14B trained on Hanoi-Hard reaches 66.2% with online witnesses, against 57.5% with offline witnesses.
| Model | Training | Unseen task | Functions | Base (%) | Witness (%) | GRPO (%) | accuracy [95% CI] |
| Qwen3-1.7B | HumanEval+ | HumanEvalFix | 69 | 5.1 | 42.3 | 9.3 | +33.0 [24.8, 39.1] |
| Qwen3-1.7B | HumanEval+ | QuixBugs | 10 | 5.0 | 25.9 | 4.9 | +21.0 [18.5, 23.5] |
| SmolLM3-3B | HumanEval+ | QuixBugs | 10 | 19.6 | 34.9 | 18.8 | +16.1 [12.9, 19.2] |
| Qwen3-1.7B | Hanoi-Hard | HumanEvalFix | 69 | 5.0 | 34.6 | 15.7 | +18.9 [11.1, 25.2] |
| Qwen3-1.7B | Hanoi-Hard | QuixBugs | 10 | 5.5 | 22.4 | 12.6 | +9.8 [4.8, 15.0] |
| Qwen3-14B | Hanoi-Hard | QuixBugs | 10 | 31.7 | 66.2 | 43.5 | +22.7 [12.6, 33.8] |
Table 4. Repair skill transfers to functions absent from training and the bank. is witness minus GRPO in points with 95% paired seed-bootstrap intervals, and Base evaluates the untrained model with each row’s sampling seeds.
Related Work
Policy-gradient and preference methods learn from sequence-level outcomes ([44, 37, 34]), and CodeRL, GRPO, and DeepSeek-R1 bring them to code and reasoning ([38, 12] (Le et al. 2022)). DAPO resamples uniform-reward groups and Dr. GRPO removes an optimization bias of GRPO ([25] (Yu et al. 2025)). RLTF and StepCoder add unit-test and compiler feedback ([24, 8]), and SWE-RL rewards similarity to the oracle patch ([43]). Repair witnesses keep the binary verifier and every sampled group but give failures a program target, not a scalar reward.
Self-Debug, Self-Refine, and Reflexion rely on explanations or reflective feedback ([5, 28, 39]), RLEF and SCoRe train models to use execution feedback and to self-correct across turns ([9, 20]), and SDPO distills a feedback-conditioned self-teacher into the policy ([15]). Repair witnesses use binary feedback and retrieve verified targets without extra calls or turns.
DAgger gathers supervision at states the learner visits, hindsight experience replay learns from unsuccessful episodes ([35, 2]), and optimal completion distillation derives targets from edit distance to a reference ([36]). STaR, ReST, ReST-EM, RAFT, and self-imitation learning train on the model’s own selected successes ([50, 10, 41, 7] (Oh et al. 2018)), and LUFFY (§ 3.1), ReLIFT, CHORD, HPT, and BREAD mix expert traces into on-policy learning ([47, 51, 52] (Ma et al. 2026; Lv et al. 2025)). Repair witnesses retrieve failure targets from the bank and keep the policy’s successes, so supervision tracks the learner without expert demonstrations.
Concurrent with our work, projected distillation has a stronger model minimally edit each failed attempt into a correct answer, trains on the edited spans with a contrastive loss and on the policy’s own correct answers, and shows that targets farther from the policy cost more of its prior abilities ([6]). Its analysis of edit size and ours of witness distance arrive independently at the same principle: a failure should learn from a close, correct target. Repair witnesses retrieve that target from verified programs, with no teacher queried, no rewrite to verify, and all cost counted in verifier calls.
Clara and Refactory repair student programs by aligning them with the closest correct submission in a pool, a precedent for the nearest-fix principle ([11] (Hu et al. 2019)). Conversational, completion-guided, adapter-based, and repository-level repair are complementary ([45, 42, 40, 19, 46]).
Conclusion
Repair witnesses turn failed verifier calls into supervision by matching each failure to the nearest program in a bank of verified implementations, and a bank built from the model’s own passing proposals needs no teacher or reference solution (§ 3.3). Across offline, online, and success-projected forms, witnesses outpace every outcome-reward and reference-mixing baseline within the same call budgets. The policy learns faster from the nearest verified program than from a farther one, and what it learns extends beyond the bank and the training functions. A verifier can do more than judge an attempt: with the programs it has already accepted, every failure it reports also points to the nearest fix.
Impact Statement
This work improves the verifier efficiency of reinforcement learning for code repair. The experiments use public programming benchmarks and openly released models, with no new collection of user data. More efficient repair training can make automated debugging and software maintenance more accessible. Generated repairs should undergo the testing and review appropriate to their deployment context.
Data and Evaluation Sets
Table 5 summarizes every task’s data and evaluation sets, shared by all methods for a model.
HumanEval+ Repair
HumanEvalFix comes from the Python split of HumanEvalPack (Muennighoff et al., [30]), with one human-written defect for each HumanEval function, and EvalPlus supplies the corresponding extended HumanEval+ tests (Liu et al., [23]). We align the two datasets by function identifier and entry point. A candidate function needs a passing reference implementation within the execution time limit, a prompt and output that fit the length caps, a nonempty verified bank, and at least two distinct natural training defects.
For each model and function, 16 repair attempts on the human-written defect estimate base accuracy, which must be at most 75% for eligibility. Selection keeps up to 40 eligible functions with base accuracy in (0%, 50%], those closest to 25% first, and fills the remaining places one at a time from the other eligible functions, each time taking the function that brings the mean base accuracy of the set closest to 25%. This gives 40 functions for Qwen3-1.7B and SmolLM3-3B and all 27 eligible functions for Qwen3-14B and Qwen3-32B.
A natural defect parses, defines the entry point, ends without truncation, and fails the functional verifier. Distinctness uses canonical token sequences. Each function’s training inputs cycle over its training defects, which are canonically distinct from the bank, the held-out defect, and one another. With Qwen3-14B and Qwen3-32B, natural failures of smaller Qwen3 models on the same specifications fill out the training defects where the model’s own failures fall short, and the bank still holds only the model’s own programs and the reference.
HumanEvalPack is distributed under the MIT license and HumanEval+ under Apache-2.0. Verification runs each program in a resource-limited subprocess. All methods for a task share the same prompt, decoding, and verifier.
MBPP+ and LiveCodeBench
MBPP+ uses the EvalPlus tests for MBPP (Austin et al., [3]; Liu et al., [23]), and LiveCodeBench uses the functional problems of release v6 (Jain et al., [18]). The model being trained writes 16 programs per function from the specification. Failures that satisfy the natural-defect conditions above become defects, and passes become bank members, at most six per function after canonical deduplication. Eligibility requires at least three distinct defects: one held out for evaluation and up to four for training. As on HumanEval+, each function’s four training inputs cycle over its training defects. A fixed hash assigns 20% of the eligible functions to the unseen split (26 of 129 and 38 of 191 on MBPP+ with Qwen3-1.7B and SmolLM3-3B, 60 of 300 on LiveCodeBench), whose defects and programs never enter the bank. Training keeps up to 160 of the remaining functions, those with base repair accuracy closest to 25% first. MBPP+ is distributed under Apache-2.0 and the LiveCodeBench code under the MIT license.
Hanoi-Hard and Algo-8
Hanoi-Hard combines cyclic_hanoi and linear_hanoi. Each function contributes 20 training defects, 20 held-out defects, and six canonically distinct verified implementations to the shared curated bank.
Algo-8 uses bitcount, gcd, get_factors, flatten, is_valid_parenthesization, pascal, hanoi, and to_base. Single-node mutations of verified implementations that fail the tests are deduplicated canonically and split at random into 20 training and 20 held-out defects per function. QuixBugs supplies the public algorithmic functions under the MIT license (Lin et al. [22]).
Unseen-Function Transfer
The 69 HumanEvalFix functions, the same for both HumanEvalFix rows of Table 4, lie outside the Qwen3-1.7B HumanEval+ training set and banks and have base accuracy at most 75%. The 10 QuixBugs functions exclude the Hanoi family and every function whose entry point or reference implementation appears in training or in a bank. Each function receives 32 generations per final policy, and the base model uses the same input, decoding, and verifier.
Verifier Budget and Bank Construction
The online budget is 400 calls for every online method except the 1,200-call runs on MBPP+ and the 1,600-call GRPO run on Hanoi-Hard. Every curated bank and the self-bootstrapped Hanoi-Hard bank are built once before training and shared across all witness runs that use them. On HumanEval+, MBPP+, and LiveCodeBench, the initial bank and the natural training defects come from the same specification-conditioned samples, so the bank adds no verifier calls beyond building the shared training set. The self-bootstrapped Hanoi-Hard bank takes the proposals that base Qwen3-14B samples for the training defects before its first update: 96 proposals, each verified once, of which 23 pass. After canonical deduplication and removal of every program that coincides with a curated member, three implementations per function remain, and rechecking these six brings construction to 102 verifier calls. Offline witnesses take their supervision from the inputs whose function has a bank member.
Canonicalization and Witness Selection
Canonicalization makes target distance insensitive to formatting and surface variation. It parses the program, removes comments and docstrings, normalizes supported type annotations and imports, and deterministically renames local bindings. Tokens follow the normalized syntax tree, and indentation and dedentation keep their token kinds without whitespace strings. The canonicalizer for HumanEval+, MBPP+, and LiveCodeBench keeps top-level entry names. The Hanoi-Hard and Algo-8 canonicalizer supports functions without lambdas, classes, global or nonlocal declarations, or nested-scope shadowing.
For a proposal with a supported canonical form, the selector computes exact Levenshtein distance to every bank member and samples uniformly among the members at minimum distance. A proposal that cannot be canonicalized falls back to the first bank member under every witness rule: the reference implementation of a curated bank or the earliest verified program of a self-bootstrapped bank. Online witnesses keep a passing proposal’s sampled token sequence as its target (Algorithm 1).
For the random farther witness, each seed draws one far anchor per function before training from a pool fixed with the data: on Algo-8, the members strictly farther than the nearest member from every defect of the function; on the curated Hanoi-Hard bank, one designated implementation; and on HumanEval+ and the self-bootstrapped Hanoi-Hard bank, the member with the largest total canonical token edit distance to the function’s training defects. When the anchor is strictly farther than the nearest member for the current failure, the control samples uniformly from all strictly farther members, and otherwise it uses the nearest member.
Training Configuration and Baselines
We use low-rank adaptation (LoRA) with zero dropout on every linear layer except the output head (on Muse Glimmer-30B, the attention and MLP projections of its language model) and keep the base weights fixed in bfloat16 (Hu et al. (2022)). Table 6 gives the common configuration. Experiments run on NVIDIA H100, RTX PRO 6000, and L4 GPUs. The Qwen models follow their released instruction interfaces with thinking disabled (Yang et al. [48]; Qwen Team [32]), and generation uses the same chat-template setting within each comparison. Each input is one user message: an instruction, then
| Parameter | Value | Parameter | Value |
| LoRA rank | 16 | Supervised weight | 1.0 |
| LoRA | 32 | Updates | 100 |
| Learning rate | 0.0001 | Batch inputs (witness/RFT) | 2 |
| Prompt token cap | 768 | Proposals per input (witness/RFT) | 2 |
| Completion token cap | 384 | GRPO KL weight | 0.04 |
| Sampling temperature | 1.0 | Bootstrap replicates | 10,000 |
Table 6. Common training configuration. GRPO samples one input with four proposals per update, and offline witnesses take four supervised targets per update without online sampling. MBPP+ raises the prompt and completion token caps to 1,024 and 512, and LiveCodeBench to 2,048 and 768.
Algorithm 1. One update with online repair witnesses
Require: policy , training inputs , verified banks , inputs per update , group size , weight
Draw inputs at random from
for do
Sample proposals
Verify for each ▷ calls
for do
if then
▷ own success
else if then
▷ witness, no call
else
▷ no supervised term
end if
end for
end for
Clip to norm one and take an AdamW step
With a growing bank, add every passing that is canonically new to ▷ no call
Specification: with the function specification and Buggy code: with the defective implementation. On HumanEval+ and MBPP+, the instruction reads “Repair the following Python function. Preserve its name and signature. Return the complete corrected Python code, including any imports and helper functions, without prose, tests, or Markdown.” LiveCodeBench asks for a repaired Python solution that preserves class Solution and its method signature, and Hanoi-Hard and Algo-8 ask for function definitions without imports and list the available builtins. We use AdamW without weight decay, clip the gradient norm at one, and take one optimizer step per batch. The witness objective uses centered rewards without standard-deviation normalization or a KL term.
For GRPO, the advantage is the centered binary reward divided by the group’s population standard deviation plus a small stabilizer. The KL term uses the adapter-disabled base policy as reference and the nonnegative sampled estimator
for each continuation token . Its mean over continuation tokens times the KL weight is added to the policy-gradient loss. On MBPP+ and HumanEval+, DAPO-style dynamic sampling draws one group of four per step and skips the update whenever all four rewards agree, still charging the group’s calls. Dr. GRPO drops the standard-deviation normalization and divides each sequence log-likelihood by a fixed length instead of the response length. RFT uses the same input sampling as repair witnesses and applies cross-entropy only to successful programs, with failed samples kept in the batch denominator.
In Table 7, random-bank SFT trains as offline witnesses do but draws each target uniformly from the bank, and its AUC places update at calls.
LUFFY-style guidance follows Yan et al. [47] within the GRPO configuration. Every update adds the function’s EvalPlus reference implementation to the group of four proposals with a reward of one and no verifier call, normalizes advantages over the mixed group, and applies the shaping with to each token probability of the reference under the policy. The KL weight is zero, as in LUFFY. When all four proposals fail, the reference gives each proposal an advantage of , so the update lowers the likelihood of every program the policy wrote. Over the four models, 9 of the 48 LUFFY-style runs end at zero accuracy, against 1 of the 48 GRPO runs, whereas every online witness run finishes above its starting accuracy.
Statistical Definitions
For a seed’s held-out accuracy curve at online call count , the normalized AUC is
computed by trapezoidal integration on the evaluation grid. Method differences are computed within each seed before averaging or resampling.
Fewer calls compares repair witnesses with a baseline at the accuracy the baseline reaches with its full budget. The target is the mean final accuracy of the baseline over paired seeds. For each witness seed, the matching cost is the linearly interpolated call count after which held-out accuracy stays at or above the target, or 400 calls if it does not. Fewer calls divides the baseline’s budget of 400, 1,200, or 1,600 calls by the mean matching cost. On the total-call axis of the self-bootstrapped bank, the 102 construction calls are added to the matching cost of every seed.
We resample paired training seeds with replacement for 10,000 bootstrap replicates and report 95% paired seed-bootstrap intervals using percentile bounds. A pooled effect resamples paired seeds independently within each setting and weights settings equally. Task sets and generated programs stay fixed within each replicate, and every replicate recomputes the fewer-calls target from its resampled baseline seeds. Analyses use 12 paired seeds with five exceptions. The comparison of nearest and random farther witnesses on Algo-8 with Qwen3-1.7B has 53, the 1,200-call MBPP+ comparison and the GRPO sweep have six each, the offline-witness start with Qwen3-1.7B has eight, and training GPU time against LUFFY-style guidance with Qwen3-1.7B has eight, the seeds whose two runs share a GPU type.
Each update records its wall-clock time on the training GPU after device synchronization, covering rollout generation, verifier execution, the backward pass, the optimizer step, and online-bank admission; held-out evaluation, checkpointing, and model loading are excluded. The cumulative update time of each witness run converts its seed’s matching cost into GPU time, linearly within an update, and Less GPU time divides the baseline’s mean training time for its full budget by the mean of these times. Initial bank verification is charged before the witness’s first update, and building the self-bootstrapped bank is charged in full to every seed. In the rows of Table 8 marked †, the witness runs and the GRPO runs they pair with at 400 calls kept only their total wall-clock time, so their training time is that total minus evaluation. At each call count, a witness run is charged its training time times the largest mean share that witness runs spend up to that count among settings timed per update. A GRPO run is charged its training time reduced by the largest mean share that GRPO runs spend outside updates in those settings (11.7%). Rebuilt without each of the eleven settings timed per update, this rule recovers 58.2% to 96.4% of its measured Less GPU time. For GRPO continued to 1,200 calls on MBPP+, training time is three times the 400-call training time of the six continued seeds. Each seed’s witness and baseline runs use the same GPU type, and every bootstrap replicate recomputes the target, matching costs, witness times, and baseline mean. With Qwen3-1.7B, the interval of calls to match LUFFY-style guidance reaches zero on its eight same-GPU seeds, so Table 1 gives its Less GPU time as a lower bound, while its Fewer calls over all 12 seeds has a finite interval.
For larger-group GRPO (), evaluations follow the first update reaching each common-grid call count, and the curve is interpolated onto that grid for AUC. Final accuracy uses the observed endpoint.
Evaluation at decodes the final policies with the held-out bugs, sample count, prompt, and length caps used at .
Additional Outcome-Reward, Ablation, and Witness-Choice Comparisons
REINFORCE in Table 9 and Table 10 keeps only the policy-gradient term of Equation (1), and the random farther witness in Table 11 keeps both terms and changes only the target. In Table 10, on the 12 seeds of Table 1, CE-only online witnesses train with cross-entropy on their targets alone, and likelihood witnesses keep both terms but give each failure the bank member with the highest mean target-token log-probability under the current policy. On HumanEval+, REINFORCE sees uniform rewards in 98.2% and 91.5% of its two-proposal groups with Qwen3-1.7B and Qwen3-14B. Likelihood retrieval keeps the nearest witness for 66.4% and 75.0% of failures with a canonical form, and its targets lie on average 7.2 and 2.5 canonical token edits beyond the nearest distance.
Self-Bootstrapped Banks and Cold-Start Repair
On Hanoi-Hard with Qwen3-14B, witnesses on the self-bootstrapped bank reach 93.6% [90.7, 96.0] after 230 total calls, the 102 construction calls included, and match the 1,600-call accuracy of GRPO, 68.3% [53.2, 80.2], with 9.0 times fewer total calls [6.0, 9.6]. Against the curated bank, they gain 10.9 AUC points [9.1, 12.5]. On 48 fixed failed proposals for 22 training defects, base Qwen3-14B gives the nearest self-bootstrapped witness a per-token negative log-likelihood 0.23 nats [0.16, 0.30] lower than the nearest curated witness, with defects resampled in a paired bootstrap.
Table 12. With a self-bootstrapped bank and no reference implementation, online witnesses outperform GRPO, RFT, and LUFFY-style guidance on HumanEval+. The bank starts from the model’s own verified programs and admits passing proposals during training. Offline witnesses use the initial bank. At , Outside bank is measured against the initial bank, and accuracy and Fewer calls follow Table 1 with 95% paired seed-bootstrap intervals over 12 seeds.
On the self-bootstrapped banks, each run admits 90.0 new programs [84.2, 95.8] with Qwen3-1.7B and 85.7 [78.1, 94.0] with Qwen3-14B, so the banks grow from 84 to 174 programs and from 54 to 140.
On the 32 of 40 functions for Qwen3-1.7B and 18 of 27 for Qwen3-14B that begin with a self-generated program (Table 3), the self-bootstrapped bank held fixed during training leads the curated bank at by 5.9 points [2.2, 9.9] pooled.
Table 13. Online witnesses learn from a cold start on MBPP+ and LiveCodeBench and finish above GRPO, DAPO, and Dr. GRPO on training and unseen functions alike. With a program and Empty bank split the training functions by initial bank at : With a program covers 39 and 80 MBPP+ functions (Qwen3-1.7B, SmolLM3-3B) and 51 LiveCodeBench functions, and Empty bank the remaining 64, 73, and 109. Unseen functions are absent from training and the bank. Method − GRPO is the row’s accuracy minus that of GRPO at the same budget and in points, with 95% paired seed-bootstrap intervals over 12 seeds (six for the 1,200-call block …). AUC over the 400-call budget and Fewer calls compare online witnesses with GRPO on held-out bugs of the training functions, and > and dashes follow § 2.3.
GRPO receives no reward gradient in 98.9% of updates on MBPP+ with Qwen3-1.7B, 79.3% with SmolLM3-3B, and 96.8% on LiveCodeBench, and DAPO’s dynamic sampling discards 99.0% of its MBPP+ groups, so a run averages one update and 5 of 12 never update.
The Witness Family and Outside-Bank Correctness
On HumanEval+, success-projected witnesses gain 2.5 AUC points [0.4, 4.4] over online witnesses with Qwen3-1.7B, 2.3 [0.6, 4.0] with SmolLM3-3B, and 3.2 [1.5, 4.8] with Qwen3-14B. Pooled over the three models, they finish 4.4 points [1.6, 7.1] above online witnesses and 5.9 points [3.2, 8.5] above offline witnesses at .
In Table 15, each seed’s offline-witness adapter is merged into the base weights, and GRPO or online witnesses train a new adapter on the merged policy for 400 calls, with the merged policy as the KL reference of GRPO. From this shared start, online witnesses reach the 400-call accuracy of GRPO after 88.0 calls with Qwen3-1.7B and 192.3 with Qwen3-14B, 4.5 times fewer [1.8, 7.3] and 2.1 times fewer [1.3, 12.4]. At , GRPO ends no higher than the offline-witness policy it starts from or than online witnesses trained from the base model with the same 400 calls.
References
- [1]Abtahizadeh, A. E., Aghamelu, M., Ahmed, A., Angeles Acuna, J. C., Audran-Reiss, A., Avrahamy, A., Bachrach, Y., Balioglu, C., et al. Muse Glimmer 30B: An On-Device Agentic Model. arXiv preprint arXiv:2610.24628, 2026. URL https://arxiv.org/abs/2610.24628.
- [2]Andrychowicz, M., Wolski, F., Ray, A., Schneider, J., Fong, R., Welinder, P., McGrew, B., Tobin, J., Abbeel, P., and Zaremba, W. Hindsight Experience Replay. In NeurIPS, 2017. URL https://papers.nips.cc/paper_files/paper/2017/hash/453fadbd8a1a3af50a9df4df899537b5-Abstract.html.arxiv.org/abs/1707.01495
- [3]Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., and Sutton, C. Program Synthesis with Large Language Models. arXiv preprint arXiv:2108.07732, 2021. URL https://arxiv.org/abs/2108.07732.
- [4]Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinton, H. P. d. O., Kaplan, J., Edwards, H., Burda, Y., et al. Evaluating Large Language Models Trained on Code. arXiv preprint arXiv:2107.03374, 2021. URL https://arxiv.org/abs/2107.03374.
- [5]Chen, X., Lin, M., Schaerli, N., and Zhou, D. Teaching Large Language Models to Self-Debug. In ICLR, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/hash/2460369f62d0d421885997dd61d12ac56b-Abstract-Conference.html.
- [6]Deshmukh, S. V., Bock, C., Ruan, K., Awasthi, A., Lingam, V., Houghton, R., and Prajapat, M. Projected Distillation: On Learning to Solve Hard Problems from Close, Correct Targets. arXiv preprint arXiv:2610.27467, 2026. URL https://arxiv.org/abs/2610.27467.
- [7]Dong, H., Xiong, W., Goyal, D., Zhang, Y., Chow, W., Pan, R., Diao, S., Zhang, J., Shum, K., and Zhang, T. RAFT: Reward rAnked Fine-Tuning for Generative Foundation Model Alignment. Transactions on Machine Learning Research, 2023. URL https://arxiv.org/abs/2304.06767.
- [8]Dou, S., Liu, Y., Jia, H., Zhou, E., Xiong, L., Shan, J., Huang, C., Wang, X., et al. StepCoder: Improving Code Generation with Reinforcement Learning from Compiler Feedback. In ACL, 2024. URL https://aclanthology.org/2024.acl-long.251/.DOI
- [9]Gehring, J., Zheng, K., Copet, J., Mella, V., Cohen, T., and Synnaeve, G. RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning. In ICML, 2025. URL https://proceedings.mlr.press/v267/gehring25a.html.arxiv.org/abs/2410.02089
- [10]Gulcehre, C., Paine, T. L., Srinivasan, S., Konyushkova, K., Weerts, L., Sharma, A., Siddhant, A., Ahern, A., et al. Reinforced Self-Training (ReST) for Language Modeling. arXiv preprint arXiv:2308.08998, 2023. URL https://arxiv.org/abs/2308.08998.
- [11]Gulwani, S., Radiček, I., and Zuleger, F. Automated Clustering and Program Repair for Introductory Programming Assignments. In PLDI, 2018. URL https://doi.org/10.1145/3192366.3192387.
- [12]Guo, D., Yang, D., Zhang, H., Song, J., Wang, P., Zhu, Q., Xu, R., Zhang, R., et al. DeepSeek-R1 Incentivizes Reasoning in LLMs through Reinforcement Learning. Nature, 2025. URL https://doi.org/10.1038/s41586-025-09422-z.
- [15]Hübötter, J., Lübeck, F., Behric, L., Baumann, A., Bagatella, M., Marta, D., Hakimi, I., Shenfeld, L., Kleine Buening, T., Guestrin, C., and Krause, A. Reinforcement Learning via Self-Distillation. In ICML, 2026. URL https://proceedings.mlr.press/v306/hubotter26a.html.arxiv.org/abs/2601.20802
- [16]Hugging Face. SmolLM3-3B. Hugging Face model card, 2025. URL https://huggingface.co/HuggingFaceTB/SmolLM3-3B. Accessed October 2026.
- [17]IBM Granite Team. Granite-4.2-3B. Hugging Face model card, 2026. URL https://huggingface.co/ibm-granite/granite-4.2-3b. Accessed October 2026.
- [18]Jain, N., Han, K., Gu, A., Li, W.-D., Yan, F., Zhang, T., Wang, S., Solar-Lezama, A., Sen, K., and Stoica, I. LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code. In ICLR, 2025. URL https://arxiv.org/abs/2403.07974.
- [19]Jimenez, C. E., Yang, J., Wettig, A., Yao, S., Pei, K., Press, O., and Narasimhan, K. SWE-bench: Can Language Models Resolve Real-World GitHub Issues? In ICLR, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/hash/edac78c3e300629acfe6cbe9ca88fb84-Abstract-Conference.html.arxiv.org/abs/2310.06770
- [20]Kumar, A., Zhuang, V., Agarwal, R., Su, Y., Co-Reyes, J. D., Singh, A., Baumli, K., Iqbal, S., et al. Training Language Models to Self-Correct via Reinforcement Learning. In ICLR, 2025. URL https://proceedings.iclr.cc/paper_files/paper/2025/hash/871ac99fdc5282d0301934d23945ebaa-Abstract-Conference.html.arxiv.org/abs/2409.12917
- [22]Lin, D., Koppel, J., Chen, A., and Solar-Lezama, A. QuixBugs: A Multi-Lingual Program Repair Benchmark Set Based on the Quixey Challenge. In SPLASH Companion, 2017. URL https://2017.splashcon.org/details/splash-2017-Poster/18/QuixBugs-A-Multi-Lingual-Program-Repair-Benchmark-Set-Based-on-the-Quixey-Challenge.
- [23]Liu, J., Xia, C. S., Wang, Y., and Zhang, L. Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation. In NeurIPS, 2023a. URL https://papers.nips.cc/paper_files/paper/2023/hash/43e9d647ccd3e4b7b5baab53f0368686-Abstract-Conference.html.arxiv.org/abs/2305.01210
- [24]Liu, J., Zhu, Y., Xiao, K., Fu, Q., Han, X., Yang, W., and Ye, D. RLTF: Reinforcement Learning from Unit Test Feedback. Transactions on Machine Learning Research, 2023b. URL https://openreview.net/forum?id=hjYmsV6nXZ.arxiv.org/abs/2307.04349
- [25]Liu, Z., Chen, C., Li, W., Qi, P., Pang, T., Du, C., Lee, W. S., and Lin, M. Understanding R1-Zero-Like Training: A Critical Perspective. In ICML, 2025. URL https://openreview.net/forum?id=5PAF7PAY2Y.arxiv.org/abs/2503.20783
- [28]Madaan, A., Tandon, N., Gupta, P., Hallinan, S., Gao, L., Wiegreffe, S., Alon, U., Dziri, N., et al. Self-Refine: Iterative Refinement with Self-Feedback. In NeurIPS, 2023. URL https://papers.nips.cc/paper_files/paper/2023/hash/91edf07232fb1b55a505a9e9f6c0ff3-Abstract-Conference.html.arxiv.org/abs/2303.17651
- [29]Mistral AI. Mistral-Small-3.2-24B-Instruct-2506. Hugging Face model card, 2025. URL https://huggingface.co/mistralai/Mistral-Small-3.2-24B-Instruct-2506. Accessed October 2026.
- [30]Muennighoff, N., Liu, Q., Zebaze, A., Zheng, Q., Hui, B., Zhuo, T. Y., Singh, S., Tang, X., Von Werra, L., and Longpre, S. OctoPack: Instruction Tuning Code Large Language Models. In ICLR, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/hash/1ec299a522903411e58aeed0d0b9de-Abstract-Conference.html.arxiv.org/abs/2308.07124
- [32]Qwen Team. Qwen3.5-4B. Hugging Face model card, 2026a. URL https://huggingface.co/Qwen/Qwen3.5-4B. Accessed October 2026.
- [33]Qwen Team. Qwen3.6-27B. Hugging Face model card, 2026b. URL https://huggingface.co/Qwen/Qwen3.6-27B. Accessed October 2026.
- [34]Rafailov, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct Preference Optimization: Your Language Model is Secretly a Reward Model. In NeurIPS, 2023. URL https://papers.nips.cc/paper_files/paper/2023/hash/8a5400e65d5c6477a4fe8302b5e06ce7-Abstract-Conference.html.arxiv.org/abs/2305.18290
- [35]Ross, S., Gordon, G., and Bagnell, D. A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning. In AISTATS, 2011. URL https://proceedings.mlr.press/v15/ross11a.html.arxiv.org/abs/1011.0686
- [36]Sabour, S., Chan, W., and Norouzi, M. Optimal Completion Distillation for Sequence Learning. In ICLR, 2019. URL https://openreview.net/forum?id=rkMWl1hRqKX.arxiv.org/abs/1810.01398
- [37]Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal Policy Optimization Algorithms. arXiv preprint arXiv:1707.06347, 2017. URL https://arxiv.org/abs/1707.06347.
- [38]Shao, Z., Wang, P., Zhu, Q., Xu, R., Song, J., Bi, X., Zhang, H., Zhang, M., Li, Y. K., Wu, Y., and Guo, D. DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. arXiv preprint arXiv:2402.03300, 2024. URL https://arxiv.org/abs/2402.03300.
- [39]Shinn, N., Cassano, F., Gopinath, A., Narasimhan, K., and Yao, S. Reflection: Language Agents with Verbal Reinforcement Learning. In NeurIPS, 2023. URL https://papers.nips.cc/paper_files/paper/2023/hash/1b44b878bb782e6954cd888628510e90-Abstract-Conference.html.arxiv.org/abs/2303.11366
- [40]Silva, A., Fang, S., and Monperrus, M. RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repair. IEEE Transactions on Software Engineering, 2025. URL https://doi.org/10.1109/TSE.2025.3581062.
- [41]Singh, A., Co-Reyes, J. D., Agarwal, R., Anand, A., Patil, P., Garcia, X., Liu, P. J., Harrison, J., et al. Beyond Human Data: Scaling Self-Training for Problem-Solving with Language Models. Transactions on Machine Learning Research, 2024. URL https://arxiv.org/abs/2312.06585.
- [42]Wei, Y., Xia, C. S., and Zhang, L. Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair. In ESEC/FSE, 2023. URL https://doi.org/10.1145/3611643.3616271.
- [43]Wei, Y., Duchenne, O., Copet, J., Carbonneaux, Q., Zhang, L., Fried, D., Synnaeve, G., Singh, R., and Wang, S. I. SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolution. In NeurIPS, 2025. URL https://papers.nips.cc/paper_files/paper/2025/hash/7107d4d2e837bde2171c671b5bde954-Abstract-Conference.html.arxiv.org/abs/2502.18449
- [44]Williams, R. J. Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning. Machine Learning, 1992. URL https://link.springer.com/article/10.1007/BF00992696.
- [45]Xia, C. S. and Zhang, L. Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPT. In ISSTA, 2024. URL https://2024.issta.org/details/iss-2024-papers/66/Automated-Program-Repair-via-Conversation-Fixing-162-out-of-337-Bugs-for-0-42-Each-.DOI
- [46]Xia, C. S., Deng, Y., Dunn, S., and Zhang, L. Demystifying LLM-Based Software Engineering Agents. Proceedings of the ACM on Software Engineering, 2025. URL https://conf.researchr.org/details/fse-2025/fse-2025-research-papers/855/Demystifying-LLM-based-Software-Engineering-Agents.DOI
- [47]Yan, J., Li, Y., Hu, Z., Wang, Z., Cui, G., Qu, X., Cheng, Y., and Zhang, Y. Learning to Reason under Off-Policy Guidance. In NeurIPS, 2025. URL https://papers.nips.cc/paper_files/paper/2025/hash/a9d5c33e38442450f9781bd7bad3c81e-Abstract-Conference.html.arxiv.org/abs/2504.14945
- [48]Yang, A., Li, A., Yang, B., Zhang, B., Hui, B., Zheng, B., Yu, B., Gao, C., et al. Qwen3 Technical Report. arXiv preprint arXiv:2505.09388, 2025. URL https://arxiv.org/abs/2505.09388.
- [50]Zelikman, E., Wu, Y., Mu, J., and Goodman, N. STaR: Bootstrapping Reasoning With Reasoning. In NeurIPS, 2022. URL https://papers.nips.cc/paper_files/paper/2022/hash/639a9a172c044fbb64175b5fad42e9a5-Abstract-Conference.html.arxiv.org/abs/2203.14465
- [51]Zhang, W., Xie, Y., Sun, Y., Chen, Y., Wang, G., Li, Y., Ding, B., and Zhou, J. On-Policy RL Meets Off-Policy Experts: Harmonizing Supervised Fine-Tuning and Reinforcement Learning via Dynamic Weighting. In ICLR, 2026. URL https://proceedings.iclr.cc/paper_files/paper/2026/hash/c44a04289beaf0a7d968a94066a1d696-Abstract-Conference.html.arxiv.org/abs/2508.11408
- [52]Zhang, X., Huang, Z., Li, Y., Ni, C., Chen, J., and Oymak, S. BREAD: Branched Rollouts from Expert Anchors Bridge SFT & RL for Reasoning. In NeurIPS, 2025. URL https://openreview.net/forum?id=NUDAn2vCe.




