Abstract
Automated Heuristic Design (AHD) has recently seen advancements through the use of Large Language Models (LLMs). However, current approaches often suffer from a lack of global search control and the loss of critical design insights during the evolutionary process. We introduce HiFo-Prompt, a novel framework that incorporates a Foresight module for macroscopic population navigation and a Hindsight module for cumulative knowledge distillation. Our experiments across diverse combinatorial optimization problems demonstrate that HiFo-Prompt significantly outperforms existing state-of-the-art methods in both solution quality and query efficiency.
Introduction
Combinatorial Optimization (CO) problems, such as routing and scheduling, are fundamental to industrial efficiency but are computationally NP-hard. While recent research has leveraged LLMs to automate the design of heuristics, two primary hurdles remain: a lack of global control over population dynamics and the decay of design knowledge. Most current methods rely on local signals, leading to premature convergence on mediocre solutions. Furthermore, when a candidate heuristic is discarded, the underlying logic that made it promising is often lost. HiFo-Prompt addresses these challenges by transforming LLMs into active "reasoners" through a hierarchical architecture that decouples high-level strategy from low-level code generation.
Methodology
HiFo-Prompt introduces a hierarchical framework designed to steer the LLM using "verbal gradients" rather than expensive weight fine-tuning.
The Foresight Module (Evolutionary Navigator)
Acting as a high-level meta-controller, the Foresight module monitors macroscopic population dynamics, specifically performance stagnation and phenotypic diversity. It dynamically injects directives into the prompt to switch the search regime between Explore (fostering novelty), Exploit (refining winners), or Balance.
The Hindsight Module (Insight Pool)
This module maintains a persistent, self-evolving repository of abstracted design principles. An LLM distills successful code patterns into "insights" (e.g., "Prioritize choices that maintain flexibility for future steps"). These insights are assigned credibility scores based on empirical performance, creating a cumulative knowledge base that persists even after specific code instances are deleted.
Guided Prompt Synthesis
For each iteration, HiFo-Prompt dynamically constructs a "composite prompt." This prompt combines a foundational evolutionary strategy with real-time directives from the Navigator and high-utility principles retrieved from the Insight Pool.
Experimental Evaluation
The authors evaluated HiFo-Prompt across four challenging optimization domains: the Traveling Salesman Problem (TSP), Online Bin Packing (Online BPP), Flow Shop Scheduling (FSSP), and Bayesian Optimization (BO). The framework was tested on standard benchmarks like TSPLib and Taillard instances, as well as real-world mimics like Weibull-distributed bin packing instances.
Key Results
HiFo-Prompt consistently established new state-of-the-art results across all tested tasks, outperforming top-tier baselines such as FunSearch, EoH, and ReEvo.
Major findings include:
- Superior Accuracy: On TSP100 construction, HiFo-Prompt achieved an optimality gap of 8.58%, significantly better than the next best LLM-based method (HSEvo at 12.00%).
- Query Efficiency: The system often reaches superior results in just 200 LLM requests, a fraction of the cost required by previous methods.
- Robust Generalization: Heuristics designed on small-scale problems (e.g., TSP50) generalized effectively to much larger, out-of-distribution instances (e.g., TSP500) without further training.
- Diversity Maintenance: The use of exact string matching for standardized algorithm descriptions proved to be a robust proxy for functional diversity, preventing semantic stagnation.
Conclusion and Future Work
HiFo-Prompt demonstrates that a hierarchical approach to prompting can effectively manage the evolutionary design of heuristics. By decoupling logic from implementation and maintaining a persistent insight pool, the framework overcomes the limitations of local search and knowledge decay. Future research will focus on self-adaptive meta-controllers and inter-task knowledge transfer to further generalize the system's reasoning capabilities.
Summary updated