Source-linked AI summary
Recursive Self-Improvement on a Budget: Scoring Code Edits Before They Run
Erfan Darzi, Sree Bhargavi Balija, Sheng He
TL;DR
A coding agent must choose a scaffold edit before it is evaluated, even though the chosen child can shape later proposals. The paper fits a frozen linear readout to parent steering rate and diff features; on held-out HumanEval+, GPT-4o’s returned node scores 87.0% versus 84.2% for parent-rate expansion, while Claude Sonnet 4.5 scores 86.6% versus 86.5% for Huxley–Gödel Machine selection.
Problem
A coding agent must rank proposed scaffold edits before evaluation because only one child is checked per keep step and that child can become a parent for later edits.
Source: §1 · p. 1Method
The method fits a linear score on the parent’s steering-split solve rate and eight diff coordinates, then uses it to rank edits before expansion.
Source: §2.1 · p. 3, §3 · p. 5Results
On held-out HumanEval+, GPT-4o’s returned node scores 87.0% versus 84.2% for parent-rate expansion, while Claude Sonnet 4.5 scores 86.6% versus 86.5% for Huxley–Gödel Machine selection.
Source: §5 · p. 7Takeaways & Limitations
The reported HumanEval+ comparisons show a pre-evaluation diff score can be useful in this setup, but its advantage is not uniform across the two generators.
Source: §1 · p. 1, §5 · p. 7The evidence covers Claude Sonnet 4.5 and GPT-4o on HumanEval+ and Polyglot, and immediate scores use automatic checkers that may later reject a kept lineage.
Source: §6 · p. 7, ETHICS STATEMENT · p. 7
Abstract
from arXiv · showhide
A coding agent that rewrites its own scaffold has to choose which proposed edit to expand before that edit has been evaluated, and the search then has to return one agent. Each run fits one linear readout on the parent's steering-split solve rate and eight coordinates of the proposed diff, from 96 scaffold edits labeled by four evaluations of a 16-instance fit split, and then freezes the coefficients. HumanEval+ reserves 48 instances as the steering split and Polyglot reserves 64. That split scores parents and keeps an archive of four nodes. Huxley-G\"odel Machine selection draws a parent by Thompson sampling on the steering counts of nodes that have already been evaluated, and it expands the child that parent proposes. Every method then returns the earliest evaluated node whose steering-split solve count is maximal. The tables report the held-out score of that node on the other 100 HumanEval+ instances and the other 145 Polyglot instances, next to the root scaffold and the calibration edit with the highest fit-split label. Twelve runs of GPT-4o return a node at 87.0% on held-out HumanEval+, against 84.2% for the parent-rate ablation. On that split Huxley-G\"odel Machine selection returns 85.1%, the root is at 81.2%, and the calibration-best edit is at 82.8%. On the same split Claude Sonnet 4.5 returns 86.6%, beside 86.5% for Huxley-G\"odel Machine selection, 85.3% for the parent-rate ablation, and 85.1% for the calibration-best edit.
1 INTRODUCTION
The paper addresses how a coding agent can rank proposed scaffold edits before evaluation, then compares returned nodes selected by a learned readout and existing baselines. The readout is highest on HumanEval+ with GPT-4o, while with Claude Sonnet 4.5 it sits alongside the alternatives.
1 INTRODUCTION
- The readout predicts a proposed diff’s score before expansion from the parent’s steering-split solve rate and eight diff coordinates.The selected child is evaluated and may become a parent for subsequent edits.Source: §1 · pp. 1–2
- On HumanEval+ with GPT-4o, the readout has the highest mean; with Claude Sonnet 4.5, it sits alongside Huxley–Gödel Machine selection, parent-rate expansion, and calibration best.Figure 1 plots held-out solve rates for the returned nodes across twelve runs.Source: Figure 1 · p. 2, §1 · p. 2
- Huxley–Gödel Machine selection uses Thompson sampling on evaluated nodes’ steering success and failure counts to choose which parent’s child to expand.Methods return the earliest evaluated node with the maximal steering-split solve count; the comparison also includes the root and calibration-best edit.Source: §1 · pp. 1–2
2 METHOD
The method fits a frozen linear readout to parent steering-split performance and projected diff features, then uses it to rank edits before evaluation. Its search and comparison rules use the steering split, while a separate birth-time law describes draws from evaluated-node counts.
2.1 BIRTH-TIME READOUT
- The readout is fit from 96 scaffold edits labeled by four evaluations on a 16-instance fit split, using parent steering rate and eight projected diff coordinates.Each run fits its own coefficients and holds them fixed through 24 keep steps.Source: §2.1 · pp. 2–3
- At each keep step, the readout scores eight proposals distributed across the archive; the archive retains four evaluated nodes with the highest steering-split solve rates.At the first step all proposals share the root’s parent rate, so diff-coordinate weights rank them; later, those weights can favor a proposal from a lower-rate parent.Source: §2.1 · p. 3, Figure 2 · p. 3
2.2 SEARCH LOOP
- In the search loop, each method evaluates one child per keep step, and the returned node is the earliest evaluated node with the maximal steering-split solve count.Huxley–Gödel Machine selection draws from evaluated-node steering counts, whereas the readout scores edits from parent rate and diff features.Source: §2.2 · p. 3, §2.1 · p. 3, Figure 3 · p. 4
2.3 BIRTH-TIME LAW
- A birth time is when a node’s clade has zero success and failure counts, even though its code-change feature may vary.Under the positive-scheduler assumption, the birth-time draw is Beta(τ, τ), independent of X, with mean 1/2.Source: §2.3 · p. 4
- For any nonnegative steering counts and τ > 0, the draw’s mean is (1 + ns)/(2 + ns + nf); at τ = 1, the birth-time draw is uniform on (0, 1).The ratio estimator ns/(ns + nf) is undefined when both counts are zero.Source: §2.3 · p. 4
3 EXPERIMENTS
The experiments compare a frozen, calibrated edit-ranking readout with parent-rate expansion and Huxley–Gödel Machine selection, scoring each method’s returned node on held-out instances. The readout leads the parent-rate ablation on held-out HumanEval+ and Polyglot for both generators.
3 EXPERIMENTS
- Each run fits and freezes its readout using 96 edits labeled on a 16-instance split, then searches under an equal checker-evaluation budget and returns the earliest node with a maximal steering-split solve count.The held-out splits contain 100 HumanEval+ instances and 145 Polyglot instances; each table cell aggregates twelve runs.Source: §3 · p. 5
- At keep step 1 on held-out Polyglot with Claude Sonnet 4.5, the readout-expanded child scores 60.1% versus 57.4% for the parent-rate ablation.The archive contains only the root at this step, so the proposals share one parent rate.Source: §3 · p. 5, Table 2 · p. 6
- 87.0% versus 84.2% on held-out HumanEval+ for GPT-4o’s readout and parent-rate node, respectively.Table 1 also reports 85.1% for Huxley–Gödel Machine selection, 82.8% for calibration best, and 81.2% for the root.Source: §3 · p. 6, Table 1 · p. 6
- 86.6% versus 85.3% on held-out HumanEval+ for Claude Sonnet 4.5’s readout and parent-rate node, respectively.Huxley–Gödel Machine selection returns 86.5%, and calibration best returns 85.1%.Source: §3 · p. 6, Table 1 · p. 6
- 65.2% versus 60.4% on held-out Polyglot for Claude Sonnet 4.5’s readout and parent-rate node; GPT-4o’s corresponding scores are 28.4% and 23.0%.Huxley–Gödel Machine selection returns 64.0% for Claude Sonnet 4.5 and 25.7% for GPT-4o.Source: §3 · p. 6, Table 1 · p. 6
4 RELATED WORK
Related work spans self-modifying agents and searches over agent designs, alongside methods that delay selecting rewrites until evaluation. The paper situates its approach among these lines of work.
4 RELATED WORK
- Prior work includes self-modifying agents such as STOP, ADAS, and SICA; searches over agent designs such as the Gödel Agent; and DGM and Huxley–Gödel Machine selection (Zelikman et al., 2023; Hu et al., 2024; Robeyns et al., 2025; Zhang et al., 2026; Wang et al., 2026).AIDE scores candidates after evaluation, while AIDE2 keeps a rewrite only after hidden evaluation (Jiang et al., 2025; Srikanth et al., 2026).Source: §4 · p. 6
5 CONCLUSION
The conclusion presents a readout that ranks scaffold diffs using parent performance and diff features, then evaluates the returned node. On held-out HumanEval+, the readout outperforms parent-rate expansion for both reported generators.
5 CONCLUSION
- The readout ranks scaffold diffs using the parent’s steering-split solve rate and eight diff coordinates; each method returns the earliest evaluated node with a maximal steering-split solve count.Source: §5 · p. 6
- 87.0% versus 84.2% for GPT-4o and 86.6% versus 85.3% for Claude Sonnet 4.5 on held-out HumanEval+, comparing the readout with parent-rate expansion.Huxley–Gödel Machine selection returns 85.1% for GPT-4o and 86.5% for Claude Sonnet 4.5 on the same split.Source: §5 · p. 7
6 LIMITATIONS
The reported setup uses a linear readout with fixed coefficients and a four-node archive across two generators and two benchmarks. Search lineages can still be rejected by the checker used to score them.
6 LIMITATIONS
- The readout is linear in eight projected diff coordinates, fit on 96 edits, and held fixed for 24 keep steps; the reported scope is two generators on HumanEval+ and Polyglot.The steering split used to keep the archive is disjoint from the held-out split.Source: §6 · p. 7
- The search can keep a lineage that the automatic checker later rejects, so checker scores do not guarantee later acceptance.Source: ETHICS STATEMENT · p. 7
A PROOFS
The appendix identifies the following argument as the proof of Theorem 1.
A PROOFS
- The argument in this appendix is the proof of Theorem 1.Source: A PROOFS · p. 8
A.1 PROOF OF THE BIRTH-TIME LAW
The proof derives the mean and variance of the birth-time Beta law from an integral identity. At birth time, the sampling law does not depend on the code-change feature.
A.1 PROOF OF THE BIRTH-TIME LAW
- α/(α + β) is the mean of the Beta law, derived from the ratio I(α + 1, β)/I(α, β).The proof establishes the integral ratio by integrating the derivative of ϕ over a truncated interval and taking the endpoint limit.Source: §A.1 · p. 8
- At zero success and failure counts, the mean is 1/2, and the second moment is α(α + 1)/((α + β)(α + β + 1)).Source: §A.1 · p. 9
- Var(U) = αβ/((α + β)^2(α + β + 1)); when α = β = τ, this becomes 1/(4(2τ + 1)).For τ = 1, the variance is 1/12.Source: §A.1 · p. 9
- At birth time, the sampling law is Beta(τ, τ) for every code-change feature value, while ρ(0, 0) is undefined.Source: §A.1 · p. 9
B EXPERIMENTAL DETAILS
The experiments use twelve runs per cell, with steering and held-out splits of fixed sizes for HumanEval+ and Polyglot. Reported accuracies pool returned-node solve counts across runs.
B EXPERIMENTAL DETAILS
- Twelve runs per cell compare Claude Sonnet 4.5 or GPT-4o; steering splits contain 48 HumanEval+ or 64 Polyglot instances, with the other 100 or 145 held out.The calibration-best row is the edit with the highest fit-split label, scored on the held-out split.Source: B EXPERIMENTAL DETAILS · p. 9
- Printed accuracy is the one-decimal rounding of pooled returned-node solve counts divided by twelve times the split size.The sample standard deviation is the ordinary standard deviation of the twelve run percentages.Source: B EXPERIMENTAL DETAILS · p. 9
- The readout and parent-rate ablation consider the root and 24 expanded children; Huxley–Gödel Machine selection considers the root and 144 Polyglot or 176 HumanEval+ children.Source: B EXPERIMENTAL DETAILS · p. 9
C PROMPTS AND REPRODUCTIONS
Both generators produce unified diffs of the scaffold at decoding temperature 1.0; diffs that fail to apply cleanly are discarded and redrawn.
C PROMPTS AND REPRODUCTIONS
- Generators are prompted to return a unified diff of a scaffold that writes a solution, runs unit tests, and retries once; non-applying diffs are redrawn.Both generators use decoding temperature 1.0.Source: C PROMPTS AND REPRODUCTIONS · p. 9