Large Language Models (LLMs) have advanced Automatic Heuristic Design (AHD) by enabling heuristic generation through reasoning and code synthesis. Existing LLM-based AHD architectures mainly follow two paradigms: Natural Evolution, which uses crossover and mutation to explore heuristic programs, and Metacognitive Evolution, which refines reasoning through reflection. However, Natural Evolution discards reasoning traces, weakening knowledge inheritance and exploitation, while Metacognitive Evolution lacks population-level recombination, limiting exploration and increasing the risk of premature convergence. These limitations reduce search efficiency, stability, and solution quality on complex problems. To address this gap, we propose MeEvo, a dual-layer AHD framework that cyclically couples Natural Evolution and Metacognitive Evolution. Natural Evolution explores heuristic code while recording reasoning traces, fitness values, and errors into a shared history; Metacognitive Evolution then reflects on this history to generate improved heuristics that re-enter the parent pool for the next cycle. This design enables population-driven exploration and reflection-driven refinement to reinforce each other. Experiments on five optimization problems with two LLM backbones show that MeEvo achieves stronger and more stable performance than existing LLM-based AHD architectures, especially on complex constrained tasks.
翻译:大语言模型(LLMs)通过推理与代码合成实现启发式生成,推动了自动启发式设计(AHD)的发展。现有基于LLM的AHD架构主要遵循两种范式:自然进化通过交叉与变异探索启发式程序,元认知进化则通过反思优化推理过程。然而,自然进化丢弃了推理轨迹,削弱了知识继承与利用能力;元认知进化缺乏种群级重组,限制探索能力并增加早熟收敛风险。这些局限性在复杂问题上降低了搜索效率、稳定性和解的质量。针对这一不足,我们提出MeEvo——一种双层AHD框架,将自然进化与元认知进化进行周期性耦合。自然进化在探索启发式代码的同时,将推理轨迹、适应度值与错误信息记录至共享历史库;元认知进化随后基于该历史进行反思,生成改进型启发式并重新注入父代种群以开启下一周期。该设计使种群驱动的探索与反思驱动的改进相互强化。在采用两种LLM骨干网络的五个优化问题上的实验表明,MeEvo相比现有基于LLM的AHD架构,在复杂约束任务上取得更优且更稳定的性能。