Large-Scale Comparison of Metaheuristic Algorithms via Behavioral Verification of Large Language Model-Generated Codes
Emad Alharbi
Key points
From the paper's conclusion- A large language model (LLM) was used to implement 393 published metaheuristic algorithms.
Abstract
The performance and reproducibility of metaheuristic algorithms remain unresolved because prior studies have examined only limited subsets, as most algorithms are published as mathematical descriptions without source code. A large language model (LLM) was used to implement 393 published metaheuristic algorithms. The LLM-generated codes were verified by running them on two optimization problems with three seeds while an automated script checked for crashes and improvement. These reports were returned to the LLM as repair feedback. First drafts passed at a rate of 53.4%, which increased to 78.4% after eight rounds of feedback, while 32 algorithms failed in all three replicates, 24 of them with the same failure signature. The common practice of using LLMs to review LLM-generated code was evaluated: at least one of two independent LLM reviewers approved 92.3% of broken codes, indicating that textual review provides no information about execution-level validity. Fifty verified codes were compared to reference codes from an established library: 49 differed significantly in both directions, and only the most completely specified algorithm showed no detected divergence. The 360 verified codes were compared on the Congress on Evolutionary Computation (CEC) 2017 and CEC 2022 benchmarks with 51 seeded runs. The Differential Evolution implementation ranked second on CEC 2017 and first on CEC 2022, outperforming the evaluated implementations of hundreds of recent metaphor-based algorithms.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Newly Proposed Metaheuristic Optimization Algorithms: A Systematic Review of Recent Trends, Validation Practices, and ApplicationsMathematics · 2026
- A survey on large language models driven meta-optimizers for automated intelligent optimizationArtificial Intelligence Review · 2026
- PerfArena: Ranking LLMs by Code PerformancearXiv · 2026
- Knowledge boundary probing and demand-guided intervention for LLM-based power system code generationAdvanced Engineering Informatics · 2026
- Evaluating LLM-Based Regression Test GenerationProceedings of the ACM on software engineering. · 2026
- Meta-Reflective Evolution Effectively Improves Production AI SystemsarXiv · 2026