LLaMEA-BO: A Large Language Model Evolutionary Algorithm for Automatically Generating Bayesian Optimization Algorithms

TL;DR

LLaMEA-BO uses large language models to automatically generate Bayesian optimization algorithms, improving performance on 19 BBOB functions.

cs.LG 🔴 Advanced 2025-05-27 4 views
Wenhu Li Niki van Stein Thomas Bäck Elena Raponi
Bayesian Optimization Large Language Models Evolutionary Algorithms Automation Performance Improvement

Key Findings

Methodology

LLaMEA-BO framework uses evolutionary strategies to guide large language models in generating Python code, preserving key components of Bayesian optimization algorithms: initial design, surrogate model, and acquisition function. Candidate algorithms are evaluated using the BBOB test suite from the COCO platform, with top performers selected for combination and mutation, enabling iterative refinement.

Key Results

  • Generated algorithms outperform state-of-the-art baselines in 19 out of 24 BBOB functions, especially in 5 dimensions.
  • Algorithms generalize well to different tasks in the Bayesmark framework, showing strong adaptability.
  • Without additional fine-tuning, the generated algorithms perform well in higher dimensions and different tasks.

Significance

This study demonstrates that large language models can serve as algorithmic co-designers, offering a new paradigm for automating Bayesian optimization development and accelerating the discovery of novel algorithmic combinations.

Technical Contribution

LLaMEA-BO is the first framework to automatically evolve complete Bayesian optimization algorithms using large language models, surpassing current state-of-the-art BO baselines. It provides new theoretical guarantees and engineering possibilities.

Novelty

This is the first instance of using large language models to generate complete Bayesian optimization algorithm code, overcoming previous limitations of improving only single components.

Limitations

  • In some high-dimensional problems, generated algorithms may not be as effective as specific optimization methods.
  • The algorithm generation process relies heavily on the quality of initial prompts.

Future Work

Future work could explore more complex tasks and higher-dimensional optimization problems, further enhancing the robustness and adaptability of the algorithms.

AI Executive Summary

Bayesian optimization is a powerful class of algorithms for optimizing expensive black-box functions. However, designing effective BO algorithms remains a manual, expertise-driven task. Recent advancements in large language models have opened new avenues for automating scientific discovery, including the automatic design of optimization algorithms. The LLaMEA-BO framework uses evolutionary strategies to guide large language models in generating complete BO algorithm code. This framework evaluates candidate algorithms using the BBOB test suite from the COCO platform, selecting top performers for combination and mutation, enabling iterative refinement. Despite no additional fine-tuning, the generated algorithms outperform state-of-the-art baselines in 19 BBOB functions and generalize well to different tasks in the Bayesmark framework. This study demonstrates that large language models can serve as algorithmic co-designers, offering a new paradigm for automating Bayesian optimization development and accelerating the discovery of novel algorithmic combinations.

Deep Analysis

Background

Bayesian optimization is a widely used optimization framework for optimizing expensive black-box functions. In recent years, BO has made significant advances in fields such as machine learning, algorithm selection, and configuration. However, designing effective BO algorithms still requires expert knowledge and manual tuning.

Core Problem

Designing effective Bayesian optimization algorithms is a complex process that requires selecting and tuning main components such as the initial design scheme, surrogate model choice, and acquisition strategy. Existing methods rely heavily on expert knowledge, making automation challenging.

Innovation

LLaMEA-BO uses large language models to automatically generate complete Bayesian optimization algorithm code, overcoming previous limitations of improving only single components. It guides the model to generate code through evolutionary strategies, maintaining the key components of the algorithm.

Methodology

  • �� Use evolutionary strategies to guide large language models in generating Python code
  • �� Preserve key components of Bayesian optimization algorithms: initial design, surrogate model, and acquisition function
  • �� Evaluate candidate algorithms using the BBOB test suite from the COCO platform
  • �� Select top performers for combination and mutation, enabling iterative refinement

Experiments

Experiments use the BBOB test suite from the COCO platform to evaluate candidate algorithms, selecting top performers for combination and mutation. The algorithms' generalization capabilities are validated using the Bayesmark framework.

Results

Generated algorithms outperform state-of-the-art baselines in 19 out of 24 BBOB functions, especially in 5 dimensions. Algorithms generalize well to different tasks in the Bayesmark framework, showing strong adaptability.

Applications

The algorithm can be used for automated hyperparameter optimization in machine learning, experimental design, and simulation-based optimization, reducing reliance on expert knowledge.

Limitations & Outlook

In some high-dimensional problems, generated algorithms may not be as effective as specific optimization methods. The algorithm generation process relies heavily on the quality of initial prompts.

Plain Language Accessible to non-experts

Imagine a chef in a kitchen trying to create a new dish. He has many ingredients but doesn't know how to combine them to make a delicious meal. Bayesian optimization acts like a smart assistant, helping the chef choose the best combination of ingredients. Large language models act like a super assistant, automatically generating new recipes for the chef to try different combinations until the best dish is found.

ELI14 Explained like you're 14

Hey there, imagine you're playing a super complex game where you need to find hidden treasures but the map doesn't have any markers. Bayesian optimization is like a smart compass, helping you find the most likely places to have treasures. And large language models are like a super smart game assistant that can automatically generate new maps to help you find treasures faster! Isn't that cool?

Glossary

Bayesian Optimization

An algorithm for optimizing expensive black-box functions by selecting efficient evaluation points using a surrogate model and acquisition function.

Used in this paper to automatically generate optimization algorithms.

Large Language Model

A large-scale neural network model capable of generating and understanding natural language.

Used to automatically generate Bayesian optimization algorithm code.

Evolutionary Strategy

A heuristic optimization method that generates new candidate solutions through selection, mutation, and combination.

Guides the large language model in generating code.

Surrogate Model

A model used to simulate the objective function, often a Gaussian process.

Used in Bayesian optimization to select evaluation points.

Acquisition Function

A function that guides the selection of the next evaluation point by balancing exploration and exploitation.

Used in Bayesian optimization to select evaluation points.

Open Questions Unanswered questions from this research

  • 1 How to maintain algorithm effectiveness in higher dimensions and more complex tasks?
  • 2 How does the robustness of generated algorithms perform under different initial conditions?

Applications

Immediate Applications

Automated Hyperparameter Optimization

Reduces reliance on expert knowledge, improving machine learning model training efficiency.

Long-term Vision

Intelligent Algorithm Design

Automated design of new algorithms to drive scientific discovery and technological innovation.

Abstract

Bayesian optimization (BO) is a powerful class of algorithms for optimizing expensive black-box functions, but designing effective BO algorithms remains a manual, expertise-driven task. Recent advancements in Large Language Models (LLMs) have opened new avenues for automating scientific discovery, including the automatic design of optimization algorithms. While prior work has used LLMs within optimization loops or to generate non-BO algorithms, we tackle a new challenge: Using LLMs to automatically generate full BO algorithm code. Our framework uses an evolution strategy to guide an LLM in generating Python code that preserves the key components of BO algorithms: An initial design, a surrogate model, and an acquisition function. The LLM is prompted to produce multiple candidate algorithms, which are evaluated on the established Black-Box Optimization Benchmarking (BBOB) test suite from the COmparing Continuous Optimizers (COCO) platform. Based on their performance, top candidates are selected, combined, and mutated via controlled prompt variations, enabling iterative refinement. Despite no additional fine-tuning, the LLM-generated algorithms outperform state-of-the-art BO baselines in 19 (out of 24) BBOB functions in dimension 5 and generalize well to higher dimensions, and different tasks (from the Bayesmark framework). This work demonstrates that LLMs can serve as algorithmic co-designers, offering a new paradigm for automating BO development and accelerating the discovery of novel algorithmic combinations. The source code is provided at https://github.com/Ewendawi/LLaMEA-BO.

cs.LG cs.NE