arXiv:2505.21034cs.LGcs.NE2025-05被引 8

用大模型自动生成贝叶斯优化算法,无需微调即超越主流方法。

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

  • 通过进化策略引导大模型生成包含代理模型和采集函数的完整贝叶斯优化代码。
  • 在24个BBOB测试函数中,5维下19个函数性能优于现有基线,高维泛化良好。
  • 适用于算法设计新手或希望快速探索新组合的研究者,是自动化算法开发的新范式。

贝叶斯优化(BO)是优化高成本黑箱函数的强大工具,但设计高效BO算法仍依赖人工与专业知识。近期大语言模型(LLM)的发展为科学发现自动化提供了新路径,包括自动设计优化算法。以往研究将LLM用于优化循环或生成非BO算法,本文首次挑战:使用LLM自动生成完整的BO算法代码。我们的框架采用进化策略,引导LLM生成保留关键组件(初始设计、代理模型、采集函数)的Python代码。通过提示生成多个候选算法,并在COCO平台的BBOB基准上评估其表现。根据性能筛选最优候选,经受控提示变异进行组合与突变,实现迭代优化。无需额外微调,生成的算法在24个函数中,5维下有19个优于当前先进基线,且在更高维度及不同任务(基于Bayesmark框架)中表现出良好泛化能力。本工作证明了大模型可作为算法协同设计者,开启自动化贝叶斯优化开发的新范式。源码见https://github.com/Ewendawi/LLaMEA-BO。

原文摘要 · Abstract (English)

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.

大模型贝叶斯优化算法生成自动化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。