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

Nguyen Thach, Aida Riahifar, Nathan Huynh, Hau ChanarXiv 2025 · DOI

Introduction

Solving NP-hard Combinatorial Optimization Problems (COPs)—such as the Traveling Salesman Problem (TSP) or Vehicle Routing (CVRP)—is a fundamental challenge in logistics and computer science. Traditionally, these problems required human experts to handcraft heuristics or design complex "hyper-heuristics."

Recent advancements in Large Language Models (LLMs) have led to the development of LLM-based Evolutionary Program Search (LLM-EPS). However, existing methods are not truly end-to-end; they typically require a human to provide a General Algorithmic Framework (GAF). For instance, a human might decide to use "Ant Colony Optimization" and task the LLM with writing only the specific pheromone update function. RedAHD addresses this limitation by introducing a framework that allows LLMs to design the entire solution from scratch through problem reduction.

Methodology: Language Reduction

The core innovation of RedAHD is Language Reduction (LR). In classical computer science, a reduction transforms a complex Problem A into a simpler Problem B. RedAHD automates this process using three primary stages:

  1. Reduction Initialization: Given a natural language description of a COP, the LLM generates candidate "reductions"—transforming the original problem into versions it understands better. It generates mapping functions to translate problem instances and solutions between the original and reduced domains.
  2. Multi-problem LLM-EPS: RedAHD maintains a population of heuristics across all reduced problems simultaneously. This enables "cross-pollination," where algorithmic strategies discovered for one reduction (e.g., a specific local search move) can be adapted for others.
  3. Reduction Refinement: To avoid local optima, the framework prompts the LLM to rethink and refine the reduction functions themselves if the evolutionary search stagnates.
The RedAHD framework architecture, illustrating Reduction Initialization, Multi-Problem LLM-EPS, and Reduction Refinement.

Experimental Evaluation

The authors evaluated RedAHD on six diverse COPs: TSP, CVRP, 0/1 Knapsack (KP), Multiple Knapsack (MKP), and both Offline and Online Bin Packing (BPP/OBPP). Testing involved standard benchmarks like TSPLib and focused on both In-Distribution (ID) and Out-of-Distribution (OOD) performance, such as training on small instances and testing on significantly larger ones.

Key Results and Insights

RedAHD demonstrates that LLMs can effectively "invent" their own algorithmic frameworks. Key findings include:

  • Superior Generalization: RedAHD consistently outperformed state-of-the-art (SOTA) methods like MCTS-AHD and EoH in OOD settings, suggesting that the reduction approach creates more robust heuristics than those tied to specific human-designed frameworks.
  • Real-World Performance: On TSPLib instances, RedAHD achieved significantly smaller optimality gaps than traditional greedy or nearest-neighbor heuristics, maintaining high performance even on instances exceeding 1,500 nodes.
  • Efficiency and Scaling: The framework is highly cost-effective; a full training run using GPT-4o-mini cost approximately $0.30. Furthermore, performance scales with model reasoning capabilities, with the o3-mini model allowing RedAHD to surpass specialized libraries like Google's OR-Tools on complex routing tasks.
Performance comparison on TSPLib instances, showing RedAHD's superior optimality gap compared to traditional and LLM-based baselines.

Conclusion

RedAHD represents a significant step toward truly autonomous optimization. By leveraging the LLM's ability to find conceptual analogies and perform cross-problem algorithmic evolution, the framework eliminates the need for manual GAF design. Future work will explore more advanced search techniques, such as Monte Carlo Tree Search, to further navigate the vast space of potential problem reductions.

Summary updated

BibTeX
@misc{thach2025redahd,
  author = {Nguyen Thach and Aida Riahifar and Nathan Huynh and Hau Chan},
  title = {{RedAHD: Reduction-Based End-to-End Automatic Heuristic Design with Large Language Models}},
  year = {2025},
  eprint = {2505.20242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.20242},
}
Figure