In lab tests, AI agents that foresee their own bugs improve faster

Picture an AI agent rewriting the program that drives its own work, hoping to do the job better. Each rewrite can introduce a bug, and every test of a failed version burns computing resources before anyone learns the change was a mistake. Researchers at the University of Virginia, Microsoft Research and Tsinghua University have built software that tries to anticipate the outcome of an edit before the modified program is ever run.
Their approach builds on HyperAgents, a framework in which two AI components work together: one performs tasks, the other modifies the code and instructions used by both. Earlier versions and their results are kept in an archive that informs later changes. The team added a new component, the Improvement Dynamics Model, which examines the proposed change, the agent being modified and past results, and predicts outcomes task by task. It separates wrong answers from unfinished attempts, a distinction that matters, because a wrong answer may call for better reasoning while an unfinished attempt may point to software that needs fixing. If the forecast, corrected for the forecaster's earlier bias, predicts worse performance than the current agent, the modifying component receives the warning and one more chance to revise. The revised agent is tested in every case. Only its software and instructions change; the underlying language model stays fixed.
In one example, an edit placed instructions outside quotation marks and broke the program. The modifying agent noticed the error but ran out of tool calls before fixing it. The forecaster predicted unfinished tasks, prompting another revision; after the quotation marks were corrected and the syntax checked, the agent completed 11 tasks. Across five runs of 40 improvement rounds per condition, the team reports that its approach developed stronger coding agents earlier than HyperAgents. On 166 programming tasks kept separate from improvement and selection, selected agents reached a median success rate of about 30%, against 22% for HyperAgents and 16% for their shared starting agent. The advantage held when the comparison used matching budgets of language model tokens, although that comparison did not measure total computing cost.
The forecaster also updates itself: every five rounds it proposes changes and checks its predictions against recorded outcomes before adopting them. In a transfer test, a forecaster built on paper-acceptance prediction and reward design for simulated robots was applied to mathematical grading, with fresh programs at the start. Across 100 unseen grading tasks, selected agents matched expert grades with a median accuracy of 55%, against 51% with a fresh forecaster and 47% for HyperAgents. These are benchmark figures from a preprint, and the authors are explicit that they do not show AI agents can replace human reviewers, graders or programmers.
For teams building agents that improve themselves, the practical promise is fewer wasted test runs on edits that were unlikely to work, and a way for agents to pick helpful changes more efficiently. Those gains have so far been measured on programming, paper-prediction and grading benchmarks. The paper gives no timeline for using the method in production systems, and it remains a research result to be reproduced on tasks beyond these.
Comments
Loading the thread…
Sign in to leave a comment. Sign in