DuoDiscover: Code Optimization by Discovering What to Optimize and How to Evaluate
Abstract
Most discovery and optimization frameworks assume that candidate solutions can be evaluated cheaply over many iterations. In many real settings, however, a single true evaluation, such as a full benchmark or serving trace, can take hours, so a search can afford only a handful of true evaluations. When evaluation is the bottleneck, search must discover both promising targets to optimize and cheap ways to measure progress on them to find a solution. We present DuoDiscover, a search system that builds on this idea in three ways. First, each worker agent in a fleet of coding agents co-discovers a target and builds a cheap proxy evaluator for it, which we call a yardstick. The agent then hill-climbs the yardstick rather than the true evaluation. Second, because search can exploit any gap between a yardstick and the true objective, fidelity tests are introduced to continually check that each yardstick still ranks edits like the true objective and invalidate any that drift. Every gain is confirmed by the true evaluation before it is accepted. Third, the worker fleet is bottom-up, with no central decomposition of the problem. A lightweight orchestrator spawns and terminates agents, briefs running ones, and seeds new agents with others' confirmed work. We evaluate DuoDiscover on 2 repository-level benchmarks requiring multi-file edits and on 4 GPU and TPU kernel suites covering hundreds of kernels. On SWE-fficiency, it doubles the average speedup of human experts. On SOL-Exec, it ranks first on 121 of 235 kernels and in the top three on 212. In addition to those benchmarks, on the heavily optimized vLLM and SQLite engines, DuoDiscover achieves and gains over the base code, respectively. On a CPU microarchitecture design task with evaluations of up to 28 hours, DuoDiscover surpasses both AlphaEvolve and the best human design in 9 days, shorter search time, a big step toward autonomous chip design.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.