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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Chen, Chentong, Zhong, Mengyuan, Fan, Ye, Shi, Jialong, Sun, Jianyong
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866915782952222720
author Chen, Chentong
Zhong, Mengyuan
Fan, Ye
Shi, Jialong
Sun, Jianyong
author_facet Chen, Chentong
Zhong, Mengyuan
Fan, Ye
Shi, Jialong
Sun, Jianyong
contents 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. Our code is available at https://github.com/Challenger-XJTU/HiFo-Prompt.
format Preprint
id arxiv_https___arxiv_org_abs_2508_13333
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle HiFo-Prompt: Prompting with Hindsight and Foresight for LLM-based Automatic Heuristic Design
Chen, Chentong
Zhong, Mengyuan
Fan, Ye
Shi, Jialong
Sun, Jianyong
Artificial Intelligence
Neural and Evolutionary Computing
Optimization and Control
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. Our code is available at https://github.com/Challenger-XJTU/HiFo-Prompt.
title HiFo-Prompt: Prompting with Hindsight and Foresight for LLM-based Automatic Heuristic Design
topic Artificial Intelligence
Neural and Evolutionary Computing
Optimization and Control
url https://arxiv.org/abs/2508.13333