Source-linked AI summary
AlphaEvolve: A coding agent for scientific and algorithmic discovery
Alexander Novikov, Ngân Vũ, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco J. R. Ruiz, Abbas Mehrabian, M. Pawan Kumar, Abigail See, Swarat Chaudhuri, George Holland, Alex Davies, Sebastian Nowozin, Pushmeet Kohli, Matej Balog
TL;DR
AlphaEvolve addresses the challenge of automating discovery processes for difficult scientific, mathematical, and computational problems. It combines LLM-based code generation with evolutionary search and automated evaluation, producing improvements across mathematical constructions and Google’s compute infrastructure, including a 48-multiplication procedure for 4 × 4 complex-valued matrix multiplication.
Problem
High-value scientific and algorithmic discoveries require extended ideation, exploration, experimentation, backtracking, and validation, motivating automation of significant parts of this process.
Method
AlphaEvolve evolves algorithmic programs proposed by LLMs, using feedback from automated code execution and evaluation to improve a candidate pool.
Results
AlphaEvolve matched the best known constructions on approximately 75% of over 50 mathematical problems and surpassed the state of the art on approximately 20%, while also improving Google compute-stack components.
Takeaways & Limitations
Combining state-of-the-art LLMs with automated evaluation can yield new discoveries on longstanding mathematical problems and practical improvements to highly optimized compute stacks.
Takeaways & Limitations
AlphaEvolve is limited to problems for which an automated evaluator can be devised, leaving some naturally experimental domains only partly covered.
Abstract
from arXiv · showhide
In this white paper, we present AlphaEvolve, an evolutionary coding agent that substantially enhances capabilities of state-of-the-art LLMs on highly challenging tasks such as tackling open scientific problems or optimizing critical pieces of computational infrastructure. AlphaEvolve orchestrates an autonomous pipeline of LLMs, whose task is to improve an algorithm by making direct changes to the code. Using an evolutionary approach, continuously receiving feedback from one or more evaluators, AlphaEvolve iteratively improves the algorithm, potentially leading to new scientific and practical discoveries. We demonstrate the broad applicability of this approach by applying it to a number of important computational problems. When applied to optimizing critical components of large-scale computational stacks at Google, AlphaEvolve developed a more efficient scheduling algorithm for data centers, found a functionally equivalent simplification in the circuit design of hardware accelerators, and accelerated the training of the LLM underpinning AlphaEvolve itself. Furthermore, AlphaEvolve discovered novel, provably correct algorithms that surpass state-of-the-art solutions on a spectrum of problems in mathematics and computer science, significantly expanding the scope of prior automated discovery methods (Romera-Paredes et al., 2023). Notably, AlphaEvolve developed a search algorithm that found a procedure to multiply two $4 \times 4$ complex-valued matrices using $48$ scalar multiplications; offering the first improvement, after 56 years, over Strassen's algorithm in this setting. We believe AlphaEvolve and coding agents like it can have a significant impact in improving solutions of problems across many areas of science and computation.
1. Introduction
AlphaEvolve combines LLM-based code generation with evolutionary search and automated evaluation to address scientific, mathematical, and engineering discovery problems. The paper reports broader, higher-scale algorithm evolution than prior systems, including new mathematical constructions and improvements to computational infrastructure.
- Approach: AlphaEvolve uses LLMs to generate, critique, and evolve algorithmic candidates, grounding the process in code execution and automatic evaluation.Automatic evaluation helps reject incorrect suggestions from the base LLM.
- Approach: Its evolutionary process can discover candidates substantially different from the initial pool in both syntax and function.The approach applies when algorithms are the direct goal or describe how another solution is constructed or found.
- Positioning: AlphaEvolve evolves larger and more complex code spanning multiple functions and components than earlier evolutionary coding systems.The paper characterizes this expansion as going beyond predecessors in scale and generality.
- Algorithm design: 48 scalar multiplications suffice for AlphaEvolve’s discovered procedure for multiplying 4 × 4 complex-valued matrices, improving Strassen’s algorithm.The matrix-multiplication results cover 14 algorithms.
- Mathematical discovery: 20% of over 50 mathematical problems yielded new constructions that surpassed the state of the art, while 75% matched the best known constructions.Examples include improved constructions for the Minimum Overlap and 11-dimensional Kissing Numbers problems.
- Engineering applications: The engineering applications span Google cluster scheduling, LLM-training matrix-multiplication kernels, TPU arithmetic circuits, and Transformer attention runtime.These components run repeatedly over long periods, making efficiency improvements valuable.
2. AlphaEvolve
AlphaEvolve is an evolutionary coding agent that develops programs for user-specified tasks through LLM-generated modifications, automated evaluation, and iterative selection. Its flexible abstraction and prompting mechanisms support evolving code components, solution constructors, or search algorithms.
- 2. AlphaEvolve: AlphaEvolve orchestrates an evolutionary algorithm that develops programs improving scores on task-specific automated evaluation metrics.The agent combines an autonomous computation pipeline with LLM queries and produces algorithms addressing a user-specified task.
- 2.1. Task specification: The user supplies an initial program, marks components for evolution, and provides evaluation code that scores generated solutions.Evolution blocks provide the initial solution, while the remaining code forms a skeleton connecting evolved components to the evaluation function.
- 2.1. Task specification: AlphaEvolve can represent the evolving candidate as raw output, a constructor function, or a bespoke search algorithm, depending on the problem.Different abstraction levels are hypothesized to suit different solution structures: constructor functions for highly symmetric solutions and customized search algorithms for non-symmetric ones.
- 2.2. Prompt sampling: Prompt samplers combine previously discovered programs with instructions and optional task-specific context to guide diverse code modifications.Users can add equations, code snippets, literature, stochastic formatting, and rendered evaluation results to the prompts.
- 2.3. Creative generation: LLMs usually return targeted diff blocks that replace exact code segments, while complete code-block output is available for short or rewrite-oriented changes.The search and replacement segments identify the original code and its replacement, enabling localized updates.
- 2.3. Creative generation: An ensemble of Gemini 2.0 Flash and Gemini 2.0 Pro balances candidate-generation throughput with the quality of proposed solutions.Flash enables lower-latency generation and more ideas per unit time, while Pro contributes higher-capability proposals.
- 2.4. Evaluation: Each proposed solution is automatically evaluated, and evaluation mechanisms can be configured to make scoring more flexible and efficient.The core process executes the user-provided evaluation function on generated solutions before selecting ideas for future generations.
3. Results
AlphaEvolve produced improvements across mathematical discovery and Google’s computational infrastructure, including new matrix multiplication algorithms, mathematical constructions, scheduling heuristics, and kernel optimizations.
- Faster matrix multiplication: 14 matrix multiplication targets saw state-of-the-art improvements, including a rank-48 algorithm for multiplying two 4 × 4 complex-valued matrices.This was the first rank-48 algorithm for this setting after 56 years, improving on Strassen’s rank-49 algorithm over characteristic-0 fields.
- Mathematical discovery: In 11 dimensions, AlphaEvolve found a kissing-number configuration of 593 non-overlapping unit spheres touching a central sphere, surpassing the previous record of 592.It also achieved new results on several packing problems involving points, polygons, and Heilbronn-type configurations.
- Data center scheduling: AlphaEvolve’s scheduling heuristic recovered an average 0.7% of Google’s fleet-wide compute resources that would otherwise have remained stranded.The heuristic was evaluated on simulated and unseen workloads, then deployed across Google’s fleet, where postdeployment measurements confirmed the simulator results.
- Gemini kernel engineering: The discovered kernel heuristic delivered an average 23% speedup across kernels and reduced Gemini’s overall training time by 1% compared with the existing expert-designed heuristic.Kernel optimization time fell from several months of dedicated engineering effort to days of automated experimentation, and the heuristic was deployed in production.
- Hardware and runtime optimization: AlphaEvolve optimized additional infrastructure components by finding a TPU arithmetic-circuit rewrite and speeding up FlashAttention by 32% and input-output preprocessing by 15%.The TPU rewrite targeted area and power reduction while preserving functionality and required robust verification; the attention optimizations operated at two IR abstraction levels.
4. Ablations
AlphaEvolve’s ablations test evolutionary search, prompt context, meta-prompt evolution, and full-file evolution across tensor decomposition and kissing-number tasks. The all-inclusive system substantially outperforms alternatives, with each component contributing significantly.
- Ablation setup: Ablations evaluate AlphaEvolve on tensor decomposition for faster matrix multiplication and lower-bound computation for kissing numbers.Figure 8 averages performance over considered targets as compute increases, with variability shown across three independent runs.
- Evolutionary approach: The evolutionary approach reuses previously generated programs, whereas “No evolution” repeatedly feeds the initial program to the language model.This comparison tests whether iterative population-based improvement matters beyond repeated generation from the same starting point.
- Prompt design: Prompt context is tested by comparing AlphaEvolve with an alternative that adds no explicit problem-specific context.The study treats context as a potentially important use of the language models’ large context windows.
- System components: Additional ablations disable meta-prompt evolution, restrict evolution to the loss function, or use only a single small base model.These alternatives test meta prompts, full-file evolution, and the mixture of small and large language models.
- Findings: Figure 8 shows that each tested component is responsible for a significant improvement in results.The comparison includes the all-inclusive AlphaEvolve approach and the listed alternatives.
5. Related work
Related work spans evolutionary programming, LLM-guided scientific discovery, and code superoptimization. AlphaEvolve extends these lines through LLM-directed evolution of programmatic candidates, broader codebase support, richer models and context, and automated evaluation.
- Evolutionary methods: Classical evolutionary programming has been applied to symbolic regression, scientific and algorithmic discovery, and scheduling, but handwritten mutation operators can be difficult to design.AlphaEvolve uses LLMs to construct mutation operators instead of predefining allowed operations.
- LLM-guided evolution: AlphaEvolve extends FunSearch from single-function evolution toward entire codebases, multiple programming languages, multiobjective optimization, and richer LLM context and feedback.FunSearch used relatively small code-trained models and optimized a single objective function.
- LLM-guided evolution: Prior LLM-guided evolution has addressed robot policies, code synthesis, symbolic regression, combinatorial heuristics, and molecular structures.These efforts establish related applications across robotics, programming, science, and optimization.
- Superoptimization and algorithm discovery: Earlier algorithm-discovery and superoptimization methods include systematic enumeration, genetic search, Monte Carlo sampling, deep reinforcement learning, and LLM agents.AlphaEvolve is positioned as an evolutionary coding approach within this broader superoptimization lineage.
- AI for scientific discovery: AI systems and LLM-based methods have targeted discovery across materials science, chemistry, bioinformatics, geoscience, quantum physics, and other scientific disciplines.Many methods automate stages such as hypothesis generation, ranking, experimental planning, execution, or data analysis.
- AI for scientific discovery: AlphaEvolve differs from many scientific-discovery systems by representing hypotheses as programs and evaluating them with programmatic metrics.This contrasts with approaches that represent hypotheses and evaluation criteria in natural language.
6. Discussion
AlphaEvolve combines frontier LLMs with automated evaluation in an evolutionary framework to improve mathematical problems and computational infrastructure. Its scope is broad, but it depends on evaluators and currently yields moderate, slow feedback loops for self-improvement.
- Implications: AlphaEvolve combines state-of-the-art LLMs with automated evaluation and evolutionary search to produce discoveries on mathematical problems and optimized compute stacks.The discussion presents this combination as supporting both scientific and practical improvements.
- Search strategies: AlphaEvolve can search directly for solutions, evolve constructive functions, or evolve search algorithms, with different approaches introducing different biases.Constructive functions may favor highly symmetric objects, so the choice can suit the problem.
- Test-time compute: The evolutionary procedure enhances the base LLM through test-time compute and machine feedback beyond repeated sampling.The paper describes this as enabling scaling to scientific discoveries and valuable practical optimizations.
- Scope and outlook: Current gains are moderate, and feedback loops for improving future AlphaEvolve versions operate on the order of months.The discussion anticipates greater value from establishing more environments with robust evaluation functions.
- Limitations: AlphaEvolve’s main limitation is that it requires problems for which an automated evaluator can be devised.This excludes or constrains settings involving experiments that cannot be simulated or automated, including parts of the natural sciences.
Author information
The paper lists equal-contribution authors, assigns responsibilities across implementation, applications, writing, figures, and coordination, and identifies three corresponding authors.
- Contributions: Alexander Novikov, Ngân Vũ, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, and Matej Balog contributed equally.The author-information section explicitly identifies these equal contributors.
- Contributions: Contributors handled system design, project vision, practical applications, benchmark implementation, code reviews, writing, figures, and the accompanying Google Colab.The listed roles span implementation, research coordination, and paper production.
- Correspondence: Matej Balog, Alexander Novikov, and Pushmeet Kohli are the corresponding authors.The paper identifies these three authors for correspondence.
A. Faster matrix multiplication: Full results
AlphaEvolve evaluated matrix-multiplication programs across 54 targets, matching or surpassing the best known rank in all but two cases. It produced exact decompositions and a rank-48 algorithm for multiplying two 4 × 4 matrices.
- Experimental setup: The full matrix-multiplication experiment focused on sorted dimensions because permutations of tensor axes yield equivalent algorithms.The considered sizes roughly represented ⟨m, n, p⟩ with 2 ≤ m, n ≤ 5 and a cutoff for p.
- Full results: In all but two considered sizes, AlphaEvolve discovered programs that matched or surpassed the best known rank.The authors report that larger sizes often exhausted evaluator memory beyond ⟨5, 5, 5⟩, requiring further optimization.
- Full results: 54 targets were evaluated, with AlphaEvolve matching the state of the art in 38 cases, surpassing it in 14, and falling behind in 2.All discovered algorithms used integer or half-integer decomposition entries.
- 4 × 4 matrices: For 4 × 4 matrices, the discovered complex-valued decomposition supports exact multiplication of complex or real-valued matrices.The decomposition is represented by a program that discovers a rank-48 tensor decomposition.
B.4. An uncertainty inequality
AlphaEvolve improved several upper bounds in the uncertainty inequality by searching structured test functions and refining their constants. Its refined approach reduced the reported bound for C4 to 0.3216.
- Results: C4 ≤ 0.3521 was obtained using a linear combination similar to prior work but with refined constants found by AlphaEvolve.The prior upper bound was stated as 0.353, while rounding its solution to four digits gives 0.3523.
- Method: The test-function method bounds C4 by calculating A(f)A(f̂) for a function satisfying the problem’s conditions.The test function is sought as P(x)e^-πx^2, with P an even linear combination of Hermite polynomials.
- Method: Hermite-polynomial symmetry makes f̂ have the same polynomial-Gaussian form, so the bound becomes C4 ≤ (A(f))^2.Under the stated positivity condition, A(f) and A(f̂) correspond to the largest positive root of P.
- Method: AlphaEvolve refined coefficients for a three-term Hermite expansion to approximately [0.32925, −0.01159, −8.9216 × 10^-5].The largest positive root is obtained from P(x)/x^2 before calculating the resulting bound.
- Results: 0.3216 is the refined constant reported after incorporating a similar, more refined approach from recent work into AlphaEvolve.The earlier refined approach gave 0.3284 before AlphaEvolve further improved the reported constant.
B.6. Sums and differences of finite sets
AlphaEvolve found improved constructions for finite-set sum–difference bounds and geometric packing problems. It also reduced the outer-hexagon side lengths needed to pack 11 and 12 unit hexagons.
- Sums and differences: The sum–difference problem concerns arbitrarily large finite integer sets whose difference set is large relative to their sumset.C6 is the largest constant for which the stated asymptotic relation holds.
- Sums and differences: 1.1479 ≤ C6 and 1.1584 ≤ C6 are new lower bounds obtained from sets of sizes 2003 and 54265, respectively.The sets satisfy the stated difference-set condition and improve the lower bound for the sum–difference constant.
- Packing constructions: 3.931 and 3.942 are improved outer-hexagon side lengths for packing 11 and 12 unit hexagons, respectively.The previous best known side lengths were 3.943 and 4.0.
- Packing constructions: The packing task minimizes the side length of a regular hexagon containing n disjoint regular unit-side hexagons.AlphaEvolve’s arrangements for n = 11 and n = 12 are shown in Figure 11.
B.8. Minimizing the ratio of maximum to minimum distance
AlphaEvolve discovered constructions improving bounds for point configurations that minimize the ratio of maximum to minimum pairwise distance. The reported improvements cover both two- and three-dimensional cases.
- Problem setup: The objective is to place n points in d-dimensional space while minimizing the ratio between maximum and minimum pairwise distances.AlphaEvolve found two new constructions improving the best known bounds.
- Point-distance ratios: 12.889266112 improves the best known 2D bound of 12.890 for 16 points.The figure reports this as the ratio of maximum to minimum distance, while the cited reference uses the square of the ratio convention.
- Point-distance ratios: The reported constructions target 16 points in 2 dimensions and 14 points in 3 dimensions.Figure 12 presents the two configurations alongside their distance-ratio values.
- Point-distance ratios: 4.165849767 improves the best known 3D bound for 14 points.The corresponding construction is shown in Figure 12.
B.11. Kissing number in dimension 11
AlphaEvolve improved the best known lower bound for the kissing number in dimension 11 from 592 to 593 by finding a certifying point configuration. The configuration yields 593 non-overlapping unit spheres tangent to a central unit sphere.
- 593 improves the best known lower bound for the dimension-11 kissing number from 592.The kissing number counts disjoint unit spheres tangent to a given unit sphere.
- AlphaEvolve found 593 non-zero 11-dimensional integral-coordinate points whose maximum norm is smaller than their minimum pairwise distance.This condition is used to certify the kissing configuration.
- Points of norm 2 produce spheres tangent to the unit sphere at the origin, while the pairwise-distance condition prevents overlap.The non-overlap proof reduces to an inner-product inequality established in equation (4).
B.13. Packing circles inside a rectangle of perimeter 4 to maximize sum of radii
AlphaEvolve found a new construction for packing 21 disjoint circles in a rectangle of perimeter 4 while maximizing their total radii. The construction improves the state of the art from 2.364 to 2.3658.
- 2.3658 is the new sum-of-radii bound for 21 circles packed in a perimeter-4 rectangle, improving the state of the art from 2.364.The construction is shown in Figure 14 (right).
- 21 disjoint circles are packed inside a rectangle of perimeter 4 while maximizing the sum of their radii.The problem objective is the total radius across all packed circles.
- Figure 14 (right) depicts the new 21-circle construction and reports a sum of radii at least 2.365.