ZetaEvolve: choose what to evolve next by its history, not by its score alone
In systems such as AlphaEvolve[1], a language model rewrites programs and an evaluator scores each new version. The search keeps the best versions and rewrites them again, building a tree of programs. With the model frozen, the search still has to decide which program to rewrite next. Existing rules use scores to choose the parent. MAP-Elites sampling draws parents at random from pools of high-scoring and diverse programs. PUCT, borrowed from game-tree search[2] and adapted to program search[3], favours programs whose children score well.
In our NeurIPS 2026 paper, we use a program’s history to make that choice. ZetaEvolve assigns each candidate a potential value based on what earlier rewrites produced and whether its lineage is still improving. With a frozen 8B model, ZetaEvolve beats MAP-Elites sampling and PUCT at the same budget. Given many inexpensive samples, it also keeps pace with systems built on GPT-5 and Gemini-3-Pro.
Colour means the same thing in every figure:
Labels followed by a small dot • and terms with a dotted underline carry a note. Hover over them, or tap. In Figs. 7 and 8, the titles and axes of the original plots also have notes. Sections 9 to 14 give the derivations and experimental details.
1. Rewrite, evaluate, keep, repeat
What does a self-evolving search decide at each step?
Our running example comes from a benchmark used by ThetaEvolve[4] and earlier work. The task is to pack 26 circles into a unit square and maximise the sum of their radii. Each node of the tree is a program that builds a packing, and its score is the sum of the radii. Every step runs the same loop (Fig. 1). With the model frozen, the search controls which nodes enter the next round of rewrites.
Tree. Each node shows a program and its score. An edge connects each rewrite to the program it came from.
Select. A selection rule picks the parents to rewrite: one here, 32 per step in the paper. Every node’s score is known. How much better its branch can still get is not.
Rewrite. The frozen language model reads the parent’s program and writes new versions of it: four here, sixteen per parent in the paper.
Evaluate. The evaluator runs each new program and scores the packing it returns. One child beats its parent B.
Keep. The best children join the tree under their parent (one here, two in the paper) and the rest are dropped. Then the loop starts again: 60 steps of 512 programs each.
2. Score-based rules keep feeding stalled branches
Where do current selection rules waste their budget?
Four candidates in this tree have different histories (Fig. 2). A and D have the highest scores, but A’s last seven rewrites produced nothing better and D’s line of descent has set no new best for six generations. Rewriting B just produced a better child, C. Following Fig. 1 of the paper, we illustrate how each rule chooses two candidates.
Histories. Red marks stagnation: the rewrites of A that brought nothing better, and the stretch of D’s lineage without a new best. B has just improved through C.
MAP-Elites. ThetaEvolve and similar systems draw parents at random from an elite pool and a diversity pool in fixed shares, such as 0.6 and 0.4. Any node can come up, stalled or not, so runs vary widely.
PUCT. PUCT ranks a node by its children’s scores plus an exploration bonus weighted by its own score. It returns to A, whose children score well without beating it, and it does not see that D’s lineage has stalled.
ZetaEvolve. ZetaEvolve reads the histories. It holds back A and D and spends the step on B and C, where an improvement has just happened.
3. A node is known only through its history
What can the search observe about a node?
We model the local search around each node as a partially observable Markov decision process (POMDP)[5]. The search observes a node’s history. Whether another rewrite can improve on its best child remains hidden. Fig. 3 replays the rewrite of B from Fig. 1 in these terms.
Hidden state. Whether B is worth rewriting depends on how far its program is from the best possible packing. That cannot be read off the code.
History. For B, the search knows the scores on the path from the root, B’s program and score, the children it has produced and statistics computed from them.
Action. To rewrite B, the model first describes what to try, then writes a program using that guidance. The evaluator scores the new program.
Update. The outcome joins B’s history: B now has a child C that beats it by 0.006. The search keeps track of this history, never of the hidden state.
Value. A history’s value is the future gain we expect from expanding that node. With the model frozen, the search can raise its expected return only by choosing which histories to expand.
4. Each failed rewrite should cut priority by the same factor
How fast should a stalled node lose priority?
Suppose a node is either still productive or exhausted, and that every rewrite of a productive node has a fixed probability of beating its best child so far. Then every failure multiplies the odds that the node is still productive by the same factor (Eq. 5 of the paper). Fig. 4 traces those odds alongside PUCT’s value term and ZetaEvolve’s priority through the same sequence of failures.
Two kinds. A productive node beats its best child with chance θ at each rewrite; an exhausted node never does. Before any rewrite, the odds are 9 to 1 that the node is productive.
Failures. After f failed rewrites, Bayes’ rule multiplies these odds by (1 − θ)f, here 0.9 per failure: a straight line on this logarithmic scale.
PUCT. PUCT’s value term is the average score of the children. If they keep scoring at the same level without beating the best, it does not fall, however many rewrites fail.
ZetaEvolve. At each failure, ZetaEvolve also multiplies priority by a constant factor. Its factor is 0.977 at step 30 with the paper’s ρ = 0.96.
5. Potential value: discount stagnation, reward gains
How does ZetaEvolve turn a history into a priority?
ZetaEvolve gives every candidate a potential value (Eq. 6 of the paper). It discounts the node’s score geometrically by two counts of stagnation: n, its own rewrites without a better child, and c, the generations of its lineage without a new best. A bonus rewards the largest gain any child has made over its parent. Fig. 5 works through the resulting priorities for the four candidates of Fig. 2 using the paper’s settings.
Score. Ranked by score alone, A and D would be rewritten next.
Own stalls. A has n = 6 rewrites without a better child. Its score is multiplied by ρ6/D = 0.869 and falls to 2.285.
Lineage stalls. D lies c = 5 generations into a lineage without a new best. Its score is multiplied by 0.890 and falls to 2.338.
Gains. B’s child beat it by 0.006, so B gains β × 0.006 = 0.009 and rises to 2.621. The bonus would fade if B stopped improving.
Rank. Sorted by potential value, B and C come first and are rewritten next; A and D drop to the bottom.
6. A frozen 8B model keeps pace with frontier systems
How does it compare with search systems built on GPT-5 and Gemini?
Tables 1 and 2 of the paper give results for ZetaEvolve using a frozen 8B model distilled from DeepSeek-R1[6]. For comparison, AdaEvolve[7] reports results for four search systems using GPT-5 or Gemini-3-Pro. These are OpenEvolve, GEPA[8], ShinkaEvolve[9] and AdaEvolve itself. Fig. 6 compares ZetaEvolve with the best of those eight runs on each task. Since the budgets differ widely, these are comparisons between whole systems. Section 7 isolates the selection rule.
Maths. On four mathematical tasks ZetaEvolve is level with the best frontier-model system on two, just behind on one, and ahead on signal processing.
Systems. ZetaEvolve has the highest reported average on each of the four systems tasks. The Prism score comes from a low-coverage, high-quality regime that the published metric rewards (Appendix F.8 of the paper).
Budgets. Each frontier-model run counted 100 accepted generations. ZetaEvolve generated 30,720 programs with a small open model on two GPUs.
7. Same model, same budget: the rule decides
Does the selection rule alone make the difference?
For a controlled test we keep the frozen 8B model and the budget. Zeta−+PUCT changes only how parents are chosen: it is ZetaEvolve with Eq. 6 replaced by vanilla PUCT. ThetaEvolve, which chooses by MAP-Elites sampling, is re-run under the same configuration. Fig. 7 walks through the convergence curves of Fig. 3 of the paper.
Circle packing. ZetaEvolve, the green curve, climbs first. It also ends with the best average, though all three finish close together.
Hadamard. On this maximal-determinant problem the two tree rules end close together, with ThetaEvolve clearly below.
Autocorrelation. For the third autocorrelation inequality, lower is better. The plot shows the reciprocal, so that higher is better in every panel.
All three. ZetaEvolve has the best average on all three tasks. Second place goes to Zeta−+PUCT on two of them and to ThetaEvolve on circle packing.
8. A tree neither too wide nor too deep
Where does each rule spend its budget?
Fig. 6 of the paper counts the programs at each depth of the final search tree, a picture of where each rule spent its budget. These runs use a smaller 1.5B model, ProRL-1.5B-v2, for 100 steps (Fig. 8).
ThetaEvolve. MAP-Elites sampling keeps every program it generates and spreads its effort across the tree. The tree is wide, with most programs at middle depths.
PUCT. Zeta−+PUCT pushes down a few lines. The tree is deep and thin, with long chains of rewrites.
ZetaEvolve. ZetaEvolve lies between the two: it goes deep where improvement continued, without PUCT’s long thin tail.
Stalled subtrees. In Fig. 5 of the paper we counted subtrees whose descendants barely improve on the root or never improve at all. We found 342 under Zeta−+PUCT, 57 under ZetaEvolve.
Self-evolving search is usually improved with better prompts, stronger models or reinforcement learning. Another option is to change where the search spends its existing budget. In the packing example, A and D still score well, yet the recent gain came from rewriting B. Using that history to discount stagnation and reward gains lets a frozen 8B model beat MAP-Elites sampling and PUCT at equal budget. With many inexpensive samples, it keeps pace with frontier-model systems.
The next sections formalise the decision problem behind the eight figures above, motivate the geometric discount and give the full algorithm for computing and using the potential value. They also detail the ablations, controls, predictive tests, budgets and evaluators. Equation, table and appendix numbers are those of the paper.
9. The node-centred POMDP
What exactly is the decision problem?
A POMDP is a tuple M = (S, A, O, T, Ω, r, γ) of latent states, actions and observations, a transition kernel T(s′ | s, a), an observation model Ω(o′ | s′, a), a reward r and a discount γ ∈ [0, 1). An agent that cannot see the state acts on its history ht = (o0, a0, …, at−1, ot), and values are defined on histories:
In self-evolving search, step t has a set Ut of expandable nodes, and each node u carries its own local process. Its latent state sut is the structural and logical gap between its program and the global optimum. Its observable history hut holds its program, context programs, their scores, its ancestor path and the outcomes of its expanded children. Expanding u is the action at = (zt, ot+1): guidance text, then a child program. The policy factorises and the history is updated with the outcome:
Generating the child completes the action and creates a node with a history of its own. The objective is the value of the histories the search chooses to expand, where dV is the distribution over expanded histories that the traversal induces:
With a frozen model, π is fixed and V(h) is a fixed function of the history, so all that is left to optimise is dV:
ZetaEvolve replaces V by the estimate V of Eq. 6 and expands the best histories, 32 per step, subject to sibling blocking (Section 11). We do not train a network to estimate V. Collecting training data would require expensive rollouts. The distribution of histories shifts as the search proceeds, and each rollout changes the history that produced it. We cannot revisit the same state to collect more training data.
10. Why the discount is geometric
What goes wrong with PUCT, and what does Bayes’ rule suggest instead?
PUCT[2] chooses the action that maximises a value estimate plus an exploration bonus:
Yuksekgonul et al.[3] adapt it to program search by taking the prior P from the score of a node’s program and the value Q from the scores of its direct children. This estimates the value of sampling a node once more, V(u), not the value of its whole history, V(hu). The paper names three mismatches with what self-evolution needs:
- Average instead of improvement. The search needs children better than any seen so far, not a high average. A node whose children keep scoring well without beating the best should lose priority; PUCT’s Q keeps it high.
- No lineage. A node on a branch that has not improved for many generations should be held back even if its own score is high. PUCT has no term for this.
- Sublinear decay. The exploration bonus decays sublinearly with visit count. This suits the task of estimating a fixed mean. In self-evolving search, we want to know whether another rewrite can improve on the best child seen so far.
To see how a failed rewrite changes the evidence, let Zu ∈ {0, 1} say whether node u is still productive, with prior Pr(Zu = 1) = q0. A productive node’s next child beats the best child so far, m⋆u, with probability θ. For an exhausted node, that probability is zero. After f failures in a row, Bayes’ rule gives
The posterior probability falls with f along a non-exponential curve. The odds fall geometrically. This leaves room for a few early failures while steadily reducing the odds that a repeatedly failing node is still productive. ZetaEvolve therefore models the value as V(hu) ∝ ρf, with 0 < ρ < 1 and f the accumulated evidence that the node has stopped paying off.
11. The potential value and the algorithm
How are the statistics defined, and how does one step run?
- r(u) > 0 is the score of u’s program.
- nu = max(0, nrawu − 1), where nrawu counts expansions of u without a strictly better direct child and returns to 0 when one appears.
- cu = max(0, crawu − 1), where a retained child v gets crawv = 0 if it improves the best score on its path and crawu + 1 otherwise.
- Δmax(u) = max{0, maxv∈Child(u) (r(v) − r(u))} is the largest improvement of a direct child over u, and 0 if there is none.
- N = t + 1 measures global progress in rollout steps.
The shifts by one leave the first revisit and the first stagnant generation unpenalised. The second term carries 2nu because it omits cu, so that both terms decay at a similar rate. The scale log(e + kN), after the log t of UCB[10] and logarithmic cooling in simulated annealing, reduces the penalty for a given count as the search progresses. A node left alone gradually regains priority, while one that keeps failing stays suppressed. We fixed β = 1.5, k = 0.1 and ρ = 0.96 before the main runs and used them across tasks. Four further mechanisms shape each step (Appendix A.1):
- Ranked batch selection. Candidates are sorted by V and B = 32 distinct parents are taken, each at most once per step, with M = 16 children each: 512 rollouts per step.
- Sibling blocking. Once a node is selected, its siblings are excluded for the rest of the step, so that near-identical subtrees are not expanded together.
- Top-K retention. Of a parent’s children in one step, only the best K = 2 enter the tree; a parent can gather children over several steps.
- Trajectory prompt. The model sees the parent’s program and score and up to L ancestors; L = 1 in the main runs.
One run of Algorithm 1 then reads:
- For t = 0, …, T − 1, set N = t + 1 and compute V(hut) for every candidate u ∈ Ut.
- Sort Ut by V and select the top B parents with sibling blocking.
- For each parent, sample M pairs (z, o) from the frozen model, evaluate each child and update the best score r⋆.
- Insert the top K children under their parent and update nraw, craw and Δmax.
- After T steps, return r⋆.
12. Which parts carry the gain
Does each part of Eq. 6, and of the search around it, earn its place?
We tested each component of Eq. 6 on circle packing with the DeepSeek API (Table 10, 100 calls). Each component helps. Removing the multiplicative discount on the score term costs the most.
| Variant | Circle packing ↑ |
|---|---|
| ZetaEvolve, full | 2.6282 ± 0.0026 |
| without the discount on the r(u) term | 2.5904 ± 0.0322 |
| without the Δmax term | 2.6205 ± 0.0053 |
| without cu in the first exponent | 2.6011 ± 0.0372 |
| PUCT-style sublinear decay on both terms | 2.6090 ± 0.0318 |
In Table 11 we tested simpler history-aware versions of PUCT on circle packing (DeepSeek-V4-Flash, 100 generations, three seeds, D = log(e + kN)). Neither reproduced ZetaEvolve’s gain. Adding a stagnation discount to the PUCT bonus lowered the mean score and made it far more variable across seeds than vanilla PUCT.
| Variant | Selection score | Circle packing ↑ |
|---|---|---|
| ZetaEvolve, full | Eq. 6 | 2.6341 ± 0.0026 |
| Vanilla PUCT | Q + UPUCT | 2.6278 ± 0.0073 |
| PUCT with expansion discount on Q | Q ρ2nu/D + UPUCT | 2.6269 ± 0.0123 |
| PUCT with stagnation discount on U | Q + UPUCT ρcu/D | 2.5545 ± 0.1370 |
To test the mechanisms around Eq. 6, we removed them one at a time (Table 4, third autocorrelation inequality, Distill-Qwen3-8B, 60 steps). Every removal raised the bound (lower is better). Removing top-2 retention had the largest effect.
| Variant | Autocorrelation ↓ |
|---|---|
| ZetaEvolve, full | 1.5134 ± 0.040 |
| without top-2 retention | 1.5334 ± 0.030 |
| without the trajectory prompt | 1.5272 ± 0.047 |
| without sibling blocking | 1.5309 ± 0.026 |
The settings were checked after the main runs. On the autocorrelation task with ProRL-1.5B-v2 (Table 5), results depend on both k and ρ: the best single cell is k = 0.10, ρ = 0.94 (1.666 ± 0.040), but ρ = 0.96 has the best mean over k (1.713) and, at k = 0.10, a much smaller spread than that cell (1.701 ± 0.003). On circle packing with DeepSeek-V4-Flash (Table 6), all six settings lie between 2.6305 and 2.6341. A longer textual history does not help (Table 12, Heilbronn triangles): L = 0, 1, 2 and 3 give 0.03178, 0.03253, 0.03140 and 0.02901.
13. History statistics predict future gains
Do the statistics forecast where improvement will still come from?
In Appendix F.7 we replayed 24 runs on circle packing, EPLB and Prism. For each expansion of a node u at step t, we measured how far its subtree eventually rose above the incumbent Mt, the best score before the expansion:
Fig. 9 tests whether the statistics rank those future gains correctly. We also split each run into thirds and asked whether the statistics could identify the subtrees that would eventually beat the incumbent.
Correlation. Global progress alone barely ranks future gains. The node’s score helps, and the two stagnation counts raise the correlation from 0.231 to 0.367.
By stage. Adding n and c improves the prediction in every third of the run, including the last, where only 7% of expansions still lead to a new best.
The statistics carry information beyond global progress at every stage. This supports reading a node’s observable history as evidence of its remaining potential; it does not show that Eq. 6 is the best way to combine that evidence.
14. Budgets, evaluators and limits
What should one keep in mind when reading the numbers?
Budgets. The comparison with frontier-model systems sets two very different regimes side by side (Table 9):
| Method | Backbone | Steps × per step | Generations | Compute |
|---|---|---|---|---|
| ZetaEvolve | Distill-Qwen3-8B | 60 × 512 | 30,720 | 2 × H100 |
| OpenEvolve, GEPA, ShinkaEvolve, AdaEvolve | GPT-5 or Gemini-3-Pro | 100 × 1 | 100 | not reported |
AdaEvolve may make auxiliary calls beyond its 100 accepted generations. In the controlled comparison of Section 7, ZetaEvolve and Zeta−+PUCT use 30,720 rollouts, while ThetaEvolve used 33,280 (65 × 512) for its reported result.
Matched backbones. With both systems using the same model and 100 iterations, ZetaEvolve has a higher mean score than AdaEvolve on five mathematical tasks with DeepSeek-V3 (Table 7). On circle packing, their scores are 2.6282 ± 0.0026 and 2.6191 ± 0.0004, respectively. ZetaEvolve also has a higher mean on EPLB and Prism with both DeepSeek-V4-Flash and Qwen3-Coder-Next (Table 8). The margin is modest on Prism with V4-Flash (26.80 ± 0.79 against 26.43 ± 0.28), where ZetaEvolve also ran in 1.03 hours against 3.49. These results cover the distilled-reasoning, API reasoning and coder models tested. Whether the gain extends to other model classes remains open.
Evaluators. Circle packing uses ThetaEvolve’s tolerant feasibility check (absolute tolerance 10−6, as in OpenEvolve), so its scores are not directly comparable with those under a strict check. The autocorrelation task uses ThetaEvolve’s corrected form of the constant C3, not comparable with AlphaEvolve’s values. On Prism, the published score is 1/mean(KVPR of successful instances) plus the success rate. ZetaEvolve’s best program reaches 39.20 on the first term with a success rate of 0.02. Under a stricter evaluator, it receives the same score as every other valid program. Of 2,991 retained programs, 164 (5.48%) score above 30, all with success rates between 0.02 and 0.04. The search repeatedly found programs that scored well under this metric despite succeeding on few instances.
Limits. ZetaEvolve primarily improves node selection. We also retain the top-scoring children from each expansion and include recent ancestors in the rewrite prompt, as described in Section 11. We use a frozen model without online reinforcement learning. Better prompts, mutation operators, evaluators and model adaptation remain complementary directions. A node’s remaining potential is unobserved, so we estimate it from hand-designed statistics. Other model classes, ways of representing search history and longer-context models remain to be tested.
References
- Novikov et al. AlphaEvolve: A coding agent for scientific and algorithmic discovery. 2025.
- Silver et al. Mastering the game of Go with deep neural networks and tree search. Nature 2016.
- Yuksekgonul et al. Learning to discover at test time. 2026.
- Wang et al. ThetaEvolve: Test-time learning on open problems. 2025.
- Kaelbling et al. Planning and acting in partially observable stochastic domains. Artificial Intelligence 1998.
- Guo et al. DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning. 2025.
- Cemri et al. AdaEvolve: Adaptive LLM driven zeroth-order optimization. 2026.
- Agrawal et al. GEPA: Reflective prompt evolution can outperform reinforcement learning. 2025.
- Lange et al. ShinkaEvolve: Towards open-ended and sample-efficient program evolution. 2025.
- Slivkins. Introduction to multi-armed bandits. Foundations and Trends in Machine Learning 2019.
Jiyang Shen, Xiaojing Zhang, Bochen Lyu and I wrote “ZetaEvolve: History-Conditioned Potential Value for Self-Evolving Search” for NeurIPS 2026. Figures 1–5 use invented histories and scores to illustrate the method. Figures 6 and 9 plot results from our paper’s tables. Figures 7 and 8 reproduce Figures 3 and 6 of the paper with interactive guides.