At a glance
Amin Mansouri and colleagues at EPFL built EvoTune, which fine-tunes the language model inside evolutionary search instead of leaving it frozen. It beat the FunSearch baseline across bin packing, traveling salesman, flatpack and symbolic regression tasks, and cleared the best human score on a Google Hash Code problem.
A Google programming contest once asked teams to schedule jobs across a data center as efficiently as possible. The best human entrants scored 407. A seven-person research team reporting in a paper posted to arXiv in April, and published at COLM 2025, handed the same problem to a small open-source language model with a 10,000-attempt budget. It scored 418.
The margin matters less than how the model got there. Nearly every automated algorithm-discovery system built in the past two years borrows one trick: a large language model writes candidate code, a scorer runs it, and the best versions go back into the next prompt. The model itself never changes. It starts each round exactly as capable, and exactly as limited, as it was on the first day.
The EPFL-led team, whose second author is Amin Mansouri, a doctoral assistant in Caglar Gulcehre's lab at EPFL, kept the loop but let the model learn inside it. Their method, EvoTune, fine-tunes the language model with reinforcement learning using the scores of the programs it has just written. The search operator gets a little sharper every few hundred attempts.
The loop everyone left alone
Google DeepMind's FunSearch set the template in a Nature paper in December 2023. The system evolved small Python functions rather than whole solutions, which made the output legible to humans and easy to grade automatically. FunSearch found new constructions for the cap set problem in extremal combinatorics and better heuristics for online bin packing. The language model inside it — a version of PaLM 2 called Codey — was never trained on either problem. It was a generator, sampled up to a million times, and that was the point.
EvoTune, described in "Algorithm Discovery With LLMs: Evolutionary Search Meets Reinforcement Learning," argues that the arrangement throws away its own most valuable signal. Each cycle of the loop produces programs that scored well and programs that failed outright. That is a ranked dataset, generated for free, about what works on this specific problem. "Existing approaches treat the LLM as a static generator, missing the opportunity to update the model with the signal obtained from evolutionary exploration," the authors write.
The fix borrows a page from the alignment literature. Rather than train a separate reward model, the team feeds the evaluation scores directly back into the model's weights via Direct Preference Optimization, or DPO — a method that skips the reward model and learns from pairs of preferred and dispreferred outputs. The paper describes its use as off-policy, on inputs that are not fixed in advance, which is a departure from DPO's usual offline setting.
What one round actually does
The mechanics are less exotic than the name suggests, and worth walking through in order, because most of the design choices that decide whether the method works sit in the details.
- The model is prompted with two high-scoring programs from its database, paired with their scores, plus a plain-language description of the task. It writes a batch of new candidate programs and a short rationale for each.
- Every candidate is executed on a set of validation instances and scored. Programs that crash or time out are set aside as failures rather than silently dropped.
- The surviving programs are split into a higher-scoring half and a lower-scoring half, then randomly paired, with each output used at most once. Extra preference pairs match a failed program against a working one.
- The model is fine-tuned on those pairs, then the loop resumes with the improved model writing the next batch.
A useful comparison: a student grinding through practice exams but never looking at which answers were marked right. EvoTune makes the student review the marking scheme, and rewires the student rather than the notes. Because the reward is the program's own validated score, there is no learned proxy that can drift away from what the task actually measures.
The program database is organized into separate islands that evolve in isolation, following FunSearch. The code is public, and the project's documentation notes that most of the experiments ran on A100 GPUs with 80GB of memory — a reminder that this kind of research is still done in batches of expensive hardware, not on a laptop.
Photo by National Cancer Institute on Unsplash
Three tasks, and one uncomfortable comparison
The team tested on online bin packing, the traveling salesman problem, and flatpack, a packing problem where blocks must be placed on a grid to maximize covered area. Optimality gap is the metric throughout: the percentage by which a solution misses the best known answer, so lower is better.
On bin packing, at the largest sampling budget of 22,400 outputs, EvoTune beat the FunSearch baseline with all three models tested. The numbers below are from the held-out test set.
| Base model | FunSearch | EvoTune |
|---|---|---|
| Llama 3.2 1B Instruct | 3.45 | 3.13 |
| Phi 3.5 Mini Instruct | 2.92 | 2.59 |
| Granite 3.1 2B Instruct | 2.84 | 2.73 |
The Granite row is the honest one to look at. A tenth of a point of optimality gap is not the kind of result that rearranges a field. The Llama and Phi gaps are wider, and the pattern held across the validation-perturbed set and two smaller budgets, but the size of the gain depends heavily on which model you start from — a dependency the paper does not try to hide.
The starker comparison is against people. Both methods started from a well-known human heuristic — best-fit for bin packing, a greedy large-blocks-first rule for flatpack — and both improved on it. At a budget of 22,400 samples with a small open-source model, EvoTune reached an optimality gap of 2.06 on bin packing against 5.37 for the human starting point and 2.96 for FunSearch. On flatpack the three figures were 0.0829, 0.1092 and 0.0898 respectively.
For the traveling salesman problem the evolved program does not output tours. It writes the penalty heuristic inside Guided Local Search, a classical solver that repeatedly penalizes edges to escape local optima. EvoTune was trained with a deliberately tiny search budget of 20 local-search calls to keep evaluation time down, then deployed on 29 TSPLib instances it had never seen. Given the same budget as specialized solvers, it produced the best average across all 29.
The failure mode that kills self-improvement
Fine-tuning a model on its own best outputs tends to collapse it. Sample enough from the sharpened distribution and you get the same three programs in slightly different variable names, which is fatal for a system that depends on generating variety. The paper treats this as the central engineering problem rather than an afterthought.
Its answer is a specific variant of DPO. Standard implementations regularize with reverse Kullback-Leibler divergence, which concentrates probability mass on the good answers. The team used forward KL instead, which pushes the trained model to cover the reference model's distribution rather than narrow onto its peak. In an ablation on bin packing with Llama 3.2 1B, both variants beat FunSearch, but the forward-KL version found the single best program and produced more unique solutions.
Two other choices went the same way. A simpler alternative reinforcement learning method, ReST-EM, which repeatedly filters the database down to top samples and runs supervised fine-tuning on them, underperformed DPO at every learning rate tried and proved more sensitive to hyperparameters. Adding more worked examples to the prompt, a cheap in-context fix, produced no meaningful gain. The paper reports both dead ends plainly, which is more than most method papers do.
What the authors say is still missing
Their limitations section is short and specific, and worth quoting nearly in full: the experiments used models between 1 billion and 3.8 billion parameters and a sampling budget of at most 22,400 outputs. "Further scaling of both the model size and sampling budget is needed to fully understand the method's potential."
The second admission is about cost. EvoTune finds better programs within a fixed number of samples, but it pays for that with an extra training phase. Whether the trade is worth it depends on the ratio between training and inference expense at larger scales, which the paper flags as future work rather than settling. Sample efficiency and compute efficiency are different claims, and the headline result is the former.
There is also the venue question. The paper's own goal, stated in its appendix, was not to set records on these benchmarks — it used small open-source models by choice and treats the tasks as testbeds for the method. Any reading of the datacenter score as evidence that open models now out-engineer human contest teams should come with that caveat attached.
Photo by Markus Winkler on Unsplash
The grader is the whole ballgame
Every result in this paper depends on one precondition: a scoring function that can run the candidate code and return a number. Bin packing has it. Traveling salesman has it. Symbolic regression, the second benchmark suite where EvoTune also beat the baseline, has it. The Hash Code problems have it, which is why a language model could be measured against 407.
For problems without that, the method has nothing to climb. A department deciding which of two research programs to fund, a hiring committee reading files, a policy team weighing interventions — none of these return a clean scalar from a Python call, and no amount of reinforcement learning creates one. The scoring function is usually the hardest artifact to build, and it encodes whatever the designer decided to measure.
That constraint explains the shape of the field's recent progress, and where the caution belongs. DeepMind's AlphaEvolve, a Gemini-powered coding agent released in May 2025, found a way to multiply two 4×4 complex matrices with 48 scalar multiplications, beating a 49-multiplication result that had stood since 1969, and improved a bound on the kissing number problem in 11 dimensions. It did so inside the same architecture: generate code, grade it automatically, keep what scores higher. The paradigm is powerful and its boundary is sharp, and EvoTune's contribution is to make one part of the loop learn rather than just run.
Where the next test sits
Mansouri's own research page lists work on how models plan experiments, recognize their own uncertainty, and query structured scientific data — questions that sit immediately downstream of this one. A system that finds better heuristics is useful. A system that knows which experiment would settle a question is a different order of problem.
The immediate test for EvoTune is mundane and expensive: run it at ten times the model size with a budget large enough that the baseline stops improving. If the fine-tuning advantage shrinks to noise once FunSearch has 200,000 samples to work with, the method becomes a footnote. If it holds, the economics of automated discovery change, because the cost of finding a good algorithm starts to bend downward with use rather than staying flat.
The paper's closing line is careful. EvoTune, the authors write, "demonstrates the potential of combining the synergistic strengths of evolutionary search and reinforcement learning, paving the way for future advances in LLM-based algorithm discovery." Potential, not proof. The 418 is real and checkable. What it means for the next five years depends on whether anyone funds the experiment that tests the scaling claim — and whether, in the meantime, the graders people build are honest about what they reward.
- algorithm discovery
- EvoTune
- evolutionary search
- reinforcement learning
- large language models

