ICLR 2026poster0 citations

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

ChentongChen, Mengyuan Zhong, Jialong Shi, Jianyong Sun, Ye Fan

Abstract

This paper investigates the application of Large Language Models (LLMs) in Automated Heuristic Design (AHD), where their integration into evolutionary frameworks reveals a significant gap in global control and long-term learning. We propose the Hindsight-Foresight Prompt (HiFo-Prompt), a novel framework for LLM-based AHD designed to overcome these limitations. This is achieved through two synergistic strategies: Foresight and Hindsight. Foresight acts as a high-level meta-controller, monitoring population dynamics(e.g., stagnation and diversity collapse) to switch the global search strategy between exploration and exploitation explicitly. Hindsight builds a persistent knowledge base by distilling successful design principles from past generations, making this knowledge reusable. This dual mechanism ensures that the LLM is not just a passive operator but an active reasoner, guided by a global plan (Foresight) while continuously improving from its cumulative experience (Hindsight). Empirical results demonstrate that HiFo-Prompt significantly outperforms a comprehensive suite of state-of-the-art AHD methods, discovering higher-quality heuristics with substantially improved convergence speed and query efficiency. Our code is available at https://github.com/Challenger-XJTU/HiFo-Prompt.

Large Language ModelsEvolutionary ComputationGuided Prompt SynthesisKnowledge AccumulationAutomated Algorithm Design
BibTeX
@inproceedings{
chentongchen2026hifoprompt,
title={HiFo-Prompt: Prompting with Hindsight and Foresight for {LLM}-based Automatic Heuristic Design},
author={ChentongChen and Mengyuan Zhong and Jialong Shi and Jianyong Sun and Ye Fan},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=imSLzfZ6av}
}
HiFo-Prompt: Prompting with Hindsight and Foresight for LLM-based Automatic Heuristic Design · ICLR 2026