Table of Contents
Fetching ...

RedAHD: Reduction-Based End-to-End Automatic Heuristic Design with Large Language Models

Nguyen Thach, Aida Riahifar, Nathan Huynh, Hau Chan

TL;DR

RedAHD introduces an end-to-end framework for automatic heuristic design by leveraging language reductions (LRs) that map a target COP to a related, better-understood COP, allowing LLM-based heuristic design to proceed without predefined general algorithm frameworks. The approach automates the generation of reductions, their implementations, and the associated code templates, while a multi-problem LLM-EPS strategy allows cross-pollination of heuristics across multiple COPs. Reduction refinement continuously updates LRs to escape local optima, guided by LLM prompts, ensuring sustained exploration. Across six COPs, RedAHD with standard and stronger LLMs achieves competitive or superior results compared to state-of-the-art LLM-EPS methods, demonstrating reduced human intervention and enhanced discovery of novel heuristics. The work highlights the potential of end-to-end AHD via language reductions to transform how COP heuristics are designed and applied in practice.

Abstract

Solving NP-hard combinatorial optimization problems (COPs) (e.g., traveling salesman problems (TSPs) and capacitated vehicle routing problems (CVRPs)) in practice traditionally involves handcrafting heuristics or specifying a search space for finding effective heuristics. The main challenges from these approaches, however, are the sheer amount of domain knowledge and implementation efforts required from human experts. Recently, significant progress has been made to address these challenges, particularly by using large language models (LLMs) to design heuristics within some predetermined generalized algorithmic framework (GAF, e.g., ant colony optimization and guided local search) for building key functions/components (e.g., a priori information on how promising it is to include each edge in a solution for TSP and CVRP). Although existing methods leveraging this idea have shown to yield impressive optimization performance, they are not fully end-to-end and still require considerable manual interventions. In this paper, we propose a novel end-to-end framework, named RedAHD, that enables these LLM-based heuristic design methods to operate without the need of GAFs. More specifically, RedAHD employs LLMs to automate the process of reduction, i.e., transforming the COP at hand into similar COPs that are better-understood, from which LLM-based heuristic design methods can design effective heuristics for directly solving the transformed COPs and, in turn, indirectly solving the original COP. Our experimental results, evaluated on six COPs, show that RedAHD is capable of designing heuristics with competitive or improved results over the state-of-the-art methods with minimal human involvement.

RedAHD: Reduction-Based End-to-End Automatic Heuristic Design with Large Language Models

TL;DR

RedAHD introduces an end-to-end framework for automatic heuristic design by leveraging language reductions (LRs) that map a target COP to a related, better-understood COP, allowing LLM-based heuristic design to proceed without predefined general algorithm frameworks. The approach automates the generation of reductions, their implementations, and the associated code templates, while a multi-problem LLM-EPS strategy allows cross-pollination of heuristics across multiple COPs. Reduction refinement continuously updates LRs to escape local optima, guided by LLM prompts, ensuring sustained exploration. Across six COPs, RedAHD with standard and stronger LLMs achieves competitive or superior results compared to state-of-the-art LLM-EPS methods, demonstrating reduced human intervention and enhanced discovery of novel heuristics. The work highlights the potential of end-to-end AHD via language reductions to transform how COP heuristics are designed and applied in practice.

Abstract

Solving NP-hard combinatorial optimization problems (COPs) (e.g., traveling salesman problems (TSPs) and capacitated vehicle routing problems (CVRPs)) in practice traditionally involves handcrafting heuristics or specifying a search space for finding effective heuristics. The main challenges from these approaches, however, are the sheer amount of domain knowledge and implementation efforts required from human experts. Recently, significant progress has been made to address these challenges, particularly by using large language models (LLMs) to design heuristics within some predetermined generalized algorithmic framework (GAF, e.g., ant colony optimization and guided local search) for building key functions/components (e.g., a priori information on how promising it is to include each edge in a solution for TSP and CVRP). Although existing methods leveraging this idea have shown to yield impressive optimization performance, they are not fully end-to-end and still require considerable manual interventions. In this paper, we propose a novel end-to-end framework, named RedAHD, that enables these LLM-based heuristic design methods to operate without the need of GAFs. More specifically, RedAHD employs LLMs to automate the process of reduction, i.e., transforming the COP at hand into similar COPs that are better-understood, from which LLM-based heuristic design methods can design effective heuristics for directly solving the transformed COPs and, in turn, indirectly solving the original COP. Our experimental results, evaluated on six COPs, show that RedAHD is capable of designing heuristics with competitive or improved results over the state-of-the-art methods with minimal human involvement.

Paper Structure

This paper contains 52 sections, 8 equations, 9 figures, 11 tables.

Figures (9)

  • Figure 1: Timeline of LLM-EPS methods developed thus far.
  • Figure 2: Illustration of RedAHD. First, the designer LLM generates a set of LRs, encoded as two reduction functions (one for mapping instances and the other for mapping solutions of $A$ to $B$). The LRs are then used to generate a set of heuristics that are iteratively refined using existing LLM-EPS methods, in which offspring heuristics of an LR may be generated using algorithmic ideas from heuristics of any other LRs. When the overall performance of the heuristics associated with an LR stagnates, the LR is automatically refined by the LLM.
  • Figure 3: A demonstration of multi-problem LLM-EPS for TSP, in which the parent heuristic (blue) during EoH mutation liu2024evolution is not intended to solve the COP at hand ("Problem B3"). As a result, the offspring heuristic for B3 (green) is generated with the novel idea of 2-opt edge swap and hence yields better performance.
  • Figure S4: Prompts used for reduction refinement in RedAHD as described in Section \ref{['subsec:redahd-refine']}.
  • Figure S5: Prompts used for candidate LR generation in RedAHD as described in Section \ref{['subsec:redahd-init']}. The chronological order for LLM prompting is (top) $\blacktriangleright$ (center left) $\blacktriangleright$ (center right). The (bottom left) code snippet is the "Reduction Template", where [ARGS], [RETURN], [PLACEHOLDER] are COP-specific and detailed in Table \ref{['tab:cop-reduc-prompts']}. The (bottom right) code snippet is the "Heuristic Template".
  • ...and 4 more figures

Theorems & Definitions (2)

  • Definition 1: Reduction crescenzi1997short
  • Definition 2: Language reduction