Large language models adapt algorithms continuously during optimization

Online Automated Algorithm Design with Large Language Models

Neural and Evolutionary Computing

Summary

Optimization is a way computers improve solutions step by step, but traditional methods usually stick to one fixed algorithm even when the situation changes. This paper introduces a new approach where large language models create new algorithms on the fly, adapting their behavior based on the current progress. The authors developed a system called OnDesign that uses multiple AI agents to design, test, and improve these algorithms continuously. Their experiments show this approach performs better than standard methods and previous AI-based algorithm designs.

What this means in practice

  • For optimization engineers: Develop adaptable optimization tools that automatically change algorithms during search to improve solution quality in dynamic problems.
  • For software developers: Use AI agents to generate and refine custom algorithms dynamically for complex software systems needing continuous adaptation.

Authors

Zhiyao Zhang, Yichen Li, Xingyu Wu, Liang Feng, Kay Chen Tan

Abstract

Large language models (LLMs) enable automated algorithm design (AAD) through reasoning and code synthesis. However, most existing LLM-based AAD methods separate algorithm design from target optimization, deploying a fixed design even as the optimization state evolves. Conventional adaptive optimizers can respond to such changes, but their adjustments remain confined to predefined parameters, operators, or strategies. To address these limitations, we introduce online LLM-based AAD, a novel optimization paradigm that treats the algorithm itself as a state-dependent decision variable. At each stage, LLM agents synthesize an algorithm with new behavior logic from the current optimization state. Executing the generated algorithm advances the search and provides feedback for subsequent designs, coupling algorithm design with target optimization without requiring a separate offline algorithm pretraining stage. To implement this paradigm, we propose OnDesign, a multi-agent framework that reconciles competing design perspectives to synthesize executable algorithms and uses execution feedback to refine how runtime evidence is interpreted for subsequent designs. We evaluate OnDesign across two mainstream black-box optimization paradigms on three scenarios: Bayesian optimization, evolutionary continuous optimization, and evolutionary mixed-variable optimization. Extensive experiments on six benchmark suites and one engineering problem across multiple problem dimensions demonstrate superior overall performance over conventional optimizers and offline LLM-based AAD methods.