Autonomous Optimization of Numerical Algorithms by an AI Agent: Application to Atomistic Simulation
Organizations: Center for Artificial Intelligence and Natural Sciences, Korea Institute for Advanced Study, 85 Hoegiro, Dongdaemun-gu, Seoul 02455, Republic of Korea
Abstract
Coding agents built on large language models, run in automated improvement loops, can discover more efficient algorithms. We present AIOA, a framework that brings this approach to the numerical algorithms of atomistic simulation: an agent improves an algorithm against a pre-specified metric in a loop guarded by verifiers it cannot alter. Applied to ASE, a widely used atomistic simulation library, AIOA targets two facets of an algorithm: its implementation, rewritten to run faster with unchanged results, and the method itself, redesigned to converge with fewer force evaluations. Agents made six kernels 22-24 times faster on average in Python with NumPy and SciPy. On unseen problems, optimizers from the best configuration needed 3.1-3.4 times fewer force evaluations than L-BFGS for structure relaxation and 4.6-17 times fewer than standard climbing-image nudged elastic band calculations for reaction paths. The agents' optimizers also contain two algorithmic components we did not find in the literature.
Figures & tables
| implementation: kernels | method: structure relaxation | method: reaction paths | |
|---|---|---|---|
| tasks | six kernels: effective-medium theory (EMT) 28 and Lennard-Jones energy and forces (emt, lj), neighbor lists (neighborlist), minimum-image distances (geometry), bond, angle and radial-distribution-function analysis (analysis), the image-dependent pair potential (IDPP) 29 (idpp) | BFGS 27 , FIRE 3 , LBFGS 2 , BFGSLineSearch (library start); a relaxer from scratch | CI-NEB 4 driven by FIRE or ODE12r 8 (library start); a path optimizer from scratch |
| starting point | ASE as released | ASE’s method, kept within its family, or a minimal steepest descent | ASE’s method, kept within its family, or a minimal steepest-descent CI-NEB |
| metric | wall time, median over perturbed fresh inputs | force calls per unit to a largest atomic force of 0.01 eV/Å; 500 on failure | force calls per reaction to a largest image force of 0.05 eV/Å; 7,009 on failure |
| in-loop gate | outputs match stock ASE ( absolute, relative); a subset of the module’s ASE tests passes; adversarial review | converges every unit the reference converges; force rechecked | converges every reaction the reference converges; band rechecked (force, collapse, endpoints, segment share) |
| optimization set | 8–14 systems per kernel | 17 systems 3 displacements = 51 units (GFN1-xTB 25 ) | 20 Birkholz reactions 30 (GFN2-xTB 26 ) |
| held-out set | none for speed; ASE’s test corpus (481 tests) for correctness | 10 new systems 3 displacements = 30 units (GFN1-xTB) | 19 Baker reactions 31 (GFN2-xTB) |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Automated Algorithm Discovery
Automated algorithm discovery develops methods that generate and test executable algorithms for optimization, science, software, and machine learning.
See all 181 papers