Academic Jobs - Home of Higher Ed Logo

Research spotlight: Amin Mansouri on teaching AI to learn from the algorithms it discovers

9 min read12 Ansichten

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.

man sight on white microscope
Photo by Lucas Vasques on Unsplash

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.

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 modelFunSearchEvoTune
Llama 3.2 1B Instruct3.453.13
Phi 3.5 Mini Instruct2.922.59
Granite 3.1 2B Instruct2.842.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.

a close up of a typewriter with a paper on it

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

Browse nach Fakultät

Browse nach Thema

Frequently Asked Questions

🧠What is EvoTune in simple terms?

EvoTune is a method for getting a large language model to write better algorithms over time. It keeps the standard evolutionary search loop, where the model proposes small programs and a scorer grades them, but adds a training step. Using the scores of the programs it has just written, the model's weights are updated with reinforcement learning before the next round begins. In the paper, the search operator is no longer static, which is the whole point.

🎓Who is Amin Mansouri and what is his role in this work?

Amin Mansouri is a doctoral assistant and PhD candidate in computer science at EPFL in Lausanne, Switzerland, working in Caglar Gulcehre's CLAIRE lab and Philippe Schwaller's LIAC lab. He is the second author of "Algorithm Discovery With LLMs: Evolutionary Search Meets Reinforcement Learning," after lead author Anja Surina, alongside Lars Quaedvlieg, Amal Seddas, Maryna Viazovska, Emmanuel Abbe and Caglar Gulcehre. He holds an MSc from Mila and the Universite de Montreal and a BSc in electrical engineering from Sharif University of Technology.

🔁How does EvoTune differ from Google DeepMind's FunSearch?

FunSearch, published in Nature in December 2023, pairs a frozen language model with an automatic evaluator and evolves small Python functions. The model is sampled repeatedly but never trained on the results. EvoTune keeps FunSearch's island-based program database and prompting scheme, then adds a direct preference optimization step that updates the model using scores from its own generated programs. The authors describe this as the first tight integration of LLM-based evolutionary search with reinforcement learning inside the loop.

📊Which benchmarks did the researchers use?

Three combinatorial optimization tasks form the core: online bin packing, the traveling salesman problem and flatpack. The team extended testing to two Google Hash Code programming competition problems and two symbolic regression tasks from the LLM-SR benchmark suite. Performance is reported as optimality gap, meaning the percentage by which a solution misses the best known result, so lower numbers are better.

📈What were the main results on bin packing?

On the held-out test set at the largest sampling budget of 22,400 outputs, EvoTune reached an optimality gap of 3.13 with Llama 3.2 1B Instruct against 3.45 for FunSearch. With Phi 3.5 Mini the figures were 2.59 and 2.92, and with Granite 3.1 2B they were 2.73 and 2.84. The advantage was consistent but its size varied by model, and the authors are careful to present the runs as evidence the approach works rather than as a benchmark record.

⚖️How did EvoTune do against human-designed heuristics?

Both methods started from established human heuristics and both improved on them using a small open-source model with a 22,400-sample budget. On bin packing, the best-fit heuristic scored an optimality gap of 5.37, FunSearch reached 2.96 and EvoTune reached 2.06. On flatpack the figures were 0.1092 for the human greedy heuristic, 0.0898 for FunSearch and 0.0829 for EvoTune.

💻What happened on the Google Hash Code problem?

On the Datacenter Optimization task, EvoTune scored 418, surpassing the competition's top human score of 407. FunSearch also beat the human baseline with 414 but did not reach EvoTune's peak. Both methods were given a budget of 10,000 generated functions for that task, which makes the comparison unusually clean.

🎯Why does output diversity matter so much here?

Evolutionary search only works if the model keeps producing genuinely different programs. Fine-tuning on a model's own high-scoring outputs tends to collapse that variety, so the search stalls. The team used a forward Kullback-Leibler regularized form of direct preference optimization instead of the more common reverse variant, which spreads probability rather than concentrating it. In an ablation on bin packing, the forward version found the single best program and generated more unique solutions than both the reverse variant and the untrained baseline.

⚠️What limitations do the authors acknowledge?

Two are stated explicitly in the conclusion. The experiments used models from 1 billion to 3.8 billion parameters with sampling budgets up to 22,400 outputs, so scaling behavior remains unknown. And while EvoTune finds better programs within a fixed sample budget, it pays extra compute for the reinforcement learning phase, leaving the trade-off between training and inference cost unresolved, especially at larger scale.

🧭What kinds of problems can this approach not handle?

Any problem without a reliable automatic scorer. Every step of the loop requires executing a candidate program and returning a numeric reward, which is why bin packing, routing and symbolic regression fit and why questions of judgment or strategy do not. Building that grader is usually the hardest and least discussed part of the pipeline, and it silently defines what the system optimizes for.

🧪Did other reinforcement learning methods work as well?

No. The team also tested ReST-EM, an offline method that filters the program database down to top-scoring samples and applies supervised fine-tuning. It improved on the untrained baseline but underperformed direct preference optimization at every learning rate tried, and was more sensitive to hyperparameter choice. Attempts to boost performance by packing more examples into the prompt produced no considerable improvement.

🔍Where can I read the full paper and code?

The paper is on arXiv at arxiv.org/abs/2504.05108 and runs 29 pages including appendices. The implementation is released publicly by the CLAIRE lab, and the project documentation notes that most experiments were run on A100 GPUs with 80GB of memory.