HiFo-Prompt: Prompting with Hindsight and Foresight for LLM-based Automatic Heuristic Design

📅 2025-08-18
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
Large language models (LLMs) face two key bottlenecks in automated heuristic design (AHD) for evolutionary computation: over-reliance on static operators and inability to accumulate domain-specific knowledge across optimization runs. Method: We propose a feedforward–backtracking dual-phase collaborative prompting framework. It leverages population dynamics analysis to drive adaptive prompt engineering and integrates an experience replay mechanism that distills historically successful strategies into transferable, general-purpose heuristic principles—enabling continuous self-improvement of the LLM during search. Contribution/Results: The resulting knowledge accumulation system effectively balances exploration and exploitation, overcoming limitations of fixed operators and catastrophic forgetting. Empirical evaluation demonstrates that our approach generates superior heuristics with significantly fewer LLM queries—achieving faster convergence and up to several-fold improvement in query efficiency compared to baseline methods.

Technology Category

Search and Optimization: Heuristic SearchMachine Learning: Evolutionary LearningNatural Language Processing: Prompt Engineering / Prompting

Application Category

Search and Retrieval-Augmented AI: Search Tool Learning with LLM: Teaching LLMs to invoke search and make use of retrieved informationEconomics, Online Markets and Human Computation: Cost models of using LLMs in production systemsSemantics and Knowledge: Data modeling to support human-machine intelligence, including LLMs agents, intelligent system behavior, explanations, and user-friendly interactions
📝 Abstract
LLM-based Automatic Heuristic Design (AHD) within Evolutionary Computation (EC) frameworks has shown promising results. However, its effectiveness is hindered by the use of static operators and the lack of knowledge accumulation mechanisms. We introduce HiFo-Prompt, a framework that guides LLMs with two synergistic prompting strategies: Foresight and Hindsight. Foresight-based prompts adaptively steer the search based on population dynamics, managing the exploration-exploitation trade-off. In addition, hindsight-based prompts mimic human expertise by distilling successful heuristics from past generations into fundamental, reusable design principles. This dual mechanism transforms transient discoveries into a persistent knowledge base, enabling the LLM to learn from its own experience. Empirical results demonstrate that HiFo-Prompt significantly outperforms state-of-the-art LLM-based AHD methods, generating higher-quality heuristics while achieving substantially faster convergence and superior query efficiency.
Problem

Research questions and friction points this paper is trying to address.

Addresses static operators in LLM-based heuristic design
Overcomes lack of knowledge accumulation in evolutionary computation
Enhances quality and efficiency of automatic heuristic generation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Adaptive prompting based on population dynamics
Distilling past heuristics into reusable principles
Dual mechanism for persistent knowledge base
C
Chentong Chen
School of Mathematics and Statistics, Xi’an Jiaotong University, Xi’an, China
M
Mengyuan Zhong
School of Mathematics and Statistics, Xi’an Jiaotong University, Xi’an, China
Jianyong Sun
Jianyong Sun
School of Mathematics and Statistics, Xi'an Jiaotong University, China
evolutionary computationstatistical machine learning
Ye Fan
Ye Fan
Computer Science, University of British Columbia
Computer GraphicsNumerical Simulation
J
Jialong Shi
School of Mathematics and Statistics, Xi’an Jiaotong University, Xi’an, China