Hill Sampling for Test-Time Scaling: A Simpler, Superior Alternative to Repeated Sampling, Evolution, and Training

arXiv cs.LG 论文

摘要

Hill Sampling is a simple test-time scaling method that uses frozen LLMs to iteratively sample and edit the best-verified program, achieving state-of-the-art results on algorithmic problems like circle packing and Erdős' minimum-overlap problem.

arXiv:2609.25510v1 Announce Type: new Abstract: Large language models (LLMs) can improve solutions to verifiable scientific and algorithmic problems by spending additional computation at test time. Recent systems achieve strong results with increasingly elaborate evolutionary search harnesses or by updating model parameters during test-time training. We ask how much of this machinery is necessary. We introduce Hill Sampling, a simple procedure that repeatedly samples candidate program edits from a frozen LLM, retains the best program found so far, and conditions all subsequent samples on that program. We evaluate the method on circle packing, sums/differences of sets, and Erdos' minimum-overlap problem using three open-weight models. Hill Sampling sets a new state of the art on circle packing among published methods, improves over the AlphaEvolve reference on Erdos' minimum-overlap problem, and achieves strong results on sums and differences of finite sets. The circle-packing and Erdos results require only hours of wall-clock time on eight NVIDIA H100 GPUs. To our knowledge, we also conduct, the largest study, by parameter count, of evolution strategies (ES) applied directly to LLM weights at test time. Surprisingly, learning the weights is worse than setting the ES learning rate to zero: at zero learning rate, the method is still searching in weight space through fixed random perturbations. Those perturbations can help exploration, but randomness from token sampling is stronger still, and repeated sampling remains substantially weaker than Hill Sampling. These results suggest a simple test-time compute allocation strategy: repeatedly sample edits to the best verified solution found so far, before introducing additional complexity such as adding archives, diversity mechanisms, evolutionary scaffolds, or test-time parameter learning.
查看原文
查看缓存全文

缓存时间: 2026/09/23 09:31

# Hill Sampling for Test-Time Scaling:A Simple and Better Alternative toRepeated Sampling, Evolution, and Training
Source: [https://arxiv.org/html/2609.25510](https://arxiv.org/html/2609.25510)
###### Abstract

Large language models \(LLMs\) can improve solutions to verifiable scientific and algorithmic problems by spending additional computation at test time\. Recent systems achieve strong results with increasingly elaborate evolutionary search harnesses or by updating model parameters during test\-time training\. We ask how much of this machinery is necessary\. We introduce*Hill Sampling*, a simple procedure that repeatedly samples candidate program edits from a frozen LLM, retains the best program found so far, and conditions all subsequent samples on that program\. We evaluate the method on circle packing, sums/differences of sets, and Erdős’ minimum\-overlap problem using three open\-weight models\. Hill Sampling sets a new state of the art on circle packing among published methods, improves over the AlphaEvolve reference on Erdős’ minimum\-overlap problem, and achieves strong results on sums and differences of finite sets\. The circle\-packing and Erdős results require only hours of wall\-clock time on eight NVIDIA H100 GPUs\. To our knowledge, we also conduct, the largest study, by parameter count, of evolution strategies \(ES\) applied directly to LLM weights at test time\. Surprisingly, learning the weights is worse than setting the ES learning rate to zero: at zero learning rate, the method is still searching in weight space through fixed random perturbations\. Those perturbations can help exploration, but randomness from token sampling is stronger still, and repeated sampling remains substantially weaker than Hill Sampling\. These results suggest a simple test\-time compute allocation strategy: repeatedly sample edits to the best verified solution found so far, before introducing additional complexity such as adding archives, diversity mechanisms, evolutionary scaffolds, or test\-time parameter learning\.

## 1Introduction

Large language models \(LLMs\) are increasingly used to spend additional computation at test time: rather than producing one answer, a model can generate many candidate programs, evaluate them with an executable verifier, and use the resulting feedback to improve a solution\. Recent systems have used this paradigm for mathematical and algorithmic discovery, including FunSearch\([Romera\-Paredes et al\., 2024](https://arxiv.org/html/2609.25510#bib.bib1)\), AlphaEvolve\([Novikov et al\., 2025](https://arxiv.org/html/2609.25510#bib.bib2)\), and ShinkaEvolve\([Lange et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib12)\)\. Other work couples discovery with test\-time training or adaptation of the model itself\([Šurina et al\., 2025](https://arxiv.org/html/2609.25510#bib.bib7);[Yuksekgonul et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib15)\)\.

A natural question is how much machinery is actually necessary to obtain strong discovery results\. We study this question by starting from repeated sampling, then adding only one persistent state: the best verified program found so far\. We call the resulting procedure*Hill Sampling*\. At every round, a frozen LLM proposes edits to the incumbent program; if a candidate is better, it becomes the new incumbent, and subsequent completions are conditioned on it\. There is no archive, crossover, parameter update, or explicit diversity objective\. Our goal is not to establish the best sample efficiency in terms of evaluations or LLM completions; instead, we ask how far the simplest implementation can go toward strong or state\-of\-the\-art algorithmic discovery with a practical wall\-clock budget\.

We evaluate Hill Sampling on three verifiable mathematical optimization problems using three open\-weight models: circle packing withgpt\-oss\-20b, sums and differences of finite sets withOLMo\-3\.1\-32B\-Instruct, and Erdős’ minimum\-overlap problem withMistral\-Small\-3\.1\-24B\-Instruct\. On circle packing, Hill Sampling sets a new state\-of\-the\-art result among published methods in under five hours on eight NVIDIA H100 GPUs\. On Erdős, it improves on the AlphaEvolve algorithmic\-discovery reference in 12 hours\.

The simplicity of Hill Sampling also lets us ask a complementary question raised by recent work on the geometry of pretrained weight spaces\.[Gan and Isola \(2026\)](https://arxiv.org/html/2609.25510#bib.bib18)argue that useful task\-specific experts can be found densely around the weights of sufficiently large pretrained models, motivating random perturbation of model weights and selection or ensembling\. We therefore test whether similar exploration via model noise can help*verifiable program discovery*, where candidate solutions can be evaluated exactly\. We implement what is, to our knowledge, the largest\-scale study by parameter count of evolution strategies \(ES\) applied directly to LLM weights in this setting\. Additionally, we implement a model\-noise variant by setting the learning rate of ES to zero\.

The resulting progression is informative\. ES learning often improves mean return while reducing the maximum return\. Setting the ES learning rate to zero removes the learning step but still searches via random weight perturbations\. Those perturbations can improve exploration, but ordinary token\-sampling randomness from the unperturbed model is stronger still\. Repeated sampling, in turn, is substantially improved by conditioning on the best program found so far\. That is, Hill Sampling outperforms all other methods\.

Our contributions are:

- •We introduce and evaluate Hill Sampling, a minimal best\-so\-far conditioned sampling procedure for test\-time program discovery, and show that it reaches state\-of\-the\-art algorithmic\-discovery performance on one problem and strong results on the other two with practical wall\-clock cost\.
- •We establish the largest ES training pipeline to date, and demonstrate that setting the learning rate to zero can actually improve maximum return over the course of training, even when using mechanisms to prevent entropy collapse\.
- •We show that token\-level sampling is a stronger source of useful diversity than random model perturbations in our verifiable discovery setting\.
- •We evaluate a broad range of mechanisms to encourage diversity, enable combinations of solutions, add exploration, and provide code execution results, and show them all to be unnecessary\.

## 2Related Work

#### LLM\-guided program evolution\.

FunSearch established a general recipe for pairing LLM\-generated program mutations with executable evaluation and retaining high\-scoring programs\([Romera\-Paredes et al\., 2024](https://arxiv.org/html/2609.25510#bib.bib1)\)\. While an early approach, FunSearch already included complex components, such as sub\-populations in islands to maintain diversity, sampling candidates relative to evaluation performance, and multiple prior solutions given in context for the purpose of recombination\. AlphaEvolve scales this pattern and reports strong results on mathematical and systems problems\([Novikov et al\., 2025](https://arxiv.org/html/2609.25510#bib.bib2)\)\. ShinkaEvolve focuses on sample efficiency, using complex parent selection, prompting with multiple parents, sub\-populations, novelty rejection, and other mechanisms to reduce the number of samples needed for good discoveries\([Lange et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib12)\)\. Recent work has continued to develop sophisticated frameworks for LLM\-guided evolutionary and scientific discovery\([Zheng et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib20);[Assumpção et al\., 2025](https://arxiv.org/html/2609.25510#bib.bib21);[Yan et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib22);[Jiang et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib23);[Liu et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib24);[Ye et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib25);[Wang et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib5)\)\. Our objective is different: we deliberately favor the simplest implementation that reaches strong or state\-of\-the\-art discovery performance at a reasonable wall\-clock cost rather than optimizing sample efficiency\.

#### Simple discovery baselines\.

The concurrent work of[Gideoni et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib13)compares code evolution with repeated sampling, where the model is asked to solve the program from scratch many times, and sequential conditioned sampling, where each generation conditions randomly on prior solutions that executed successfully, with optional resets and phased evaluation\. They find simple methods to be competitive, but their simple baselines do not consistently surpass both AlphaEvolve and ShinkaEvolve on any of the domains they evaluated, and are worse on the three domains we evaluate\. They also report that domain knowledge can materially affect search, including on circle packing\. Our experiments qualify this picture: on circle packing, removing the initial domain\-specific prompt and code does not affect our results, whereas on Erdős it does reduce performance\.

[Gupta et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib14)study many discovery harnesses and conclude that there is no universally best fixed harness\. They find useful behavior from some components, while other mechanisms are not consistently beneficial\. Therefore, they advocate for a complex adaptive allocation across harnesses\. Additionally, they do not ever match or exceed the scores from AlphaEvolve\. In contrast, our proposed method is simpler and does achieve competitive performance\.

#### Test\-time training and objective mismatch\.

EvoTune continuously refines the LLM with reinforcement\-learning updates from solutions produced by evolutionary search\([Šurina et al\., 2025](https://arxiv.org/html/2609.25510#bib.bib7)\), while TTT\-Discover adapts the language model during inference using experience generated from search\([Yuksekgonul et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib15)\)\. These approaches make test\-time training part of the discovery loop, whereas Hill Sampling keeps the model fixed and changes only the program state\. We compare to the addition of learning, even in conjunction with Hill Sampling, and find it to be an unnecessary complication\.

For repeated generation, conventional reinforcement learning optimizes expected reward, which in the binary case corresponds to pass@1 and can favor safe, homogeneous outputs over the diversity needed for strong pass@kk\. Pass@K Policy Optimization \(PKPO\) instead directly optimizes a joint objective overkkresponses and derives unbiased, lower\-variance estimators by drawing a larger batch ofn≥kn\\geq kresponses and averaging over its size\-kksubsets\([Walder and Karkhanis, 2025](https://arxiv.org/html/2609.25510#bib.bib19)\)\. Our ES \(max@8\) baseline targets the same maximum\-over\-kkobjective, but deliberately uses the simpler maximum of eight responses per perturbed model rather than PKPO’s larger\-batch combinatorial estimator\. The latter would spend more of our fixed generation budget on each perturbed model and therefore reduce the number of independent weight perturbations we can evaluate\. Thus max@8 tests whether aligning the ES objective with discovery is beneficial, without importing the additional estimator complexity of PKPO\.

#### Weight\-space search and Neural Thickets\.

Evolution strategies \(ES\) provide a gradient\-free, highly parallelizable way to optimize neural\-network parameters from scalar rewards\([Salimans et al\., 2017](https://arxiv.org/html/2609.25510#bib.bib17);[Qiu et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib16)\)\. We instantiate the largest full\-parameter adaptation using ES to our knowledge to date, adapting 20\-billion\-parameter to 30\-billion\-parameter models\. While we are able to train these models to improve mean return, with a steady learning curve, the max performance does not improve, and is worse than setting the learning rate to zero, which simply adds model noise\.

Relatedly, Neural Thickets argues that, for sufficiently large pretrained models, diverse task\-specialized experts can occupy a dense neighborhood around the pretrained weights, motivating random weight\-space search and selection\([Gan and Isola, 2026](https://arxiv.org/html/2609.25510#bib.bib18)\)\. That work evaluates this phenomenon through downstream\-task performance and ensembling, where generalization to a target task is central\. We ask a different question: whether weight\-space perturbations are useful when the model responses can be evaluated exactly, with no generalization needed\. Our results show that, in these settings, token\-level sampling in program space is more effective than either learned or fixed random weight perturbations\. Moreover, both of these are outperformed by Hill Sampling\.

## 3Methods

### 3\.1Problem setting

We consider optimization problems with an executable verifier\. A statexxis a program, and executing it produces a scalar rewardrr, which may be stochastic because the program itself can contain randomness\. An LLM defines a distribution over edited solutionsy∼pθ\(⋅∣x;T\)y\\sim p\_\{\\theta\}\(\\cdot\\mid x;T\)at decoding temperatureTT\. The objective of test\-time discovery is the maximum observed verified reward found within a fixed number of LLM edits \(MM\),

r∗=maxi≤M⁡ri\.r^\{\*\}=\\max\_\{i\\leq M\}r\_\{i\}\.\(1\)This objective differs from improving the average quality of samples: an update can increase expected reward while reducing the probability of a rare, exceptionally good discovery\.

### 3\.2Hill Sampling

Letx0x\_\{0\}be the initial program,xtx\_\{t\}be the current program, called theincumbent, andrt∗r^\{\*\}\_\{t\}be the best reward observed so far at roundtt\. Each round, Hill Sampling drawsNNedits independently from the current incumbent,

yt,1,…,yt,N∼pθ\(⋅∣xt;T\),y\_\{t,1\},\\ldots,y\_\{t,N\}\\sim p\_\{\\theta\}\(\\cdot\\mid x\_\{t\};T\),\(2\)and executes each candidate once to obtain rewardsrt,1,…,rt,Nr\_\{t,1\},\\ldots,r\_\{t,N\}\. The incumbentxtx\_\{t\}is not re\-evaluated; its previously observed rewardrt∗r^\{\*\}\_\{t\}is retained\. Leti∗=arg⁡maxi⁡rt,ii^\{\*\}=\\arg\\max\_\{i\}r\_\{t,i\}index the best edit this round\. We then set

\(xt\+1,rt\+1∗\)=\{\(yt,i∗,rt,i∗\)if​rt,i∗≥rt∗,\(xt,rt∗\)otherwise\.\(x\_\{t\+1\},r^\{\*\}\_\{t\+1\}\)=\\begin\{cases\}\(y\_\{t,i^\{\*\}\},r\_\{t,i^\{\*\}\}\)&\\text\{if \}r\_\{t,i^\{\*\}\}\\geq r^\{\*\}\_\{t\},\\\\ \(x\_\{t\},r^\{\*\}\_\{t\}\)&\\text\{otherwise\}\.\\end\{cases\}\(3\)Thusrt\+1∗≥rt∗r^\{\*\}\_\{t\+1\}\\geq r^\{\*\}\_\{t\}by construction, even when executing the same program can produce different rewards, and every accepted improvement immediately becomes the context for subsequent responses\. We accept new incumbents with equal reward to promote potential diversity\. There is no archive, diversity objective, crossover, or parameter update; the only persistent search state is the incumbent programxtx\_\{t\}and its stored best observed rewardrt∗r^\{\*\}\_\{t\}\. This makes Hill Sampling a simple evolutionary algorithm whose knobs are simply the temperature, the number of rounds, and the number of samples drawn each round\.

#### Hill Sampling \(HS\) 64 and 512\.

Hill Sampling \(N=64N=64\) evaluates 64 edits per round, while Hill Sampling \(N=512N=512\) evaluates 512\. Both use the same total sampling budget: Hill Sampling \(64\) runs for the specified number of rounds, while Hill Sampling \(512\) runs for eight times fewer rounds, trading more frequent incumbent updates for greater parallelizability\. For both, we instantiate eight vLLM instances, one per H100 GPU\. ForN=64N=64, each instance generates one response at a time until 64 responses are collected; forN=512N=512, we generate 64 batches of eight responses\. To ensure sampling is invariant to batching, we set the respective vLLM environment variable \(VLLM\_BATCH\_INVARIANT\) and manually assign a unique seed to every response, incrementing seeds globally across batches and responses in the batch\.

## 4Experimental Setup

### 4\.1Domains

We study three verifiable mathematical optimization domains used in recent LLM discovery work[Novikov et al\. \(2025\)](https://arxiv.org/html/2609.25510#bib.bib2);[Lange et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib12);[Yuksekgonul et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib15), using the open\-source implementation from[Sharma \(2025\)](https://arxiv.org/html/2609.25510#bib.bib11)\. We measure results over three seeds per method, on each domain, and tune over multiple temperatures\. We arbitrarily divide our three models across the three domains, rather than evaluating each model on each domain, to enable reasonable computational constraints\. See appendix[A](https://arxiv.org/html/2609.25510#A1)for formal definitions, and appendix[C](https://arxiv.org/html/2609.25510#A3)for hyperparameter details\. We additionally strengthen the validation functions by adding value and type checks to prevent observed reward hacking, with details in appendix[D](https://arxiv.org/html/2609.25510#A4)\. All compute is matched by the number of LLM completions\.

Note that runs are sensitive to both the total number of rounds and execution timeout\. We fixed the total number of rounds \(and therefore LLM completions\) in early experiments in order to give the mean return of the Evolution Strategy method time to begin to plateau, which also resulted in significant diversity in the total runtimes between domains\. We find that increasing the code\-execution timeout also can improve performance, with a particularly large improvement when increasing it from 5 to 20 seconds\. Even at a 20\-second timeout, wall\-clock time remains primarily bottlenecked by LLM generation rather than evaluation\. However, because of the volume of experiments, we use a 5\-second execution timeout by default\. Code that passes this first evaluation is then re\-evaluated with a 10\-second timeout\. We later find that evaluating each program only once does not significantly affect performance\.

Circle packing\(Circles\) asks for 26 non\-overlapping circles contained in the unit square, with the objective of maximizing the sum of their radii\. For the standard circle\-packing setting, the initial prompt and code come from phase two of a phased prompt schedule[Sharma \(2025\)](https://arxiv.org/html/2609.25510#bib.bib11)\. Ourno initial information \(NI\)variant removes this initial prompt and code, providing only the function signature and evaluation code as context\. The circles task usesopenai/gpt\-oss\-20b, for 200 rounds \(for N=64\)\.

Sums and differences of finite sets\(Sets\) concerns the largest exponentC6C\_\{6\}governing how large a difference setA−BA\-Bcan be relative to a controlled sumsetA\+BA\+B\. Following the computational formulation used in prior discovery work, programs construct a finite setUUof non\-negative integers to maximize a given quantity\. The sets task usesOLMo\-3\.1\-32B\-Instruct, for 600 rounds \(for N=64\)\.

Erdős’ minimum\-overlap problem\(Erdos\) asks for the smallest achievable worst\-case overlap between a function and its complement, equivalently yielding an upper bound on the constantC5C\_\{5\}\. Theno initial information \(NI\)variant removes the initial solution code and retains only the function signature and evaluation code as context\. The Erdos task usesMistral\-Small\-3\.1\-24B\-Instruct\-2503, for 80 rounds \(for N=64\)\.

### 4\.2Baselines

We compare Hill Sampling against other methods that use test\-time compute\.Repeated Sampling \(RS\)repeatedly draws candidate programs from a frozen model as edits to the original code, without carrying the best program forward as the next editing state\.Model Noise \(MN\)evaluates 64 perturbed models,θi=θ\+σ​ϵi\\theta\_\{i\}=\\theta\+\\sigma\\epsilon\_\{i\}, where we independently sampleϵi∼𝒩⁡\(0,I\)\\epsilon\_\{i\}\\sim\\mathcal\{N\}\(0,I\)fori=1,…,32i=1,\\ldots,32and setϵi\+32=−ϵi\\epsilon\_\{i\+32\}=\-\\epsilon\_\{i\}, as in antithetic sampling\. MN \(64\) evaluates one generation per model, while MN \(512\) evaluates 8 responses per model\.Evolution Strategies \(ES\)evaluates the same antithetic population and updates the underlying model using the scalable ES estimator of[Salimans et al\. \(2017\)](https://arxiv.org/html/2609.25510#bib.bib17),θ←θ\+α32​σ​∑i=132R~i​ϵi\\theta\\leftarrow\\theta\+\\frac\{\\alpha\}\{32\\sigma\}\\sum\_\{i=1\}^\{32\}\\tilde\{R\}\_\{i\}\\epsilon\_\{i\}, whereα\\alphais the learning rate andR~\\tilde\{R\}denotes standardized antithetic reward\. As in[Qiu et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib16), we store only the random seed and reward, reproducing the noise vector each time from the random seed, to save space, and undo each perturbation by subtracting it, rather than re\-loading the model from disk\. \(While this does cause rounding errors, we find it to be faster and perform similarly\.\)ES \(max@8\)evaluates eight responses from each perturbed model and assigns that perturbation their maximum reward, targeting the same set\-level maximum objective as in[Walder and Karkhanis \(2025\)](https://arxiv.org/html/2609.25510#bib.bib19)\.ES \(softmax\)replaces standardized scalar weighting with a softmax over population rewards, increasing emphasis on the best perturbations, as in[Yuksekgonul et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib15)\.Hill Sampling \+ ESuses Hill Sampling in conjunction with ES \(max@8\) updates on the model\.

For the Sets task, we use only the baselines that are batched, due to computational limitations:RS, ES \(max@8\), Hill Sampling \(512\) \+ ES\. For the broader Erdos evaluation, we compare additional methods described in that section\. Additional details are in Appendix[F](https://arxiv.org/html/2609.25510#A6)\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/circles_main.png)\(a\)Circle packing\.
![Refer to caption](https://arxiv.org/html/2609.25510v1/sets_main.png)\(b\)Sums and differences of sets\.
![Refer to caption](https://arxiv.org/html/2609.25510v1/erdos_main.png)\(c\)Erdős minimum overlap\.

Figure 1:Main results\.Results are shown using scores normalized to AlphaEvolve\. Error bars, as in all subsequent plots, show standard error\. On Circles, only variants of Hill Sampling achieve top performance, with ES performing the worst\. Both Hill Sampling \(512\) and its NI variant with no initial information have a seed that achieves the top score\. On Sets, there is no significant difference between the methods, with all methods having a seed that achieves the same top score, and ES performing the worst on average\. On Erdos, Hill Sampling \(512\) and Hill Sampling \(512\) \+ ES perform best\. RS achieves a high average max return, with no single seed performing as well as Hill Sampling \(512\)\. Here, all ES variants underperform, and our NI variant is the worst, indicating a need for domain knowledge\.

## 5Results

Table 1:Best\-result summary\.We report the best scores achieved by Hill Sampling \(512\) compared to existing work\. The best result is inbold, and the second best isunderlined\. Hill Sampling sets a new state\-of\-the\-art on the Circles task, among published methods, in under five hours, and beats AlphaEvolve on Erdos\. Time and round of discovery are reported\. The Circles result used a single 100s timeout, Sets used two 5s timeouts, and Erdos used two 20s timeouts\. The number of LLM completions can be computed as 512 times the number of rounds\. Normalized scores are reported as fraction of AlphaEvolve’s score, or the reciprocal, such that higher is better\.Figure[1](https://arxiv.org/html/2609.25510#S4.F1)summarizes the primary comparisons\. Hill Sampling is the strongest method on circle packing, including without the initial domain\-specific information, where it reaches the same best score as the informed setting\. This is surprising, given that the default Circles problem presents the most domain specific information\. On Erdos, Hill Sampling is also the strongest method, while adding ES does not improve it and removing the initial information substantially hurts performance\. On the Set problem, all methods perform similarly\.

Table[1](https://arxiv.org/html/2609.25510#S5.T1)summarizes the best results achieved\. In under five hours, Hill Sampling sets a new state of the art on circle packing, among published methods, evaluated without slack111AlphaEvolve reports scores without any slack \(i\.e\., overlapping space\) allowed between circles\. We follow this convention for a fair comparison\. Some existing work\([Lange et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib12)\)evolves with slack in overlap and then removes it\. We followed that procedure for all other experiments in the paper\. However, doing so generally resulted in a lower score of 2\.6359830848923913 after removing10−1210^\{\-12\}from the radii, as the lowest integer power of 10 that still passes the verifier\. We report the result from ThetaEvolve\([Wang et al\., 2026](https://arxiv.org/html/2609.25510#bib.bib5)\)in the table, as the best zero\-slack result published in a prior paper\. Two concurrent web results have surfaced with undocumented methods during writing that claim better results: Hyra\([Lin and others, 2026](https://arxiv.org/html/2609.25510#bib.bib6)\)and Evölther\([Göther Labs, 2026](https://arxiv.org/html/2609.25510#bib.bib4)\)\. We find that both do not pass our verifier\. Removing slack in the same way, we find scores of 2\.6359830691068447 \(worse\) and 2\.6359830849176054 \(better\), respectively\. While Evölther achieves the greatest value we can verify, at this level of precision, validity can depend on floating\-point evaluation details, including the order of operations\. Our results should be read with these qualifications in mind\.\. Hill Sampling improves over the AlphaEvolve result on Erdos, while remaining under[Yuksekgonul et al\. \(2026\)](https://arxiv.org/html/2609.25510#bib.bib15), who use the much largergpt\-oss\-120b\. Note that even switching fromMistral\-24Btogpt\-oss\-20bimproved our result to 0\.38088232 \(1\.0001068894978207 normalized\)\. Our Sets result remains below AlphaEvolve, new autonomous discoveries\([Lin and Li, 2026](https://arxiv.org/html/2609.25510#bib.bib3)\), and constructions discovered \(but not necessarily instantiated in memory\) with human assistance[Lin and Li \(2026\)](https://arxiv.org/html/2609.25510#bib.bib3);[Gerbicz \(2025\)](https://arxiv.org/html/2609.25510#bib.bib8);[Zheng \(2025\)](https://arxiv.org/html/2609.25510#bib.bib9)\.

While Hill Sampling achieves about 95% of the AlphaEvolve score on Sets, so do the other baselines evaluated, which is suggestive of a model or domain knowledge failure\. Inspecting the initial code from AlphaEvolve, the initial code is misleading: the given solution searches within the space of integers below 250, while constructions in the original paper that proposed the problem, and the best known solution, all produce sets that are sparse, with a maximum integer potentially in the millions\. In a separate run, usinggpt\-oss\-20b, we run 150 rounds with no initial code, use a single 20\-second timeout, and include a note in the prompt that the known solution is sparse, with tens of thousands of elements over a range of hundreds of thousands to millions222We do not include this result in Table[1](https://arxiv.org/html/2609.25510#S5.T1), given the increased domain knowledge in the task\.\. That run achieved 99\.02% of the AlphaEvolve score, suggesting improvement from the model and/or domain knowledge\.

### 5\.1Model noise: weight\-space exploration is not enough

Our first weight\-space experiment asks whether ES learning improves the discovery objective\. Figure[2](https://arxiv.org/html/2609.25510#S5.F2)shows the key mismatch on circle packing: increasing the ES learning rate improves the final mean return, but the maximum return is best at learning rate zero\. Standard ES improves the average quality while harming the extreme statistic that matters for discovery\. This motivates setting the learning rate to zero, leaving only random model perturbations\.

At zero learning rate, the resulting Model Noise baseline is still doing search in weight space: every candidate comes from a different fixed Gaussian perturbation of the pretrained parameters, but there is no accumulated weight update\. Across the noise\-scale sweeps in Figure[3](https://arxiv.org/html/2609.25510#S5.F3), these random weight perturbations can provide useful diversity, but ordinary token\-sampling randomness from the unperturbed model performs better\. On Erdos, repeated sampling \(temperature 1\.0\) achieves the best maximum score\. While many values of sigma can perform better in terms of final mean return, the best final mean return is achieved by greedy decoding, which is equivalent to repeated sampling at temperature 0\. On circle packing, temperature\-1\.0 Hill Sampling likewise outperforms Hill Sampling using model noise as the only stochastic source\. For these results, temperature\-1\.0 Hill Sampling has the greatest mean and max score, since Hill Sampling improves the mean score as the best found solution improves\. The message is stronger than simply “ES learning hurts”: fixed perturbations are a viable exploration mechanism, but they are not the best one here\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/lr_vs_final_mean_fitness_sig=0p001_T=0.png)

\(a\) Final mean fitness versus ES learning rate\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/lr_vs_max_fitness_sig=0p001_T=0.png)

\(b\) Maximum fitness versus ES learning rate\.

Figure 2:ES improves mean return but not maximum return\.Withσ=10−3\\sigma=10^\{\-3\}and temperature 0, a nonzero ES learning rate improves final mean fitness \(averaged over the last 10% of data\) while the best maximum fitness occurs at learning rate zero, on the Circles task\. Thus the ES update can improve average quality while degrading the discovery objective\.![Refer to caption](https://arxiv.org/html/2609.25510v1/vary_sigma_erdos-max.png)

\(a\) Erdős: maximum fitness\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/vary_sigma_erdos-mean.png)

\(b\) Erdős: final\-10% mean fitness\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/vary_sigma_circles-max.png)

\(c\) Circles: maximum fitness\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/vary_sigma_circles-mean.png)

\(d\) Circles: final\-10% mean fitness\.

Figure 3:Model noise is weaker than ordinary sampling\.On Erdos, temperature\-1 Repeated Sampling has the best maximum, and temperature\-0 Repeated Sampling \(i\.e\., greedy decoding\) has the best mean, compared to using only model perturbations at various noise scales\. On circles, temperature\-1 Hill Sampling gives the strongest mean and maximum; the mean shows essentially the same ordering because the incumbent is propagated forward\. Repeated\-Sampling bars average two Erdos seeds and three Circle seeds, while each model\-noise value uses one seed, so fine ordering among noise scales is interpreted cautiously\.![Refer to caption](https://arxiv.org/html/2609.25510v1/erdos_entropy_rounds.png)\(a\)Entropy over rounds\.
![Refer to caption](https://arxiv.org/html/2609.25510v1/erdos_entropy.png)\(b\)Max fitness on Erdos\.

Figure 4:Entropy interventions stabilize behavior without improving discovery\.Adaptive temperature \(ATA and ATS\) can prevent entropy collapse, but the resulting runs do not exceed the performance simpler baseline on Erdos\. All methods use a temperature of 1\.05, as was best for ES on Erdos, except ATS and ATA, which use a temperature of 1\.0, since the entropy immediately dips, adding 0\.05 to the temperature on the second round\.
### 5\.2Entropy collapse: easy to fix, not useful to improve

Several ES variants exhibited declining response entropy, suggesting that the model was becoming increasingly concentrated on safer outputs\. We therefore tested several interventions:Auto Temp Add \(ATA\), increasing the sampling temperature by a fixed additive amount \(\.05 here\) whenever measured entropy falls below its initial value;Auto Temp Scale \(ATS\), multiplying the sampling temperature by a fixed factor \(1\.05 here\) whenever measured entropy falls below its initial value;Negative\-Enhanced Standardization \(NE\), adding an imaginary maximum reward before standardizing rewards, to stabilize entropy, following NGRPO[Nan et al\. \(2025\)](https://arxiv.org/html/2609.25510#bib.bib10), with and without antithetic sampling \(NoAnti\)\.

However, results in[4](https://arxiv.org/html/2609.25510#S5.F4)show none of these interventions significantly improves performance\. ATA and ATS prevent entropy collapse, while NE does not\. This provides a useful negative control: the poor ES maximum is not simply explained by an inability to maintain entropy\. Preserving diversity at the response level does not recover the benefit of Hill Sampling\.

### 5\.3Many more methods on Erdos

Since Erdos requires the fewest rounds of improvement, it is the setting in which we most extensively tested whether additional machinery could improve upon our simple Hill Sampling\.

We additionally compare:Top\-KK, selecting theKKhighest\-scoring programs observed so far, divided equally as parents for subsequent edits;Top\-KK\+ Random\-KK, augmenting these parents with randomly selected prior programs;Top\-KK\+ Diverse\-KK, iteratively augmenting the top\-KKparents with the prior program least similar in embeddings space from those selected so far \(starting with the top\-KK\);Top\-KKIn\-Context, presenting multiple high\-scoring programs jointly in the prompt rather than assigned separately across the population;Subpopulation Evolution, maintaining 64 independent subpopulations of eight responses, selecting the best, and repeating this four times before merging;In\-Context RL, maintaining a history of states, responses, and rewards in context for four steps, after which the history is reset to keep lengths manageable, with 512 histories managed in parallel;Execution Feedback, appending the output produced by executing the code to the state on the next iteration;Auto Temp Add \(ATA\), described in Section[5\.2](https://arxiv.org/html/2609.25510#S5.SS2);Long\-Horizon ES, using the same procedure as Subpopulation Evolution, but taking each subpopulation’s final return as its fitness and applying the ES update, thereby optimizing the model weights for performance after four steps of code editing; andHill Climbing, evaluating perturbed models and permanently adopting a perturbation when it improves the best reward, as a weight\-space analog of Hill Sampling\. Details are in Appendix[F](https://arxiv.org/html/2609.25510#A6)\.

Figure[5](https://arxiv.org/html/2609.25510#S5.F5)summarizes results\. None of the evaluated methods convey a significant advantage, and all methods, other than ES and ATA used with Hill Sampling, decrease performance\.

![Refer to caption](https://arxiv.org/html/2609.25510v1/erdos_all.png)Figure 5:Additional comparisons on Erdos\.We test a broad set of mechanisms against Hill Sampling\. None of the evaluated methods convey a significant advantage, and all, other than adding ES and ATA on top of Hill Sampling, decrease performance\.

## 6Conclusion

We introduce Hill Sampling, a minimal test\-time scaling algorithm that repeatedly samples edits to the best program found so far\. Hill Sampling improves substantially over ordinary repeated sampling: it sets a new state of the art over published methods on Circles and improves over the AlphaEvolve reference on Erdos, with only hours of computation on eight H100 GPUs\. Surprisingly, a learning rate of zero improves ES, via random model perturbations, and yet still performs worse than ordinary token sampling, which contextualizes recent results\([Gan and Isola, 2026](https://arxiv.org/html/2609.25510#bib.bib18)\)\. Further complexity, including weight\-space hill climbing, diversity selection, entropy control, execution feedback, and multi\-step optimization, does not improve performance\. These results support a practical default for verifiable domains: before adding an elaborate evolutionary harness or test\-time parameter learning, repeatedly sample edits to the best solution and let improvements become the next context\.

### AI use statement

Generative AI tools were used to assist with manuscript text and editing, and with writing code needed to run experiments\. All text, code, results, and claims are reviewed by the authors, who take responsibility for the final content of the work\.

### Reproducibility statement

Appendix[C](https://arxiv.org/html/2609.25510#A3)records the implementation defaults and experiment\-specific overrides, Appendix[F](https://arxiv.org/html/2609.25510#A6)describes the baseline methods in detail, and Appendix[A](https://arxiv.org/html/2609.25510#A1)gives formal task definitions\. Appendix[B](https://arxiv.org/html/2609.25510#A2)provides the task prompts and editing prompts, while Appendix[D](https://arxiv.org/html/2609.25510#A4)documents the hardened verifiers used in our experiments\. The full best circle\-packing construction, its state\-of\-the\-art result, and the evolved program are provided in Appendix[E](https://arxiv.org/html/2609.25510#A5)\. Our work builds off of OpenEvolve[Sharma \(2025\)](https://arxiv.org/html/2609.25510#bib.bib11), which is an open\-source implementation of AlphaEvolve[Novikov et al\. \(2025\)](https://arxiv.org/html/2609.25510#bib.bib2)\. We document as much as possible to enable future implementation of our method\. Since our method is simpler than existing baselines, implementation is likewise more straightforward\.

## References

- Assumpçãoet al\.\(2025\)H\. Assumpção, D\. Ferreira, L\. Campos, and F\. MuraiCodeEvolve: an open source evolutionary coding agent for algorithm discovery and optimization\.arXiv preprint arXiv:2510\.14150\.Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.
- Gan and Isola \(2026\)Y\. Gan and P\. IsolaNeural thickets: diverse task experts are dense around pretrained weights\.InForty\-third International Conference on Machine Learning,Cited by:[§1](https://arxiv.org/html/2609.25510#S1.p4.1),[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px4.p2.1),[§6](https://arxiv.org/html/2609.25510#S6.p1.1)\.
- Gerbicz \(2025\)R\. GerbiczSums and differences of sets \(improvement over AlphaEvolve\)\.arXiv preprint arXiv:2505\.16105\.Cited by:[§5](https://arxiv.org/html/2609.25510#S5.p2.1)\.
- Gideoniet al\.\(2026\)Y\. Gideoni, S\. Risi, and Y\. GalSimple baselines are competitive with code evolution\.InICLR 2026 Workshop on Recursive Self\-Improvement,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px2.p1.1)\.
- Göther Labs \(2026\)Göther LabsCircle packing: 26 circles in the unit square\.Note:[https://www\.gotherlabs\.com/results/circle\-packing\-26\-unit\-square/](https://www.gotherlabs.com/results/circle-packing-26-unit-square/)Evölther 2\.0 result; accessed September 12, 2026Cited by:[footnote 1](https://arxiv.org/html/2609.25510#footnote1)\.
- Guptaet al\.\(2026\)A\. Gupta, J\. Lei, A\. Lu, G\. Anumanchipalli, and L\. ChoshenAutomated discovery has no universally superior harness\.arXiv preprint arXiv:2607\.18235\.Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px2.p2.1)\.
- Jianget al\.\(2026\)J\. Jiang, T\. Ding, and Z\. ZhuDeltaEvolve: accelerating scientific discovery through momentum\-driven evolution\.InForty\-third International Conference on Machine Learning,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.
- Langeet al\.\(2026\)R\. Lange, Y\. Imajuku, and E\. CetinShinkaEvolve: towards open\-ended and sample\-efficient program evolution\.InInternational Conference on Learning Representations,Cited by:[§1](https://arxiv.org/html/2609.25510#S1.p1.1),[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1),[§4\.1](https://arxiv.org/html/2609.25510#S4.SS1.p1.1),[footnote 1](https://arxiv.org/html/2609.25510#footnote1)\.
- Lin and Li \(2026\)H\. Lin and S\. LiSettling the optimal exponent relating sumsets and difference sets\.arXiv preprint arXiv:2607\.27199\.Cited by:[§5](https://arxiv.org/html/2609.25510#S5.p2.1)\.
- Linet al\.\(2026\)H\. Linet al\.Hyra results: circles in a square, n=26\.Tencent Hunyuan\.Note:[https://github\.com/Tencent\-Hunyuan/Hyra\-results/blob/main/AI4Science/packing\_records/records/cirRsqu\_n26\.json](https://github.com/Tencent-Hunyuan/Hyra-results/blob/main/AI4Science/packing_records/records/cirRsqu_n26.json)Accessed: 2026\-09\-12Cited by:[footnote 1](https://arxiv.org/html/2609.25510#footnote1)\.
- Liuet al\.\(2026\)S\. Liu, S\. Agarwal, M\. Maheswaran, M\. Cemri, Q\. Mang, Z\. Li, A\. Naren, E\. Boneh, A\. Cheng, A\. Du, M\. Pan, K\. Keutzer, A\. Cheung, K\. Sen, A\. Dimakis, M\. Zaharia, and I\. StoicaEvoX: meta\-evolution for automated discovery\.InThird Conference on Language Modeling,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.
- Nanet al\.\(2025\)G\. Nan, S\. Chen, J\. Huang, M\. Lu, D\. Wang, C\. Xie, W\. Xiong, X\. Zeng, Q\. Zhou, Y\. Li,et al\.NGRPO: negative\-enhanced group relative policy optimization\.arXiv preprint arXiv:2509\.18851\.Cited by:[§5\.2](https://arxiv.org/html/2609.25510#S5.SS2.p1.1)\.
- Novikovet al\.\(2025\)A\. Novikov, N\. Vũ, M\. Eisenberger, E\. Dupont, P\. Huang, A\. Z\. Wagner, S\. Shirobokov, B\. Kozlovskii, F\. J\. Ruiz, A\. Mehrabian,et al\.AlphaEvolve: a coding agent for scientific and algorithmic discovery\.arXiv preprint arXiv:2506\.13131\.Cited by:[§1](https://arxiv.org/html/2609.25510#S1.p1.1),[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1),[§4\.1](https://arxiv.org/html/2609.25510#S4.SS1.p1.1),[§6](https://arxiv.org/html/2609.25510#S6.SSx2.p1.1)\.
- Qiuet al\.\(2026\)X\. Qiu, Y\. Gan, C\. F\. Hayes, Q\. Liang, Y\. Xu, R\. Dailey, E\. Meyerson, B\. Hodjat, and R\. MiikkulainenEvolution strategies at scale: LLM fine\-tuning beyond reinforcement learning\.InForty\-third International Conference on Machine Learning,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px4.p1.1),[§4\.2](https://arxiv.org/html/2609.25510#S4.SS2.p1.1)\.
- Romera\-Paredeset al\.\(2024\)B\. Romera\-Paredes, M\. Barekatain, A\. Novikov, M\. Balog, M\. P\. Kumar, E\. Dupont, F\. J\. Ruiz, J\. S\. Ellenberg, P\. Wang, O\. Fawzi,et al\.Mathematical discoveries from program search with large language models\.Nature625,pp\. 468–475\.Cited by:[§1](https://arxiv.org/html/2609.25510#S1.p1.1),[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.
- Salimanset al\.\(2017\)T\. Salimans, J\. Ho, X\. Chen, S\. Sidor, and I\. SutskeverEvolution strategies as a scalable alternative to reinforcement learning\.arXiv preprint arXiv:1703\.03864\.Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px4.p1.1),[§4\.2](https://arxiv.org/html/2609.25510#S4.SS2.p1.1)\.
- Sharma \(2025\)OpenEvolve: an open\-source evolutionary coding agentExternal Links:[Link](https://github.com/algorithmicsuperintelligence/openevolve)Cited by:[Appendix B](https://arxiv.org/html/2609.25510#A2.p1.1),[Appendix D](https://arxiv.org/html/2609.25510#A4.p1.1),[§4\.1](https://arxiv.org/html/2609.25510#S4.SS1.p1.1),[§4\.1](https://arxiv.org/html/2609.25510#S4.SS1.p3.1),[§6](https://arxiv.org/html/2609.25510#S6.SSx2.p1.1)\.
- Šurinaet al\.\(2025\)A\. Šurina, A\. Mansouri, L\. C\.P\.M\. Quaedvlieg, A\. Seddas, M\. Viazovska, E\. Abbe, and C\. GulcehreAlgorithm discovery with LLMs: evolutionary search meets reinforcement learning\.InSecond Conference on Language Modeling,Cited by:[§1](https://arxiv.org/html/2609.25510#S1.p1.1),[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px3.p1.1)\.
- Walder and Karkhanis \(2025\)C\. Walder and D\. T\. KarkhanisPass@k policy optimization: solving harder reinforcement learning problems\.InThe Thirty\-ninth Annual Conference on Neural Information Processing Systems,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px3.p2.1),[§4\.2](https://arxiv.org/html/2609.25510#S4.SS2.p1.1)\.
- Wanget al\.\(2026\)Y\. Wang, S\. Su, Z\. Zeng, E\. Xu, L\. Ren, X\. Yang, Z\. Huang, X\. He, L\. Ma, B\. Peng, H\. Cheng, P\. He, W\. Chen, S\. Wang, S\. S\. Du, and Y\. ShenThetaEvolve: test\-time learning on open problems\.InForty\-third International Conference on Machine Learning,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1),[footnote 1](https://arxiv.org/html/2609.25510#footnote1)\.
- Yanet al\.\(2026\)M\. Yan, B\. Peng, B\. Coleman, Z\. Chen, Z\. Xie, S\. Chen, Z\. He, N\. Sachdeva, I\. Ye, W\. Wang,et al\.PACEvolve: enabling long\-horizon progress\-aware consistent evolution\.InICLR 2026 Workshop on Lifelong Agents: Learning, Aligning, Evolving,Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.
- Yeet al\.\(2026\)H\. Ye, H\. Lin, J\. Tang, Y\. Luo, C\. Yang, C\. Su, R\. Thapa, R\. Yang, R\. Liu, Z\. Li,et al\.Structured scaling of AI discovery across diverse scientific domains\.arXiv preprint arXiv:2604\.19341\.Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.
- Yuksekgonulet al\.\(2026\)M\. Yuksekgonul, D\. Koceja, X\. Li, F\. Bianchi, J\. McCaleb, X\. Wang, J\. Kautz, Y\. Choi, J\. Zou, C\. Guestrin, and Y\. SunLearning to discover at test time\.InForty\-third International Conference on Machine Learning,Cited by:[§1](https://arxiv.org/html/2609.25510#S1.p1.1),[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px3.p1.1),[§4\.1](https://arxiv.org/html/2609.25510#S4.SS1.p1.1),[§4\.2](https://arxiv.org/html/2609.25510#S4.SS2.p1.1),[§5](https://arxiv.org/html/2609.25510#S5.p2.1)\.
- Zheng \(2025\)F\. ZhengSums and differences of sets: a further improvement over AlphaEvolve\.arXiv preprint arXiv:2506\.01896\.Cited by:[§5](https://arxiv.org/html/2609.25510#S5.p2.1)\.
- Zhenget al\.\(2026\)T\. Zheng, X\. Wu, Z\. Zhang, Z\. He, C\. Zhang, B\. Coleman, R\. Wei, D\. Bai, H\. Liu, R\. Liu,et al\.Dream\-RSI: recursive self\-improvement through evolving worlds\.arXiv preprint arXiv:2609\.14858\.Cited by:[§2](https://arxiv.org/html/2609.25510#S2.SS0.SSS0.Px1.p1.1)\.

## Appendix AFormal Problem Definitions

#### Circle packing\.

Forn=26n=26, choose centersci=\(xi,yi\)∈\[0,1\]2c\_\{i\}=\(x\_\{i\},y\_\{i\}\)\\in\[0,1\]^\{2\}and radiiri≥0r\_\{i\}\\geq 0to maximize

∑i=126ri,\\sum\_\{i=1\}^\{26\}r\_\{i\},\(4\)subject to each circle being contained in the unit square,

ri≤xi≤1−ri,ri≤yi≤1−ri,r\_\{i\}\\leq x\_\{i\}\\leq 1\-r\_\{i\},\\qquad r\_\{i\}\\leq y\_\{i\}\\leq 1\-r\_\{i\},\(5\)and pairwise non\-overlap,

‖ci−cj‖2≥ri\+rj\(i≠j\)\.\\\|c\_\{i\}\-c\_\{j\}\\\|\_\{2\}\\geq r\_\{i\}\+r\_\{j\}\\qquad\(i\\neq j\)\.\(6\)

#### Sums and differences of finite sets\.

LetC6C\_\{6\}be the largest constant such that there exist arbitrarily large finite integer setsA,BA,Bsatisfying\|A\+B\|≪\|A\|\|A\+B\|\\ll\|A\|and\|A−B\|≫\|A\+B\|C6\|A\-B\|\\gg\|A\+B\|^\{C\_\{6\}\}, whereA\+B=\{a\+b:a∈A,b∈B\}A\+B=\\\{a\+b:a\\in A,b\\in B\\\}andA−B=\{a−b:a∈A,b∈B\}A\-B=\\\{a\-b:a\\in A,b\\in B\\\}\. The computational construction follows the finite\-set lower\-bound formulation used by AlphaEvolve: for a finite setUUof non\-negative integers containing00and satisfying\|U−U\|≤2​max⁡\(U\)\+1\|U\-U\|\\leq 2\\max\(U\)\+1,

C6≥1\+log⁡\(\|U−U\|/\|U\+U\|\)log⁡\(2​max⁡\(U\)\+1\)\.C\_\{6\}\\geq 1\+\\frac\{\\log\\left\(\|U\-U\|/\|U\+U\|\\right\)\}\{\\log\(2\\max\(U\)\+1\)\}\.\(7\)Candidate programs search forUUmaximizing this certified lower bound\.

#### Erdős’ minimum\-overlap problem\.

LetC5C\_\{5\}be the largest constant such that, for every non\-negativef,g:\[−1,1\]→\[0,1\]f,g:\[\-1,1\]\\to\[0,1\]satisfyingf\+g=1f\+g=1on\[−1,1\]\[\-1,1\]and∫ℝf=1\\int\_\{\\mathbb\{R\}\}f=1\(with both functions extended by zero outside\[−1,1\]\[\-1,1\]\),

supx∈\[−2,2\]∫−11f⁡\(t\)​g​\(x\+t\)​𝑑t≥C5\.\\sup\_\{x\\in\[\-2,2\]\}\\int\_\{\-1\}^\{1\}f\(t\)g\(x\+t\)\\,dt\\geq C\_\{5\}\.\(8\)Equivalently, the upper\-bound search can be written as an infimum over admissible step functionsh:\[0,2\]→\[0,1\]h:\[0,2\]\\to\[0,1\]with∫02h⁡\(x\)​𝑑x=1\\int\_\{0\}^\{2\}h\(x\)\\,dx=1of the maximum shifted overlap∫h⁡\(x\)​\(1−h⁡\(x\+k\)\)​𝑑x\\int h\(x\)\(1\-h\(x\+k\)\)\\,dx\. Candidate programs construct and optimize such step functions; a smaller certified overlap gives a stronger upper bound onC5C\_\{5\}\.

## Appendix BPrompts

For standard experiments, the model receives the task\-facing prompt together with the standard initial program or code state\. For each NI \(no\-initial\-information\) experiment, we remove the initial task\-specific prompt and initial solution code, leaving only the function signature and evaluation code needed to define the interface and verifier\. The NI comparison is intended to test whether performance depends on domain\-specific scaffolding supplied at initialization\. For circle packing, the standard initial prompt and code are taken from phase two of OpenEvolve’s[Sharma \(2025\)](https://arxiv.org/html/2609.25510#bib.bib11)phased prompt schedule, so this standard configuration provides substantially more task\-specific information than the NI setting\.

#### Circle packing, standard setting\.

The system prompt is:

You are an expert mathematician specializing in circle packing problems and computational geometry\. We’re trying to reach the AlphaEvolve target of 2\.635 for the sum of radii when packing 26 circles in a unit square\. The current implementation has plateaued at 2\.377, so we need significant improvements\.Key insights to explore:1\. The optimal arrangement likely involves variable\-sized circles2\. A pure hexagonal arrangement may not be optimal due to edge effects3\. The densest known circle packings often use a hybrid approach4\. The optimization routine is critically important \- simple physics\-based models with carefully tuned parameters5\. Consider strategic placement of circles at square corners and edges6\. Adjusting the pattern to place larger circles at the center and smaller at the edges7\. The math literature suggests special arrangements for specific values of nFocus on breaking through the plateau by trying fundamentally different approaches \- don’t just tweak parameters\.

The editing prompt is:

Here is the current code that you are modifying:\[CURRENT EDITED CODE\]Replace the current code in the edit block with the code you want to use for this plan\.Your answer must include these comments and must use this format:\# EDIT\-START<your\_new\_code\>\# EDIT\-END

#### Sums and differences of finite sets\.

The system prompt is:

You are an expert in number theory, combinatorial optimization, and AI\-driven mathematical discovery\.Your task is to evolve and optimize a Python script to find a finite set of integers \`U\` that provides a new, world\-record lower bound for the constant C6\.PROBLEM CONTEXT:Target: Find a finite set \`U\` of non\-negative integers \(containing 0\) that maximizes the objective function:C6\(U\) = 1 \+ log\(\|U\-U\| / \|U\+U\|\) / log\(2\*max\(U\) \+ 1\)This maximum value provides a tight lower bound for the constant C6\.Current best known lower bound: C6 \>= 1\.158417281556896Goal: Find a set \`U\` that results in a C6 value \(c6\_bound\) greater than 1\.158417281556896\.PERFORMANCE METRIC:c6\_bound/1\.158417281556896 \(The primary objective is to MAXIMIZE this value \- a value \> 1 means a new record\)\.VALIDATION FRAMEWORK:\- The evaluation script re\-computes the C6 value using standard NumPy set operations and verifies the constraints on \`U\`\.

The editing prompt is:

Here is the current code that you are modifying:\[CURRENT EDITED CODE\]Replace the current code in the edit block with the code you want to use for this plan\.Your answer must include these comments and must use this format:\# EDIT\-START<your\_new\_code\>\# EDIT\-END

#### Erdos minimum overlap\.

The system prompt is:

You are an expert in harmonic analysis, numerical optimization, and AI\-driven mathematical discovery\.Your task is to evolve and optimize a Python script to find a better upper bound for the Erdos minimum overlap problem constant C5\.PROBLEM CONTEXT:Target: Find a step function h: \[0, 2\] \-\> \[0, 1\] that minimizes the objective:max\_k integral h\(x\)\(1 \- h\(x\+k\)\) dxThis minimal value provides a tight upper bound for the constant C5\.Current best known upper bound: C5 <= 0\.38092303510845016Goal: Find a step function h that results in a C5 value \(c5\_bound\) lower than 0\.38092303510845016\.CONSTRAINTS:1\. The function h must have values in the range \[0, 1\]\.2\. The integral of h\(x\) over \[0, 2\] must be exactly 1\.PERFORMANCE METRIC:0\.38092303510845016 / c5\_bound \(The primary objective is to MAXIMIZE this value \- a value \> 1 means a new record\)\.

The editing prompt is:

Here is the current code that you are modifying:\[CURRENT EDITED CODE\]Replace the current code in the edit block with the code you want to use for this plan\.Your answer must include these comments and must use this format:\# EDIT\-START<your\_new\_code\>\# EDIT\-END

## Appendix CImplementation and Hyperparameters

![Refer to caption](https://arxiv.org/html/2609.25510v1/bigsig_mean.png)\(a\)Mean score\.
![Refer to caption](https://arxiv.org/html/2609.25510v1/bigsig_max.png)\(b\)Max score\.
![Refer to caption](https://arxiv.org/html/2609.25510v1/bigsig_maxsofar.png)\(c\)Max score so far\.

Figure 6:Increased sigma on Circles\.A higher sigma value,σ=10−3\\sigma=10^\{\-3\}, and associated stable learning rate,α=10−6\\alpha=10^\{\-6\}, improves mean but not maximum return\.### C\.1Hyperparameter Tuning

We tune the temperature manually over three seeds for each method in each domain in the main results\. Beforehand, we conducted some initial experiments with two seeds on Erdos and Circles, to select the temperature range, learning rate, and sigma, since we did not have the compute budget to tune these per method\. We first tuned the temperature for Repeated Sampling between 1\.1, 1\.0, and 0\.5, finding 1\.0 to consistently give the highest max return\. We then tuned sigma for Model Noise \(temperature 0\) on the Erdos and Circle packing domains, evaluating sigma between 0\.001, 0\.0006, 0\.0003, and 0\.0001\. While we found 0\.001 to perform best on circles and 0\.0006 and 0\.0003 to perform best on Erdos, we found that Model Noise could be improved in both domains by increasing the temperature to 1\.0, as in Repeated Sampling\.

We then re\-tuned sigma for Model Noise \(temperature 1\), and found that a sigma of 0\.0003 produce the greatest max returns over the two seeds on each domain, so we selected sigma 0\.0003\. We found a learning rate of 1e\-7 to be stable for a sigma of 0\.0003 on Erdos and Circles, and so use that as our learning rate\. Still, we perform an additional experiment where we train ES with 0\.0001 \(and a required larger learning rate of 1e\-6\) on Circles\. While this setting did improve the speed of learning and therefore mean return, it also decreased max return, consistent with the objective of ES, which optimizes mean return\. See Figure[6](https://arxiv.org/html/2609.25510#A3.F6)\.

Additionally, we found that Model Noise with sigma 0\.0003 could be slightly improved by decreasing the temperature to 0\.95 on Erdos, and further decreasing to 0\.9 did not improve performance\. In general, we see noticeable declines with temperatures at or above 1\.1\. Thus we choose sigma 0\.0003 and choose to tune the temperatures over \[\.95, 1\.0, 1\.05\] for Erdos and Circles, and \[1\.0\] for Sets, given the compute limitations on Sets\. Note that methods such as Model Noise add additional entropy on top of the temperature, so it is especially useful to tune the temperature per method, where possible, to adjust total entropy of generation\.

### C\.2Other Implementation Details

Our implementation uses one vLLM instance per GPU, with eight evaluation engines\. The population size is 32 \(with 32 antithetic samples as well\); maximum generation length is 8,000 tokens; model context length is 40,000; top\-p=1p=1; ES uses antithetic sampling and reward standardization; the default first and second code\-execution timeouts are 5 and 10 seconds; and repeated responses use temperature 1 unless explicitly swept\. ES Softmax requires a beta parameter \(i\.e\., the inverse softmax temperature\)\. We tune over 0\.5, 1\.0, and 2\.0 on circles, and found 2\.0 to perform best\. In those early experiments, we had used a temperature of 0\.5 and sigma of 0\.001\. Main ES experiments useσ=3×10−4\\sigma=3\\times 10^\{\-4\}and learning rate10−710^\{\-7\}after preliminary tuning; circles also includes a higher\-noiseσ=10−3\\sigma=10^\{\-3\},α=10−6\\alpha=10^\{\-6\}condition that improves mean but not maximum return\. See Figure[6](https://arxiv.org/html/2609.25510#A3.F6)\.

## Appendix DEvaluator Hardening

We harden the original verifiers from OpenEvolve[Sharma \(2025\)](https://arxiv.org/html/2609.25510#bib.bib11)to prevent reward hacking, which we observed on Sets, while preserving their mathematical objectives\. The code for our verifiers is included at the bottom of all programs being edited, so that it can be seen by the LLM during generation\. The code for our verification is included below:

Circle packing\. Note: While there is slack in the verifier below, we set the slack here to 0\.0 to verify the no\-slack results in Table[1](https://arxiv.org/html/2609.25510#S5.T1):

\# This part remains fixed \(not evolved\):def check\_packing\(centers, radii\) \-\> bool:\# Adapted from OpenEvolve\# Check shapes, including number of circlesassert radii\.shape == \(26,\), f"Shapes of centers is \{radii\.shape\}, but there should be exactly 26 circles\."assert centers\.shape == \(26, 2\), f"Shapes of centers is \{centers\.shape\} but should be \(26, 2\)"\# Check if circles are inside the unit squaren = centers\.shape\[0\]for i in range\(n\):x, y = centers\[i\]r = radii\[i\]violation = x \- r < \-1e\-10 or x \+ r \> 1 \+ 1e\-10 or y \- r < \-1e\-10 or y \+ r \> 1 \+ 1e\-10assert not violation, f"Circle \{i\} at \(\{x\}, \{y\}\) with radius \{r\} is outside the unit square"\# Additional check that all circles must stay inside the unit squareassert np\.all\(radii \- 1e\-10 <= centers\[:, 0\]\), "circle\(s\) is out of bounds on the left side"assert np\.all\(radii \- 1e\-10 <= 1\.0 \- centers\[:, 0\]\), "circle\(s\) is out of bounds on the right side"assert np\.all\(radii \- 1e\-10 <= centers\[:, 1\]\), "circle\(s\) is out of bounds on the bottom"assert np\.all\(radii \- 1e\-10 <= 1\.0 \- centers\[:, 1\]\), "circle\(s\) is out of bounds on the top"\# No overlap between any pair of circlesfor i in range\(len\(centers\)\):for j in range\(i \+ 1, len\(centers\)\):d = np\.linalg\.norm\(centers\[i\] \- centers\[j\]\)assert d \+ 1e\-10 \>= radii\[i\] \+ radii\[j\], f"Circles \{i\} and \{j\} overlap: d=\{d\}, sum\_r=\{radii\[i\]\+radii\[j\]\}"return True

Sets:

\# This part remains fixed \(not evolved\):def check\_soln\(u\_set: np\.ndarray, c6\_achieved: float\):"""Verifies the C6 lower bound solution\."""if not isinstance\(u\_set, np\.ndarray\) or u\_set\.ndim \!= 1:raise ValueError\("Solution U must be a 1D numpy array of integers\."\)if not np\.issubdtype\(u\_set\.dtype, np\.integer\):raise ValueError\(f"Solution U must have integer dtype, got \{u\_set\.dtype\}\."\)if len\(u\_set\) < 2:raise ValueError\("Set U must contain at least two elements\."\)if not np\.all\(np\.isfinite\(u\_set\)\):raise ValueError\("Set U must contain only finite values\."\)if 0 not in u\_set:raise ValueError\("Set U must contain 0\."\)if np\.any\(u\_set < 0\):raise ValueError\("Set U must contain non\-negative integers\."\)if len\(np\.unique\(u\_set\)\) \!= len\(u\_set\):raise ValueError\("Set U must not contain duplicates\."\)if np\.max\(u\_set\) <= 0:raise ValueError\("Set U must have positive max element\."\)if not np\.isfinite\(c6\_achieved\):raise ValueError\("Reported C6 must be finite\."\)max\_int64 = np\.iinfo\(np\.int64\)\.maxif np\.max\(u\_set\) \> \(max\_int64 \- 1\) // 2:raise ValueError\("Set U contains values too large for safe int64 C6 computation\."\)u\_set = u\_set\.astype\(np\.int64\)\# Re\-calculate the C6 bound using NumPyu\_plus\_u = np\.unique\(u\_set\[:, None\] \+ u\_set\[None, :\]\)u\_minus\_u = np\.unique\(u\_set\[:, None\] \- u\_set\[None, :\]\)size\_U\_plus\_U = len\(u\_plus\_u\)size\_U\_minus\_U = len\(u\_minus\_u\)max\_U = np\.max\(u\_set\)ratio = size\_U\_minus\_U / size\_U\_plus\_Ulog\_ratio = np\.log\(ratio\)log\_denom = np\.log\(2 \* max\_U \+ 1\)computed\_c6 = 1 \+ log\_ratio / log\_denom\# Check for consistencyif not np\.isclose\(computed\_c6, c6\_achieved\):raise ValueError\(f"C6 mismatch: reported \{c6\_achieved:\.6f\}, computed \{computed\_c6:\.6f\}"\)print\(f"C6 lower bound achieved: \{c6\_achieved:\.6f\}"\)print\(f"Known best bound \(AlphaEvolve\): \{BEST\_KNOWN\_BOUND\}"\)if c6\_achieved \> BEST\_KNOWN\_BOUND:print\("Successfully found a new, better lower bound\!"\)else:print\("Result is not better than the known lower bounds\."\)

Erdos:

\# This part remains fixed \(not evolved\):def check\_soln\(h\_values: np\.ndarray, c5\_achieved: float, n\_points: int\):"""Verifies the C5 upper bound solution\."""if h\_values\.shape \!= \(n\_points,\):raise ValueError\(f"Expected h shape \(\{n\_points\},\), got \{h\_values\.shape\}"\)\# Verify h\(x\) in \[0, 1\] constraintif np\.any\(h\_values < 0\) or np\.any\(h\_values \> 1\):raise ValueError\(f"h\(x\) is not in \[0, 1\]\. Range: \[\{h\_values\.min\(\)\}, \{h\_values\.max\(\)\}\]"\)\# Verify integral of h = 1 constraintdx = 2\.0 / n\_pointsintegral\_h = np\.sum\(h\_values\) \* dxif not np\.isclose\(integral\_h, 1\.0, atol=1e\-3\):raise ValueError\(f"Integral of h is not close to 1\. Got: \{integral\_h:\.6f\}"\)\# Re\-calculate the C5 bound using np\.correlatej\_values = 1\.0 \- h\_valuescorrelation = np\.correlate\(h\_values, j\_values, mode="full"\) \* dxcomputed\_c5 = np\.max\(correlation\)\# Check for consistencyif not np\.isclose\(computed\_c5, c5\_achieved, atol=1e\-4\):raise ValueError\(f"C5 mismatch: reported \{c5\_achieved:\.6f\}, computed \{computed\_c5:\.6f\}"\)

## Appendix EBest Circle\-Packing Construction

Our best circle\-packing program uses multiple initializations, simulated annealing, SLSQP, and post\-processing to jointly optimize the centers and radii\. We provide the construction and the program that produced it below\.

### E\.1Construction

The following is the best construction found:

centers:\[\[0\.49866807550340203, 0\.5299634197531919\], \[0\.7269057143115956, 0\.5960427019081351\], \[0\.595219732939733, 0\.7420494434605925\], \[0\.49942836913903915, 0\.9060726627225562\], \[0\.40335878360268074, 0\.7424170495016357\], \[0\.2716298514860011, 0\.5976347963876627\], \[0\.294746059048949, 0\.38692355340960205\], \[0\.4955317606743565, 0\.2753426167714407\], \[0\.7026096036990243, 0\.381665844452646\], \[0\.9038486659542349, 0\.6820800429325906\], \[0\.759352401560932, 0\.7629588636539985\], \[0\.6859430219867828, 0\.9074079050485646\], \[0\.31311580997040167, 0\.907608448429041\], \[0\.23971052792753655, 0\.7636735693833858\], \[0\.0957323293070214, 0\.683258534973081\], \[0\.10306052014158258, 0\.48460080265191613\], \[0\.10679014462858119, 0\.27478328335082064\], \[0\.29460948878182686, 0\.1302211010652243\], \[0\.7023095250891598, 0\.13325857277081166\], \[0\.8948174397312508, 0\.2739528396239526\], \[0\.8965327666420476, 0\.48259558221054255\], \[0\.08463950069577307, 0\.08463950069577306\], \[0\.915073737545101, 0\.08492626245489913\], \[0\.888843820589555, 0\.8888438205895551\], \[0\.11077901279071603, 0\.8892209872092842\], \[0\.4972844462041092, 0\.07886037291596369\]\]radii:\[0\.13701043012374725, 0\.10060036781871129, 0\.09601897575825369, 0\.09392733727744335, 0\.09584232574550451, 0\.09989835059275441, 0\.1120770889502559, 0\.11762968804654161, 0\.11514888016002287, 0\.09615133404576477, 0\.0694401937112582, 0\.09259209495143532, 0\.09239155157095869, 0\.06918067635723435, 0\.0957323293070214, 0\.10306052014158222, 0\.1067901446285808, 0\.1302211010652243, 0\.13325857277081152, 0\.10518256026874889, 0\.10346723335795216, 0\.08463950069577306, 0\.08492626245489898, 0\.11115617941044477, 0\.11077901279071578, 0\.07886037291596369\]

### E\.2Program

The following is the evolved portion of the program, produced by the LLM, that gives the construction\.

\# EDIT\-STARTimport numpy as npfrom scipy\.optimize import minimizedef construct\_packing\(\):"""Improved 26\-circle packing for a unit square\.The approach follows a hybrid scheme:• A deterministic “core \+ shell” layout \(rounded hexagon\) is used as a seed\.• Random perturbations and a simulated\-annealing post\-process escape local minima\.• Radii are optimized simultaneously with centres via SLSQP in log\-space\.The routine returns the best centres/radii found and their sum\."""n = 26rng\_global = np\.random\.default\_rng\(2023\)\# \-\-\-\-\-\-\-\-\-\- 1 Core \+ Shell initial layout \-\-\-\-\-\-\-\-\-\-def initial\_layout\(seed=None\):rng = np\.random\.default\_rng\(seed\)centres = \[\]radii = \[\]\# central large circler0 = 0\.34centres\.append\(\[0\.5, 0\.5\]\)radii\.append\(r0\)\# 8 circles around the central one \(hexagonal layer\)r1 = 0\.18d1 = 0\.325for k in range\(8\):theta = 2\*np\.pi\*k/8centres\.append\(\[0\.5 \+ d1\*np\.cos\(theta\), 0\.5 \+ d1\*np\.sin\(theta\)\]\)radii\.append\(r1\)\# 12 circles in the next ring \(offset by pi/12\)r2 = 0\.13d2 = 0\.53for k in range\(12\):theta = 2\*np\.pi\*k/12 \+ np\.pi/12centres\.append\(\[0\.5 \+ d2\*np\.cos\(theta\), 0\.5 \+ d2\*np\.sin\(theta\)\]\)radii\.append\(r2\)\# 4 corner circles touching the boundaryrc = 0\.12for corner in \(\(rc, rc\), \(1\-rc, rc\), \(1\-rc, 1\-rc\), \(rc, 1\-rc\)\):centres\.append\(list\(corner\)\)radii\.append\(rc\)\# one additional edge circle to complete 26centres\.append\(\[0\.5, 0\.5 \- 0\.45\]\)radii\.append\(0\.14\)centres = np\.array\(centres\[:n\], dtype=np\.float64\)radii = np\.array\(radii\[:n\], dtype=np\.float64\)\# jitter small amounts for varietyjitter = 0\.012centres \+= \(rng\.random\(\(n,2\)\)\-0\.5\)\*jitterradii \*= 1\+ \(rng\.random\(n\)\-0\.5\)\*jitterreturn centres, radii\# \-\-\-\-\-\-\-\-\-\- 2 Random greedy placement \(fall\-back\) \-\-\-\-\-\-\-\-\-\-def greedy\_random\_layout\(seed=None, attempts=5, max\_rounds=200\):rng = np\.random\.default\_rng\(seed\)\# bounds for radiir\_min, r\_max = 0\.05, 0\.26centres = np\.empty\(\(n,2\)\)radii = np\.empty\(n\)placed = 0for \_ in range\(attempts\):\# tiny restartif placed==0:centres\[:\] = np\.nanwhile placed < n:\# sample random radiusr = rng\.uniform\(r\_min, r\_max\)\# sample random centrex = rng\.uniform\(r, 1\-r\)y = rng\.uniform\(r, 1\-r\)\# check against existingok = Truefor j in range\(placed\):d = np\.hypot\(x\-centres\[j,0\], y\-centres\[j,1\]\)if d < r \+ radii\[j\]:ok = Falsebreakif ok:centres\[placed\] = \[x,y\]radii\[placed\] = rplaced \+= 1else:\# fail after many rounds? restart greedyif max\_rounds <= 0:breakmax\_rounds \-= 1if placed==n:return centres, radiielse:\# fallback to deterministic layoutreturn initial\_layout\(seed\)\# \-\-\-\-\-\-\-\-\-\- 3 Simulated annealing post\-process \-\-\-\-\-\-\-\-\-\-def simulated\_anneal\(centres, radii, max\_steps=800, temp0=0\.1\):best\_c, best\_r = centres\.copy\(\), radii\.copy\(\)best\_sum = np\.sum\(radii\)temp = temp0for step in range\(max\_steps\):idx = rng\_global\.integers\(n\)\# propose new radiusnew\_r = best\_r\[idx\] \* \(1 \+ rng\_global\.normal\(0, temp\)\)new\_r = np\.clip\(new\_r, 0\.05, 0\.35\)\# propose new centrenew\_c = best\_c\[idx\] \+ rng\_global\.normal\(0, temp, 2\)\# boundary clipnew\_c\[0\] = np\.clip\(new\_c\[0\], new\_r, 1\-new\_r\)new\_c\[1\] = np\.clip\(new\_c\[1\], new\_r, 1\-new\_r\)\# check overlapok = Truefor j in range\(n\):if j==idx: continued = np\.hypot\(new\_c\[0\]\-best\_c\[j,0\], new\_c\[1\]\-best\_c\[j,1\]\)if d < new\_r \+ best\_r\[j\]:ok = Falsebreakif not ok:continue\# accept if betternew\_sum = best\_sum \- best\_r\[idx\] \+ new\_rif new\_sum \>= best\_sum:best\_sum = new\_sumbest\_r\[idx\] = new\_rbest\_c\[idx\] = new\_c\# cooling scheduletemp \*= 0\.9995return best\_c, best\_r\# \-\-\-\-\-\-\-\-\-\- 4 Core optimisation \(SLSQP\) \-\-\-\-\-\-\-\-\-\-best\_sum = \-np\.infbest\_centres = Nonebest\_radii = Nonedef run\_optimisation\(init\_c, init\_r\):log\_r = np\.log\(init\_r\)x0 = np\.empty\(3\*n, dtype=float\)x0\[0::3\] = init\_c\[:,0\]x0\[1::3\] = init\_c\[:,1\]x0\[2::3\] = log\_rdef obj\_fun\(x\):return \-np\.sum\(np\.exp\(x\[2::3\]\)\)def con\_fun\(x\):xs = x\[0::3\]ys = x\[1::3\]rs = np\.exp\(x\[2::3\]\)cons = np\.empty\(4\*n \+ \(n\*\(n\-1\)\)//2, dtype=float\)\# boundarycons\[0:4\*n:4\] = xs \- rscons\[1:4\*n:4\] = 1 \- xs \- rscons\[2:4\*n:4\] = ys \- rscons\[3:4\*n:4\] = 1 \- ys \- rsidx = 4\*nfor i in range\(n\):for j in range\(i\+1, n\):dx = xs\[i\]\-xs\[j\]dy = ys\[i\]\-ys\[j\]cons\[idx\] = dx\*dx \+ dy\*dy \- \(rs\[i\]\+rs\[j\]\)\*\*2idx \+= 1return consres = minimize\(obj\_fun,x0,method="SLSQP",constraints=\[\{"type":"ineq","fun":con\_fun\}\],options=\{"ftol":1e\-12,"maxiter":6000,"disp":False,"iprint":\-1\}\)if res\.success:opt\_c = np\.column\_stack\(\(res\.x\[0::3\], res\.x\[1::3\]\)\)opt\_r = np\.exp\(res\.x\[2::3\]\)else:opt\_c, opt\_r = init\_c, init\_r\# post\-shrink to ensure feasibilityopt\_r = shrink\_step\(opt\_c, opt\_r\)return opt\_c, opt\_rdef shrink\_step\(centres, radii, max\_iter=200\):r = radii\.copy\(\)for \_ in range\(max\_iter\):\# distance to boundariesr = np\.minimum\(r, np\.minimum\(np\.minimum\(centres\[:,0\], centres\[:,1\]\),np\.minimum\(1\-centres\[:,0\], 1\-centres\[:,1\]\)\)\)for i in range\(n\):for j in range\(i\+1, n\):d = np\.linalg\.norm\(centres\[i\]\-centres\[j\]\)if r\[i\]\+r\[j\] \> d:shrink = d/\(r\[i\]\+r\[j\]\)r\[i\] \*= shrinkr\[j\] \*= shrinkreturn r\# \-\-\-\-\-\-\-\-\-\- 5 Multiple restarts \-\-\-\-\-\-\-\-\-\-for seed in range\(128\):\# try deterministic, then greedy, otherwise fallbackinit\_c, init\_r = greedy\_random\_layout\(seed\)opt\_c, opt\_r = run\_optimisation\(init\_c, init\_r\)opt\_c, opt\_r = simulated\_anneal\(opt\_c, opt\_r\)cur\_sum = np\.sum\(opt\_r\)if cur\_sum \> best\_sum:best\_sum = cur\_sumbest\_centres = opt\_cbest\_radii = opt\_r\# sanity checkcheck\_packing\(best\_centres, best\_radii\)return best\_centres, best\_radii, best\_sum\# EDIT\-END

## Appendix FAdditional Method Details

This section provides additional details for the baselines evaluated in the main text\.

#### Repeated Sampling \(RS\)\.

RS uses the frozen, unperturbed model and samples edits to the original program without propagating improved programs between rounds\. Thus each round starts from the same initial program state,x0x\_\{0\}\. We use the same decoding and evaluation procedure as for Hill Sampling:

yt,1,…,yt,N∼pθ\(⋅∣x0;T\)\.y\_\{t,1\},\\ldots,y\_\{t,N\}\\sim p\_\{\\theta\}\(\\cdot\\mid x\_\{0\};T\)\.\(9\)

#### Model Noise \(MN\)\.

MN perturbs the frozen model parameters as

θi=θ\+σ​ϵi,ϵi∼𝒩⁡\(0,I\)\.\\theta\_\{i\}=\\theta\+\\sigma\\epsilon\_\{i\},\\qquad\\epsilon\_\{i\}\\sim\\mathcal\{N\}\(0,I\)\.We use 32 antithetic perturbations, evaluating bothϵi\\epsilon\_\{i\}and−ϵi\-\\epsilon\_\{i\}, and restore the original parameters after each evaluation by subtracting the added noise\. MN performs no accumulated parameter update\. MN \(64\) draws one response for each of the 64 perturbed models, while MN \(512\) draws eight responses per perturbed model\. The temperature is tuned as for all methods, unless otherwise specified\.

#### Evolution Strategies \(ES\)\.

ES uses the same antithetic parameter perturbations as MN but updates the underlying model after each population evaluation\. For 32 independently sampled perturbations and their antithetic counterparts, we first compute the antithetic reward differences

Ri=r\(θ\+σϵi\)−r\(θ−σϵi\),i=1,…,32\.R\_\{i\}=r\(\\theta\+\\sigma\\epsilon\_\{i\}\)\-r\(\\theta\-\\sigma\\epsilon\_\{i\}\),\\qquad i=1,\\ldots,32\.We standardize these differences across the population,

R~i=Ri−R¯sR,\\widetilde\{R\}\_\{i\}=\\frac\{R\_\{i\}\-\\bar\{R\}\}\{s\_\{R\}\},whereR¯\\bar\{R\}andsRs\_\{R\}are the population mean and standard deviation of theRiR\_\{i\}\(with division omitted when the standard deviation is numerically zero\)\. The model is then updated as

θ←θ\+α64​σ​∑i=132R~i​ϵi,\\theta\\leftarrow\\theta\+\\frac\{\\alpha\}\{64\\sigma\}\\sum\_\{i=1\}^\{32\}\\widetilde\{R\}\_\{i\}\\epsilon\_\{i\},whereα\\alphais the learning rate\. Noise vectors are reproduced from their random seeds rather than stored explicitly\.

#### ES \(max@8\)\.

ES \(max@8\) generates eight responses from each perturbed model and uses the maximum reward among those responses as that perturbation’s fitness\. That is,r⁡\(θ\)r\(\\theta\)samples eight responses, rather than one, from the model defined byθ\\thetaand returns the maximum\. The resulting fitnesses are otherwise used in the same ES update as above\. This changes the optimization target toward the maximum\-over\-samples objective relevant to discovery\.

#### ES \(softmax\)\.

ES \(softmax\) replaces the standardized reward weightsR~i\\widetilde\{R\}\_\{i\}with softmax weights

wi=exp⁡\(β​R~i\)∑jexp⁡\(β​R~j\),w\_\{i\}=\\frac\{\\exp\(\\beta\\widetilde\{R\}\_\{i\}\)\}\{\\sum\_\{j\}\\exp\(\\beta\\widetilde\{R\}\_\{j\}\)\},whereβ\\betais the inverse softmax temperature\. The ES update then useswiw\_\{i\}in place ofR~i\\widetilde\{R\}\_\{i\}\.

#### Hill Sampling \+ ES\.

This method combines incumbent propagation with ES \(max@8\)\. Candidate programs are generated by editing the current best program, while model parameters are simultaneously updated using the ES procedure\. It therefore tests whether parameter learning provides an additional benefit beyond propagating the best program\.

#### Top\-KK\.

LetℬK=\(x1,…,xK\)\\mathcal\{B\}\_\{K\}=\(x\_\{1\},\\ldots,x\_\{K\}\)denote theKKhighest\-scoring program states observed so far, ordered by reward\. These states are distributed cyclically across the population, so population memberiiedits parent

x1\+\(imodK\)\.x\_\{\\,1\+\(i\\bmod K\)\}\.For each distinct program state, we retain its highest observed reward\.

#### Top\-KK\+ Random\-KK\.

In addition toℬK\\mathcal\{B\}\_\{K\}, we sampleKKpreviously observed program states uniformly at random and append them to the parent set\. Thus, ifℋ\\mathcal\{H\}is the set of previously observed states, the additional parents satisfy

ℛK∼Unif⁡\{S⊆ℋ:\|S\|=K\}\.\\mathcal\{R\}\_\{K\}\\sim\\operatorname\{Unif\}\\\!\\left\\\{S\\subseteq\\mathcal\{H\}:\|S\|=K\\right\\\}\.The resulting parent set is distributed cyclically across the population as in Top\-KK\.

#### Top\-KK\+ Diverse\-KK\.

Starting from the Top\-KKprograms, we greedily add programs with low average embedding similarity to those already selected\. If𝒮\\mathcal\{S\}is the currently selected set ande⁡\(x\)e\(x\)is the Sentence Transformers all\-MiniLM\-L6\-v2 embedding, the next state is chosen as

x∗=arg⁡minx∈ℋ​1\|𝒮\|​∑s∈𝒮sim⁡\(e⁡\(x\),e⁡\(s\)\)\.x^\{\*\}=\\arg\\min\_\{x\\in\\mathcal\{H\}\}\\frac\{1\}\{\|\\mathcal\{S\}\|\}\\sum\_\{s\\in\\mathcal\{S\}\}\\operatorname\{sim\}\(e\(x\),e\(s\)\)\.We repeat this selection until the requested number of diverse parents has been added\.

#### Top\-KKIn\-Context\.

Rather than assigning selected programs separately across the population, this variant concatenates the selected states into a single editing context,

X=x1⊕x2⊕⋯⊕xK,X=x\_\{1\}\\oplus x\_\{2\}\\oplus\\cdots\\oplus x\_\{K\},where⊕\\oplusdenotes concatenation with a code divider\. The reward associated with this combined context is the best selected reward,maxk≤K⁡r⁡\(xk\)\\max\_\{k\\leq K\}r\(x\_\{k\}\)\.

#### Subpopulation Evolution\.

We maintain 64 independent subpopulations, each generating eight candidate edits from its current program\. For subpopulationjjat inner steptt, we sample

yj,t,1,…,yj,t,8∼pθ\(⋅∣xj,t;T\),i∗=argmaxir\(yj,t,i\),y\_\{j,t,1\},\\ldots,y\_\{j,t,8\}\\sim p\_\{\\theta\}\(\\cdot\\mid x\_\{j,t\};T\),\\qquad i^\{\*\}=\\arg\\max\_\{i\}r\(y\_\{j,t,i\}\),and

xj,t\+1=\{yj,t,i∗,r⁡\(yj,t,i∗\)≥r⁡\(xj,t\),xj,t,otherwise\.x\_\{j,t\+1\}=\\begin\{cases\}y\_\{j,t,i^\{\*\}\},&r\(y\_\{j,t,i^\{\*\}\}\)\\geq r\(x\_\{j,t\}\),\\\\ x\_\{j,t\},&\\text\{otherwise\}\.\\end\{cases\}This best\-of\-eight update is repeated for four editing steps before the subpopulations are merged\.

#### In\-Context RL\.

We maintain 512 independent histories containing program states, model responses, and observed rewards\. At steptt, trajectoryjjhas

Hj,t=\(\(xj,1,yj,1,rj,1\),…,\(xj,t−1,yj,t−1,rj,t−1\)\),H\_\{j,t\}=\\bigl\(\(x\_\{j,1\},y\_\{j,1\},r\_\{j,1\}\),\\ldots,\(x\_\{j,t\-1\},y\_\{j,t\-1\},r\_\{j,t\-1\}\)\\bigr\),which is included in the prompt used to generate the next response\. Histories are reset after four steps to limit context length\.

#### Execution Feedback\.

Execution Feedback appends the observed execution outputoto\_\{t\}to the program state supplied on the next model call\. Consequently, generation is conditioned on

yt,1,…,yt,N∼pθ\(⋅∣xt,ot;T\),y\_\{t,1\},\\ldots,y\_\{t,N\}\\sim p\_\{\\theta\}\(\\cdot\\mid x\_\{t\},o\_\{t\};T\),rather than on the program state alone\.

#### Auto Temp Add \(ATA\)\.

LetH0H\_\{0\}be the mean response entropy measured in the initial round andHtH\_\{t\}the entropy at roundtt\. ATA uses an additive temperature incrementδT\>0\\delta\_\{T\}\>0and updates the decoding temperature according to

Tt\+1=\{Tt\+δT,Ht<H0,Tt,Ht≥H0\.T\_\{t\+1\}=\\begin\{cases\}T\_\{t\}\+\\delta\_\{T\},&H\_\{t\}<H\_\{0\},\\\\ T\_\{t\},&H\_\{t\}\\geq H\_\{0\}\.\\end\{cases\}Temperature increases are retained in subsequent rounds\.

#### Auto Temp Scale \(ATS\)\.

ATS uses the same entropy criterion as ATA but uses a multiplicative temperature factorγT\>1\\gamma\_\{T\}\>1:

Tt\+1=\{γT​Tt,Ht<H0,Tt,Ht≥H0\.T\_\{t\+1\}=\\begin\{cases\}\\gamma\_\{T\}T\_\{t\},&H\_\{t\}<H\_\{0\},\\\\ T\_\{t\},&H\_\{t\}\\geq H\_\{0\}\.\\end\{cases\}Thus the magnitude of each adjustment scales with the current decoding temperature\.

#### Negative\-Enhanced Standardization \(NE\)\.

Following NGRPO, NE appends a hypothetical maximum valueRmaxR\_\{\\max\}to the ES fitness values before computing the normalization statistics\. For the antithetic reward differencesR1,…,RNR\_\{1\},\\ldots,R\_\{N\}, let

R′=\(R1,…,RN,Rmax\),R~i=Ri−μ⁡\(R′\)σ⁡\(R′\)\.R^\{\\prime\}=\(R\_\{1\},\\ldots,R\_\{N\},R\_\{\\max\}\),\\qquad\\widetilde\{R\}\_\{i\}=\\frac\{R\_\{i\}\-\\mu\(R^\{\\prime\}\)\}\{\\sigma\(R^\{\\prime\}\)\}\.The hypothetical value affects the normalization statistics but its standardized value is discarded before the ES update\. We evaluate NE both with and without antithetic sampling\.

#### Long\-Horizon ES\.

Long\-Horizon ES uses the same four\-step inner evolution procedure as Subpopulation Evolution, but assigns each parameter perturbation its final inner\-loop reward,

Ri\(4\)=r⁡\(xi,4\),R\_\{i\}^\{\(4\)\}=r\(x\_\{i,4\}\),rather than the reward from a single editing step\. The resultingRi\(4\)R\_\{i\}^\{\(4\)\}values are then used in the usual ES update, optimizing perturbations for performance after four program\-editing steps\.

#### Hill Climbing in Weight Space\.

For perturbationsθi=θ\+σ​ϵi\\theta\_\{i\}=\\theta\+\\sigma\\epsilon\_\{i\}, including the antithetic samples, Weight\-Space Hill Climbing selects

i∗=arg⁡maxi⁡r⁡\(θi\)i^\{\*\}=\\arg\\max\_\{i\}r\(\\theta\_\{i\}\)and adoptsθi∗\\theta\_\{i^\{\*\}\}only whenr⁡\(θi∗\)\>r⁡\(θ\)r\(\\theta\_\{i^\{\*\}\}\)\>r\(\\theta\); otherwise the current model is retained\. Unlike ES, it performs no weighted population update\. While ES removes perturbations via subtraction, Hill Climbing stores an extra copy of the prior best weights in GPU memory for exact parameter resetting\. We use exact parameter resetting so that the best score associated with the current model is consistently repeatable\.

相似文章

科学方程发现中的测试时缩放

arXiv cs.CL

本文研究了科学方程发现中的测试时缩放,将其表述为一个迭代搜索过程,并发现搜索宽度是在计算预算下提高性能和效率的主导分配参数。

通过采样引导与扩展LLMs的方案

arXiv cs.CL

本文提出了一个基于采样算法(如Sequential Monte Carlo和Replica Exchange)引导和扩展大型语言模型的理论框架,旨在无需外部监督即可提升生成质量。