Machine Learning PapersLandmark papers
← All papers
RESEARCH PAPER / 2026-11-09

Autonomous Optimization of Numerical Algorithms by an AI Agent: Application to Atomistic Simulation

Jeheon Woo

Korea Institute for Advanced Study +1 · Nature (inferred from formatting and "naturemag" tag, though listed as arXiv)

Affiliations: Korea Institute for Advanced Study, Center for Artificial Intelligence and Natural Sciences

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.

The following analysis is generated by AI and may contain errors. It is separate from the authors’ abstract and is not peer review.

Research summary

The paper presents a rigorous framework for autonomous algorithm optimization, demonstrating that LLM agents can significantly improve the efficiency of numerical simulations in atomistic physics. By combining iterative code refinement with strict verification gates and adversarial review, the authors show that agents can discover novel optimizer components and achieve substantial speedups and convergence improvements over standard methods, marking a significant step towards AI-driven scientific discovery.

Methodology

The paper introduces AIOA, a framework for autonomous iterative optimization of numerical algorithms. The methodology is robust, employing a "keep-or-discard" loop similar to Karpathy's autoresearch but enhanced with rigorous verification gates. Key methodological strengths include the separation of implementation optimization (speeding up code without changing results) and method optimization (changing the algorithm to reduce force evaluations). The use of adversarial reviewer agents to catch subtle bugs (e.g., rank-deficient cells) and the strict freezing of benchmark/gate files to prevent reward hacking are significant contributions to the reliability of AI-driven code optimization. The "informed runs" protocol, where agents can read the history of previous runs, is a novel approach to leveraging agent memory and collaboration.

Results & evaluation

The experiments are extensive and well-controlled. The paper evaluates six distinct numerical kernels in ASE, showing 22-24x speedups in Python/NumPy. For optimizers, it compares against standard methods (L-BFGS, CI-NEB) on held-out problems, demonstrating 3.1-3.4x fewer force evaluations for relaxation and 4.6-17x for reaction paths. The evaluation includes ablations on parameter tuning vs. algorithmic change, showing that while tuning helps, the agents' algorithmic modifications provide significant additional gains. The use of multiple models (Opus 5, Sonnet 5, Fable 5.1) and independent runs provides a good statistical basis, although the sample size (3 runs per config) is modest.

Reproducibility

The paper provides high reproducibility. It details the exact versions of libraries (ASE 3.28.0, Python 3.11, NumPy 2.4.3), the specific models used, and the protocol for each run. The code and data are stated to be available. The detailed description of the safeguards (SHA-256 hashing, frozen files) allows others to replicate the integrity checks. The specific metrics and gates are clearly defined.

Limitations

The primary limitation is the reliance on specific LLMs (Claude series) and the high computational cost of the agent loops (1.6 million unit-runs). The results are specific to the ASE library and atomistic simulation; generalization to other domains is not tested. The "informed" runs, which show the best results, rely on access to previous run histories, which may not be feasible in all real-world scenarios. The statistical power is limited by the small number of independent runs (n=3).

Broader impact

This work has significant implications for scientific computing and AI for Science. It demonstrates that LLM agents can not only write code but also discover novel algorithmic improvements when given proper constraints and verification. The framework's safeguards against reward hacking are applicable to any autonomous coding agent. The potential to automate the optimization of numerical algorithms could accelerate research in physics, chemistry, and materials science. The paper presents a rigorous framework for autonomous algorithm optimization, demonstrating that LLM agents can significantly improve the efficiency of numerical simulations in atomistic physics. By combining iterative code refinement with strict verification gates and adversarial review, the authors show that agents can discover novel optimizer components and achieve substantial speedups and convergence improvements over standard methods, marking a significant step towards AI-driven scientific discovery.

Author of this paper? Send a correction.