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骨干网络下,针对五个优化问题的实验表明:与现有基于LLM的AHD架构相比,MeEvo在复杂约束任务上取得了更优且更稳定的性能。