cs.NEApr 3, 2026

Breaking Validity-Induced Boundaries to Expand Algorithm Search Space: A Two-Stage AST-Based Operator for LLM-Driven Automated Heuristic Evolution

Authors: Sun Shengming, Shi Jialong

Organizations: School of Mathematics and Statistics, Xi’an Jiaotong University, Xi’an, China

Abstract

Large Language Model (LLM) based automated heuristic design (AHD) has shown great potential in discovering efficient heuristics. Most existing LLM-AHD frameworks use semantic evolutionary operators that rely entirely on the LLM's pre-trained knowledge. These one-stage methods strictly require the generated code to be valid during the operation and often rely on a ``thought-code'' representation. We argue that this end-to-end generation fundamentally limits the exploration ability within the algorithm search space. In this paper, we propose a two-stage, structure-based evolutionary operator for LLM-AHD. In the first stage, our approach directly performs crossover and mutation on the Abstract Syntax Trees (ASTs) of the heuristic code, intentionally generating diverse but often invalid structural variants. In the second stage, the LLM is employed to repair these invalid heuristics into executable, high-quality code. Depending on the underlying framework, either the raw invalid variants or the repaired heuristics are integrated into the population to preserve potential structural patterns. We demonstrate that the proposed operator can significantly enhance the search ability of state-of-the-art LLM-AHD algorithms, such as EoH-S. Experimental results on the Traveling Salesman Problem (TSP) and the Online Bin Packing Problem (OBP) show that our method effectively improves both optimization performance and convergence speed.

Figures & tables

Explore similar work

CardsList
  1. Heuristic Search as Language-Guided Program Optimization

    Feb 17, 2026Mingxin Yu, Ruixiao Yang, Chuchu FanAutomated Heuristic DesignLarge Language Model-Guided Optimization

  2. How to Guide LLM Generation: Dual-Surrogate Guided Search for Automated Heuristic Design

    Jul 15, 2026Yuhan Wang, Chaoda Peng, Xingyu Wu +2Surrogate-Assisted OptimizationAutomated Heuristic Design

  3. ES-AHD: An Evolution Strategy Framework for Automatic Heuristic Design

    Aug 26, 2026Yutao Lai, Kezhao Lai, Hai-Lin Liu +2Automated Heuristic DesignLarge Language Model-Guided Optimization