Skip to content
Navigation Menu
Appearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Repository navigation
NotificationsYou must be signed in to change notification settings
Star79 (79)You must be signed in to star a repository
No description, website, or topics provided.
Apache-2.0 license
Contributing
Custom properties
Report repository
BranchesTags
Open more actions menu
Latest commit
Folders and files
Last commit message
Last commit date
matmul_tensor_decompositions
CONTRIBUTING.md
View all files
Repository files navigation
This repository accompanies the paper:
AlphaEvolve: A coding agent for scientific and algorithmic discovery.
There are the following directories:
/src contains a minimal implementation of AlphaEvolve with local evaluation.
/omega contains code and data related to the new upper bound on the matrix
multiplication exponent discovered by AlphaEvolve. It includes a Colab notebook
for rigorous verification using rational arithmetic, and a level_3/
subdirectory with the gradient-based optimisation code at recursion depth 3:
level_3/final_program.py — the optimisation program evolved by
AlphaEvolve. It builds a differentiable upper-bound model in JAX/Haiku,
runs gradient descent over 32k steps with 32 random seeds, and converts the
best solution into a format suitable for verification. Run it directly with
python3 final_program.py.
level_3/verification.py — a NumPy/SciPy verifier that takes a flat
parameter vector produced by the optimiser and evaluates the proven omega
upper bound. It uses floating-point arithmetic for fast hill-climbing; the
companion Colab notebook uses rational arithmetic for a rigorous proof.
A requirements.txt listing the pinned Python dependencies and a
Dockerfile for containerised execution are also provided in level_3/.
/maths contains the initial programs, discovered results, and verification
code for the mathematical problems on which AlphaEvolve found a solution
outperforming the state-of-the-art (see the "Results" section of the paper).
There is a subfolder for each of such problems, each containing the files needed
to run an AlphaEvolve experiment and a Colab notebook to verify the found
construction.
/matmul_tensor_decompositions contains Colab notebooks with the
decompositions of matrix multiplication tensors across the matrix sizes for
which the gradient-based optimization method from AlphaEvolve found a solution
outperforming the state-of-the-art, along with the code to verify their
correctness. Specifically, there are two Colabs: one for the standard tensor
rank decomposition, and another one for the support rank.
Installation
For the folders /maths and /matmul_tensor_decompositions, no
installation is required. The provided notebooks can be opened and run in Google
For the folder /src, these are the installation instructions:
Install docker (required for program evaluation): https://www.docker.com/get-started/
(optional) Create venv:
sudo apt-get install virtualenv python3-venv
virtualenv -p python3.11 alpha_evolve
source alpha_evolve/bin/activate
Install pip dependencies:
pip install -r src/requirements.txt
Set Gemini API key:
export GEMINI_API_KEY=<your_api_key>
/omega: The Colab notebook to verify the new upper bound on the matrix
multiplication exponent can be opened via:
Note: To verify our best omega upper bound, you must download the
clean_level4.npz.xz file from this repository to your local machine,
and then upload it when prompted by the Colab notebook.
/maths: The Colab notebook to verify the found solution for each problem can be opened via:
Circle packing:
Erdös minimum overlap:
First autocorrelation inequality:
Second autocorrelation inequality:
Third autocorrelation inequality:
Heilbronn problem for convex regions:
Heilbronn problem for triangles:
Hexagon packing:
Kissing numbers:
Max to min ratio:
Sums and differences:
Uncertainty principles (Hermite polynomials approach):
Uncertainty principles (Laguerre polynomials approach):
Extremal girth 5:
Shannon capacity of cycle graphs:
/matmul_tensor_decompositions: There are two Colab notebooks:
Standard rank:
Support rank:
/src: We provide an example launch command (for the circle packing problem) below:
python run.py --problem_config=./data/problem_config/circle_packing.yaml
DISCLAIMER: AlphaEvolve involves the execution of code generated by Large
Language Models (LLMs). LLM-generated code is intrinsically unpredictable and
should be handled as untrusted code. In this version of AlphaEvolve, this code
is run in a Docker sandbox as an isolation measure. However, despite sandboxing,
the potential for unintended behavior, resource misuse, or security
vulnerabilities cannot be fully eliminated. All users should be aware of these
inherent risks and understand that they use this software at their own
discretion. Google DeepMind shall not be liable for any claims, damages, or
other liability arising from the execution of LLM-generated code.
Citing this work
If you use the code or data in this package, please cite:
@misc{novikov2025alphaevolve,
title={{AlphaEvolve}: A coding agent for scientific and algorithmic discovery},
author={Alexander Novikov and Ng{\^a}n V{\~u} and Marvin Eisenberger and Emilien Dupont and Po-Sen Huang and Adam Zsolt Wagner and Sergey Shirobokov and Borislav Kozlovskii and Francisco J. R. Ruiz and Abbas Mehrabian and M. Pawan Kumar and Abigail See and Swarat Chaudhuri and George Holland and Alex Davies and Sebastian Nowozin and Pushmeet Kohli and Matej Balog},
year={2025},
eprint={2506.13131},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2506.13131},
License and disclaimer
Copyright 2026 Google LLC
All software is licensed under the Apache License, Version 2.0 (Apache 2.0);
you may not use this file except in compliance with the Apache 2.0 license.
You may obtain a copy of the Apache 2.0 license at:
https://www.apache.org/licenses/LICENSE-2.0
All other materials are licensed under the Creative Commons Attribution 4.0
International License (CC-BY). You may obtain a copy of the CC-BY license at:
https://creativecommons.org/licenses/by/4.0/legalcode
Unless required by applicable law or agreed to in writing, all software and
materials distributed here under the Apache 2.0 or CC-BY licenses are
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the licenses for the specific language governing
permissions and limitations under those licenses.
This is not an official Google product.
Contributors
You can’t perform that action at this time.