Skip to main content
Back

Hill Sampling Beats AlphaEvolve on Math With 8 GPUs and Frozen Weights

A new paper introduces Hill Sampling, a minimalist test-time search that beats AlphaEvolve and evolutionary weight training on hard math problems.

Pro

Paper, Full Access
  • New paper introduces Hill Sampling: repeatedly edit the best program found so far with a frozen LLM.
  • Sets state of the art on circle packing among published methods, beats AlphaEvolve on Erdos' minimum-overlap.
  • Results achieved in hours on 8 NVIDIA H100 GPUs across three open-weight models.
  • Largest study of evolution strategies on LLM weights at test time to date.
  • Training weights at test time was worse than a zero learning rate baseline.
  • Simple rule: exhaust repeated edit sampling before adding archives, diversity, or weight updates.

Researchers Jacob Beck, Philip V. Ogren, and Ari Kobren report that a frozen large language model can outperform more elaborate search systems by repeatedly editing its best verified program. Their method, Hill Sampling, produced a new published result for circle packing, improved on an AlphaEvolve reference for an open Erdős problem, and ranked among the leading methods for a finite-set problem.

The experiments used eight NVIDIA H100 GPUs for a few hours and tested three open-weight models. For developers building verifiable discovery systems, the results support a lean baseline: keep one incumbent program, generate edits, score them automatically, and preserve only improvements.

Why LLM search became complicated

Verifiable problems give every candidate a dependable automatic score. Examples include optimization programs, mathematical constructions, and code whose output can be checked without human review. This feedback allows an inference system to spend additional compute generating, testing, and refining answers.

Systems such as DeepMind’s AlphaEvolve maintain populations of programs, preserve diverse candidates, and coordinate several evolutionary stages. Other approaches perturb an LLM’s weights during inference, score the resulting models, and update the parameters toward better-performing perturbations.

Beck, Ogren, and Kobren compare those approaches across circle packing in a unit square, sums and differences of finite sets, and Erdős’s minimum-overlap problem. Each benchmark converts a proposed construction into a numeric fitness score, allowing the search loop to accept or reject candidates automatically.

One incumbent, one acceptance rule

Each Hill Sampling iteration stores the highest-scoring program found so far and uses it as the context for the next edit. The model’s parameters remain fixed throughout the run.

  1. Initialize an incumbent program and calculate its verifier score.
  2. Prompt the frozen LLM to edit that program.
  3. Run the candidate through the same verifier.
  4. Replace the incumbent when the candidate earns a higher score.
  5. Repeat until the sample or compute budget is exhausted.

State consists of one program and its score. The loop uses no candidate population, diversity archive, novelty reward, crossover operation, or test-time fine-tuning. Token sampling supplies variation, while the incumbent carries successful changes into subsequent prompts.

Three benchmarks under a compact compute budget

Across the paper’s experiments, the greedy edit loop matched or exceeded systems with more search machinery. Exact objective values and model-level breakdowns appear in the paper; the reported outcomes are summarized below.

Benchmark Reported outcome Main comparison
Circle packing in a unit square New best result among the published methods evaluated Repeated sampling and evolution-strategy variants
Erdős’s minimum-overlap problem Higher score than the AlphaEvolve reference AlphaEvolve
Sums and differences of finite sets Top-tier result in the paper’s comparison Leading search baselines
Bar chart comparing maximum circle-packing fitness for Hill Sampling, repeated sampling, and evolution-strategy variants
Maximum circle-packing fitness reported for Hill Sampling and the evaluated baselines.

At a 512-sample budget, Hill Sampling achieved higher maximum fitness than repeated sampling, which generates independent candidates from the base model without carrying forward the best program. It also exceeded every evolution-strategy configuration included in the ablation.

Frozen weights beat test-time training

Evolution strategies optimize parameters without gradients. The tested procedure adds random noise to model weights, evaluates programs generated by each perturbed copy, and uses the scores to calculate a parameter update favoring better perturbations. The authors describe their experiment as the largest study of this approach on LLM weights by parameter count.

The zero-learning-rate control continued to draw fresh weight perturbations but applied no persistent parameter update. That control outperformed configurations that learned from the perturbation scores, indicating that the updates reduced search quality under the tested conditions.

Ordinary token sampling from a frozen model provided stronger exploration than weight perturbations, while conditioning each edit on the incumbent improved results further. The evidence is specific to these verifiable optimization tasks, models, and compute budgets.

Start with the smallest useful loop

Developers can use Hill Sampling as a baseline before adding orchestration that increases implementation cost or inference overhead.

  • Condition each generation on the best verified program found so far.
  • Keep the model checkpoint frozen during the initial evaluation.
  • Compare methods under equal candidate, verifier, and hardware budgets.
  • Add archives or diversity controls when measured plateaus justify them.
  • Require direct task-level evidence before introducing weight updates.
  • Log prompts, candidate programs, scores, failures, and acceptance decisions.

Equal-budget comparisons are essential because a richer search system can appear stronger after receiving more candidates, verifier calls, or wall-clock time. Maximum score, score progression, failure rate, and compute consumption provide a clearer comparison than the final score alone.

Where the greedy loop can fail

Automatic verification defines the method’s practical scope. The evaluator must be reliable, fast enough to run repeatedly, and difficult for generated code to exploit. Open-ended writing, subjective reasoning, and tasks with expensive or ambiguous rewards do not provide the same search signal.

Greedy acceptance can trap the search at a local optimum because every future edit descends from one incumbent. Population-based methods may recover alternatives that Hill Sampling discards, particularly when useful changes temporarily lower the score or require several coordinated edits.

Noisy evaluators also create a risk of promoting candidates that benefited from measurement variance. Repeated scoring, fixed seeds, confidence thresholds, or held-out verification can reduce that risk. Systems executing generated programs additionally need sandboxing, resource limits, deterministic interfaces, and timeouts.

Reproduction still needs specifics

The paper on arXiv contains the method and experimental results. Its abstract does not announce a code repository, and the available summary does not identify the three open-weight models.

A faithful reproduction requires the model checkpoints, prompts, decoding settings, initialization programs, verifier implementations, sample budgets, random seeds, and exact wall-clock duration. The reported eight-H100 setup establishes the hardware scale, while those additional details determine cost and comparability across inference stacks.