Abstract
This paper presents AwesomeDE, a novel framework that leverages Large Language Models (LLMs) to automate the generation and evolution of update rules for Constrained Evolutionary Algorithms (CEAs). By treating the LLM as a meta-optimizer within a bi-level optimization loop, the system iteratively refines algorithmic logic based on performance feedback. Experimental results on the CEC2010 benchmark demonstrate that LLM-generated algorithms achieve superior accuracy and higher success rates compared to state-of-the-art handcrafted optimizers, especially in complex, high-dimensional constrained environments.
Introduction
Constrained Optimization Problems (COPs) are ubiquitous in engineering and data science, requiring the identification of optimal solutions within strictly defined feasible regions. Traditionally, researchers have relied on Evolutionary Algorithms (EAs) to navigate these spaces. However, the design of effective "update rules"—the core logic governing how a population evolves—has remained a manual, labor-intensive process of trial and error. While LLMs have shown promise in unconstrained optimization, their application to the complex, constrained landscapes of real-world problems has been limited. This research bridges that gap by introducing a framework for the automated design and evolution of Constrained Evolutionary Algorithms.
The AwesomeDE Framework
The authors propose AwesomeDE, a data-driven framework operating through a bi-level Meta-black-box optimization (MetaBBO) approach. This architecture separates the high-level strategy design from the low-level execution of the algorithm.
Bi-Level Optimization Loop
- The Outer Loop (Meta-Optimizer): An LLM (specifically Deepseek R1) acts as the architect. It receives a prompt containing problem descriptions and a history of previous update rule performances. It then generates a new, improved update rule in the form of executable MATLAB code.
- The Inner Loop (Algorithm Execution): The generated update rule is integrated into a standard EA framework and tested against specific optimization problems. Performance metrics, such as proximity to the optimum and constraint satisfaction, are recorded and fed back to the LLM for the next iteration.
Prompt Engineering for Algorithm Generation
A critical component of the framework's success is the $RTO^2H$ prompt design framework. This structured approach ensures that the LLM receives all necessary context to produce syntactically correct and effective optimization logic.
The prompt is divided into five key sections:
- Role Definition: Establishing the LLM as an optimization expert.
- Task Description: Defining the specific goal (e.g., designing a mutation equality).
- Operating Requirements: Setting constraints on the output, such as requiring vectorizable MATLAB code.
- History Feedback: Providing the LLM with the results of previous attempts to enable iterative improvement.
- Output Format: Specifying the exact structure of the response (e.g., LaTeX for math and code blocks for MATLAB).
Experimental Evaluation
The framework was evaluated using the CEC2010 benchmark suite, which includes 18 scalable problems with diverse challenges, such as non-separable objectives and rotated constraint geometries. Tests were conducted at dimensions $D=10$ and $D=30$. The LLM-generated algorithm, llmEA, was compared against classical baselines (Genetic Algorithms, Differential Evolution) and state-of-the-art handcrafted methods like LSHADE and MadDE.
Key Results and Insights
- Superior Performance: llmEA achieved the best performance on 6 out of 18 benchmark functions, particularly excelling in high-dimensional constrained landscapes. It demonstrated a success rate of 66.7% in finding feasible solutions, significantly outperforming the 33.3%–50% success rates of its competitors.
- Interpretability and Strategy: Unlike black-box neural optimizers, AwesomeDE produces human-readable code. The LLM demonstrated an ability to "invent" principled strategies for navigating feasible region boundaries without manual tuning of penalty functions.
- Computational Efficiency: Despite the overhead of LLM inference during the design phase, the resulting algorithms were highly efficient. In high-dimensional tasks, llmEA was faster than advanced handcrafted methods like MadDE, achieving normalized time units of 1.12–1.45 compared to 1.60–1.80 for competitors.
Conclusion
AwesomeDE represents a significant step toward fully automated algorithm design. By shifting the focus from manual prompt engineering to automated meta-evolution, the framework allows LLMs to discover optimization strategies that rival or exceed those designed by human experts. Future work will focus on addressing context window limitations to handle longer histories and extending the framework to multi-objective optimization problems.
Summary updated