Paper summary

Self-Improvement via Fast Tree-search

Xinghong Fu1,*, Aravinth Kulanthaivelu2, and Yutaro Yamada2
1Massachusetts Institute of Technology; 2Sakana AI

Summary

Harness engineering has shown to be an effective way to realize self-improvement in coding agents. These coding agents, when given their own harness design as an engineering task, can iteratively improve their own implementation to create a loop of recursive self-improvement.

Comparison of ordinary task solving and harness self-improvement. In the lower row, coding-agent version n receives its own implementation and produces version n plus 1, which feeds the next iteration.
Ordinary SWE task solving (top) and the harness self-improvement loop in SIFT (bottom).

However, the improvement signal is often driven by expensive environment feedback. To measure the strength of the new harness usually involves evaluating the new harness on a full set of benchmark tasks, becoming prohibitively expensive and extremely time-consuming. How then can we search over the space of possible harness designs efficiently?

In this work, we introduce SIFT - Self-Improvement via Fast Tree-search. SIFT improves tree search efficiency from two directions: (1) with a disaggregated improvement-evaluation pipeline that allows self-improvement to run without being bottlenecked by evaluation signals, (2) cheap LLM-as-a-judge signals that guide the search process prioritizing the most promising nodes. Furthermore, the best discovered agents by SIFT show stronger generalization across tasks and LLMs, providing a method to perform tree-search-based self-improvement without overfitting to the specific set up.

1. Motivation

A self-improving coding agent alternates between two roles. A coding model solves downstream tasks using an agent harness, while a self-improvement model examines the harness and its failure traces and proposes an evolved child agent, which we can tend use in the next iteration of self-improvement. Recursing on this process generates an archive tree of agent versions in a continual process of expansion and evolution to discover stronger coding agent implementations.

Often, the bottleneck in this evolutionary process is evaluation. This process typically relies on evaluation across a full benchmark (think 500 task in SWE-bench) to provide a relatively reliable signal. Not only is this expensive and time-consuming, benchmark scores can also be extremely noisy, possibly also result in overfitting on the specific benchmark the harness was supposed to hill-climb on. To provide a generalizable and cheap signal to guide the expansion process without relying on full benchmark scores, SIFT uses a code review judge as an intermediate ranking signal before committing to a full evaluation.

Average resource use per step, as reported in the paper
ModuleModelCostCPU hours
Self-improvementgpt-5-mini$0.120.186
Pairwise judge callgpt-5.4$0.0440.0042
Polyglot-50 evaluationo3-mini$6.002.6

A judging round compares a new node against at most ten existing nodes. Even ten comparisons are substantially cheaper and faster than a 50-task evaluation.

2. Method

SIFT proceeds in the following stages. During the tree search process, we maintain a priority queue of nodes to evaluate next and a win-loss matrix between nodes i and j in the tree. We initialize the priority queue to contain just the root node.

  1. A self-improvement model modifies a selected parent agent and produces a new child.
  2. The judge compares the child against up to ten strong agents already in the archive.
  3. A regularized Bradley–Terry model converts the accumulated pairwise results into a global strength ranking.
  4. The child enters a priority queue for downstream evaluation.
  5. Expansion and evaluation continue asynchronously, so the search does not wait for each benchmark run.

The probability of selecting node i as the next parent is

P(i) ∝ exp ( −αrb(i) −βra(i) −ηlog (1+vi) ). P(i) \propto \exp\left(-\alpha r_b(i)-\beta r_a(i)-\eta\log(1+v_i)\right).

Here, rb is judge rank, ra is benchmark-accuracy rank, and v is the number of previous expansions from that node. The experiments use α = β = η = 1. The visit-count term encourages exploration; setting η = 0 reduces the o3-mini Polyglot result from 35.1% to 30.1%.

Bradley–Terry scores beside the corresponding pairwise win-loss matrix.
Animated SIFT tree search in which node 4 is sampled from the archive without leaving the evaluation queue, node 10 is produced and judged against archive nodes, Bradley-Terry scores are updated, and node 10 is archived and queued for benchmark evaluation. Final SIFT state with node 4 still in the evaluation queue and node 10 both archived as its child and appended to the queue for benchmark evaluation.
One SIFT iteration: sample node 4 from the archive, self-improve it into node 10, judge and rank the child, then archive it and queue it for asynchronous evaluation.

3. Polyglot results

Aider Polyglot contains 225 coding tasks across C++, Go, Rust, Java, JavaScript, and Python. During search, SIFT evaluates on a fixed 50-task subset. The complete 225-task benchmark is held out for final evaluation. Searches are limited to 30 expansion steps.

Polyglot-225 accuracy
MethodCoding modelJudgeAccuracy
Base agentQwen3-30BNone20.0%
SICAQwen3-30BNone25.1%
DGMQwen3-30BNone27.1%
HGMQwen3-30BNone30.5%
SIFTQwen3-30BQwen3-480B31.1%
SIFTQwen3-30Bgpt-5.432.0%
Base agento3-miniNone14.2%
DGMo3-miniNone30.7%
SIFTo3-miniNone29.8%
SIFTo3-minigpt-5.435.1%
SIFTo3-minigpt-5-mini31.6%

Qwen search

Over 30 steps, the best measured Polyglot-50 accuracy rises from 16% to 38%, and the average accuracy of the archive also increases. The best descendant scores 31.1% on the held-out full benchmark. This run costs $34.30, takes just 6.71 hours of wall-clock time, completing within 224 CPU hours, which is roughly one tenth of DGM’s CPU use, also exceeding the HGM result of 30.5% at 347 CPU hours.

Polyglot-50 accuracy and archive average across the Qwen SIFT search.
Qwen search progress over 30 expansion steps.

o3-mini search and repeatability

SIFT reaches 35.1% after 30 expansions, compared with DGM’s 30.7% after 80 nodes. The run finishes in under five hours, uses 42 CPU hours, and costs $150 in API credits. Three additional runs produce full-benchmark results between 32.0% and 35.6%.

Transfer across coding models

We run the best harnesses found with o3-mini and Qwen3-30B using gpt-5-mini and gpt-5.4-mini as the coding model. The modified harnesses consistently outperform the corresponding base harnesses. This suggests that at least some of the changes are improvements to agent design, rather than optimizations that only work for the model used during search.

Polyglot accuracy of the base and SIFT-improved o3-mini harness when used with o3-mini, gpt-5-mini, and gpt-5.4-mini.
(a) o3-mini to other LLMs
Polyglot accuracy of the base and SIFT-improved Qwen3-30B harness when used with Qwen3-30B, gpt-5-mini, and gpt-5.4-mini.
(b) Qwen3 transfer to other LLMs
Transfer between LLMs of the best Polyglot agents found by SIFT.

4. Judge analysis

How candidates are shown to the judge

The judge can receive either the sequence of patches or the resulting full source files. The ranking is compared with realized Polyglot accuracy across 50 non-root nodes. Full files provide a substantially stronger rank signal.

Judge-input ablation
InputPearson rSpearman ρCost per comparison
Diffs+0.14+0.40$0.0076
Diffs + swap-order+0.11+0.43$0.014
Full files+0.45+0.68$0.011
Full files + swap-order+0.37+0.67$0.021

SIFT therefore uses full-file comparisons without swap-ordering. Most of the improvement comes from giving the judge the final program context, rather than asking it to reconstruct behavior from a sequence of patches.

A qualitative example

In one search, node 17 had lower measured accuracy than several alternatives but the highest Bradley–Terry judge score. SIFT continued expanding it, producing node 25, which later reached 42% on Polyglot-50. The judge ranked the lineage 2 → 17 → 25 first or second before its final downstream performance was known.

Tree-search snapshot highlighting the judge-selected lineage from node 0 through nodes 2 and 17 to node 25. Node 17 has 32% accuracy and the highest judge score; node 25 later reaches 42% accuracy.
Node 17 is selected despite lower measured accuracy than node 5. Its descendant, node 25, later reaches the best accuracy in the search.

Where the speedup comes from

The asynchronous pipeline accounts for most of the time reduction. Judge-guided speculative expansion provides an additional gain by allowing promising nodes to be expanded before their full evaluations finish.

Mean best accuracy across five runs plotted against wall-clock time for SIFT, SIFT without speculative expansion, and SIFT without disaggregation.
Speedups in SIFT, averaged across five runs.

5. Terminal-Bench 2.1

Terminal-Bench 2.1 contains 87 heterogeneous, long-horizon tasks executed and graded in task-specific containers. The coding model is gpt-5-mini, the diagnosis and self-improvement model is gpt-5, and the pairwise judge is gpt-5.4-high. Search evaluations use a fixed 50-task subset and cap each agent at the smaller of the task timeout or 30 minutes.

One judge-guided search and one no-judge search are initialized from the same 14/50 agent and capped at 30 expansions. Three agents are then selected: the judge’s top node, the highest-scoring node within the judged search, and the highest-scoring node from the no-judge search. Each is evaluated three times on the full 87-task set.

Terminal-Bench selection comparison
SettingSelectionSearch scoreFull-set meanFull-set runs
Initial agentStarting point14/5026.0/87 (29.9%)27, 25, 26
SIFTJudge rank 1 (node 19)18/5032.7/87 (37.5%)32, 30, 36
SIFTAccuracy rank 1 (node 11)19/5025.0/87 (28.7%)23, 27, 25
No judgeAccuracy rank 1 (node 18)19/5026.0/87 (29.9%)24, 26, 28

The judge-selected node scores slightly worse on the search subset than the accuracy-selected nodes, but performs substantially better under repeated full-set evaluation. Across all 20 fully evaluated candidates from the judged search, mean full-set performance rises monotonically by judge-rank group, from 20.2/87 for ranks 16–20 to 28.7/87 for ranks 1–5. The node-level Spearman correlation between judge rank and full-set score is 0.72.

Terminal-Bench full-set performance by judge-rank group and node-level judge rank.
Terminal-Bench judge ranking versus full-set performance.

What the judge identified

Node 11 added a local verifier, but the verifier was controlled by an environment flag that defaulted to off. Its bash tool also started a fresh interactive shell on every call while claiming to maintain persistent state. The judge identified both problems from the implementation. It preferred node 19, whose changes were active on the execution path: a persistent shell, explicit timeouts, process-group cleanup, output truncation, and a bounded number of validation passes. Node 19 solves seven more tasks on average than node 11 in the repeated full-set runs.

The 50-task search scores and 87-task reruns use different task sets and should not be pooled. The initial agent’s full-set scores were collected earlier under a more generous time budget, so they are a reference band rather than a matched experimental arm.

6. Limitations and safety

Future directions include dynamically deciding which nodes deserve full evaluation, pruning consistently dominated nodes, using judges that can run lightweight targeted probes, and jointly modeling task difficulty so that evaluation compute is spent on the most informative tasks.