Coding agents pick best self-edits before running to improve performance
Recursive Self-Improvement on a Budget: Scoring Code Edits Before They Run
Artificial IntelligenceMachine Learning
Summary
Improving software by having a program rewrite its own code can be tricky because it is hard to know which changes will help before testing them. The authors developed a way for a coding agent to score proposed code edits using a simple model before actually running them. Their selection method helps choose better self-improvements faster, leading to higher accuracy on programming challenges. They tested their approach with advanced language models and showed improvements over simpler baselines.
What this means in practice
- •For software development teams: Automatically select the most promising code edits their AI assistants generate before testing, accelerating code quality improvements.
- •For ai service operators: Improve the efficiency of automated code generation services by prioritizing edits that are more likely to succeed without costly runs.$Commercial implications: Enables faster, cost-effective automated code improvements that can be packaged into AI code assistant products for software companies.
Authors
Erfan Darzi, Sree Bhargavi Balija, Sheng He
Abstract
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ödel 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ödel 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ödel Machine selection, 85.3% for the parent-rate ablation, and 85.1% for the calibration-best edit.