Latent Heuristic Search: Continuous Optimization for Automated Algorithm Design

Cheikh Ahmed, Mahdi Mostajabdaveh, Zirui Zhou
5/16/2026
cs.AI

Official code: cheikh025/LHS (7 stars, Python, last commit 2026-04-23).

Abstract

The integration of Large Language Models (LLMs) into evolutionary frameworks has established a new paradigm for automated heuristic discovery. Despite their promise, these methods typically search in the discrete space of program syntax, relying on stochastic sampling to navigate a highly non-convex optimization landscape.

Show full abstract

This work proposes a continuous heuristic discovery framework that shifts optimization to a learned latent manifold. We employ an encoder to map discrete programs into continuous embeddings and train a differentiable surrogate model to predict performance, enabling gradient-based search. To regularize the optimization trajectory, an invertible normalizing flow maps these embeddings to a structured Gaussian prior, where we perform gradient ascent. The resulting optimized latent vectors are projected through a learned mapper into soft prompts, which condition a frozen LLM to synthesize novel executable heuristics. We evaluate the proposed method on the Traveling Salesman Problem (TSP), the Capacitated Vehicle Routing Problem (CVRP), the Knapsack Problem (KSP), and Online Bin Packing (OBP). Empirical results demonstrate that continuous latent-space optimization achieves performance competitive with state-of-the-art discrete evolutionary baselines while offering a complementary methodological alternative for automated algorithm design. The implementation code is available at \url{https://github.com/cheikh025/LHS}.

View on arXivView PDF

Code Implementations(1)

cheikh025/LHSOfficial100%

Latent Heuristic Search: Continuous Optimization for Automated Algorithm Design

70PythonFeb 1, 20267 months ago

Similar Papers

Cite this paper

@article{ahmed2026latent,
  title  = {Latent Heuristic Search: Continuous Optimization for Automated Algorithm Design},
  author = {Cheikh Ahmed and Mahdi Mostajabdaveh and Zirui Zhou},
  year   = {2026},
  eprint = {2605.17137},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.17137v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.17137.svg)](https://codeofpaper.com/paper/2605.17137)

Discussion