AlphaEvolve: A Gemini-powered coding agent for designing advanced algorithms
Key Points
- 1AlphaEvolve is an evolutionary coding agent powered by Gemini large language models that designs and optimizes algorithms by combining creative problem-solving with automated evaluation.
- 2The system has enhanced Google's computing ecosystem, improving data center efficiency, assisting in hardware design, and accelerating AI training by optimizing critical operations for significant speedups.
- 3AlphaEvolve has also advanced mathematics by discovering novel matrix multiplication algorithms and improving upon previously known solutions for open problems, such as establishing a new lower bound for the kissing number problem.
AlphaEvolve is an evolutionary coding agent powered by large language models (LLMs) designed for general-purpose algorithm discovery and optimization. Developed by Google, it combines the creative problem-solving capabilities of Gemini models with automated evaluators and an evolutionary framework to iteratively improve algorithmic solutions.
The core methodology of AlphaEvolve operates through a closed-loop system. Initially, a prompt sampler assembles a prompt for the integrated LLMs. AlphaEvolve leverages an ensemble of Gemini models: Gemini Flash is utilized to maximize the breadth of ideas explored, while Gemini Pro provides critical depth with insightful suggestions. These models collaboratively propose computer programs that implement algorithmic solutions as code. Subsequently, these newly generated programs are subjected to automated evaluators, which verify, run, and score them based on objective and quantifiable metrics such assessing accuracy and quality. The evaluated programs are then stored in a programs database. This database, acting as a repository for potential solutions, integrates an evolutionary algorithm that determines which programs will be selected and used for generating future prompts, thus continuously refining and improving the algorithmic search process. This iterative feedback loop allows AlphaEvolve to go beyond single function discovery, enabling it to evolve entire codebases and develop complex algorithms.
AlphaEvolve has demonstrated significant impact across Google's computing ecosystem and in advancing fundamental research:
- Optimizing Google's Computing Ecosystem:
- Data Center Scheduling: It discovered a heuristic for Borg, Google's large-scale cluster management system, recovering an average of 0.7% of Google's worldwide compute resources. This solution has been in production for over a year and offers operational advantages like interpretability and debuggability.
- Hardware Design: AlphaEvolve proposed a Verilog rewrite for a highly optimized matrix multiplication arithmetic circuit, removing unnecessary bits while maintaining functional correctness. This proposal was integrated into an upcoming Tensor Processing Unit (TPU), accelerating specialized chip design.
- AI Training and Inference: It sped up a vital matrix multiplication kernel in Gemini’s architecture by 23%, leading to a 1% reduction in Gemini's training time. It also significantly reduced the engineering time for kernel optimization from weeks to days. Furthermore, AlphaEvolve optimized low-level GPU instructions, achieving up to a 32.5% speedup for the FlashAttention kernel implementation in Transformer-based AI models.
- Advancing Mathematics and Algorithm Discovery:
- Matrix Multiplication Algorithms: Provided with a minimal code skeleton, AlphaEvolve designed components of a novel gradient-based optimization procedure. This led to the discovery of multiple new algorithms for matrix multiplication. Notably, it found an algorithm to multiply 4x4 complex-valued matrices using 48 scalar multiplications, improving upon Strassen’s 1969 algorithm, which had previously been considered the best for this setting. This finding surpassed AlphaTensor's prior work, which only found improvements for binary arithmetic for 4x4 matrices.
- Open Mathematical Problems: AlphaEvolve was applied to over 50 open problems in mathematical analysis, geometry, combinatorics, and number theory. In approximately 75% of cases, it rediscovered state-of-the-art solutions, and in 20% of cases, it improved upon the previously best-known solutions, making progress on corresponding open problems. For instance, it advanced the kissing number problem by discovering a configuration of 593 outer spheres, establishing a new lower bound in 11 dimensions.
The system's flexibility allowed setting up most mathematical experiments in a matter of hours. AlphaEvolve's general nature suggests its applicability to any problem whose solution can be described as an algorithm and automatically verified, with potential future applications in fields such as material science, drug discovery, and sustainability. Google plans an Early Access Program for selected academic users and is exploring broader availability, aiming to continue improving AlphaEvolve alongside the advancements in LLM coding capabilities.