LLaMEA-SAGE: Guiding Automated Algorithm Design with Structural Feedback from Explainable AI
Niki van Stein, Anna V. Kononova, Lars Kotthoff, Thomas Bäck
TL;DR
This work addresses the bottleneck in automated algorithm design where LLM-driven discovery relies predominantly on fitness feedback. It introduces LLaMEA-SAGE, a structured-feedback mechanism that derives AST-based code features and trains an archive-based surrogate to identify performance-affecting features via SHAP attributions, translating them into natural-language mutation guidance for LLMs. The approach preserves template-free, end-to-end algorithm discovery while biasing exploration toward architecture- and complexity-related code properties that correlate with performance. Empirical results on SBOX-COST and the MA-BBOB MA benchmark show faster convergence and competitive performance against state-of-the-art baselines, supported by code-evolution analyses and token-cost considerations. Overall, the work demonstrates that interpretable, code-level signals can effectively guide LLM-driven algorithm evolution, offering a principled pathway to more efficient and scalable automated algorithm design.
Abstract
Large language models have enabled automated algorithm design (AAD) by generating optimization algorithms directly from natural-language prompts. While evolutionary frameworks such as LLaMEA demonstrate strong exploratory capabilities across the algorithm design space, their search dynamics are entirely driven by fitness feedback, leaving substantial information about the generated code unused. We propose a mechanism for guiding AAD using feedback constructed from graph-theoretic and complexity features extracted from the abstract syntax trees of the generated algorithms, based on a surrogate model learned over an archive of evaluated solutions. Using explainable AI techniques, we identify features that substantially affect performance and translate them into natural-language mutation instructions that steer subsequent LLM-based code generation without restricting expressivity. We propose LLaMEA-SAGE, which integrates this feature-driven guidance into LLaMEA, and evaluate it across several benchmarks. We show that the proposed structured guidance achieves the same performance faster than vanilla LLaMEA in a small controlled experiment. In a larger-scale experiment using the MA-BBOB suite from the GECCO-MA-BBOB competition, our guided approach achieves superior performance compared to state-of-the-art AAD methods. These results demonstrate that signals derived from code can effectively bias LLM-driven algorithm evolution, bridging the gap between code structure and human-understandable performance feedback in automated algorithm design.
