Manuscript Offprint

arXiv:2609.11452

RouteRepair: Instance-Level Failure Diagnosis and Targeted Repair in LLM-Based Automated Heuristic Design for Routing Optimization

Binghao Ji, Di Huang, Jiahui Fang, Zhiyuan Liu

Abstract

Efficient routing optimization is essential to freight transportation, urban logistics, and shared mobility, where high-quality heuristics are often required under limited computational budgets. Recent large language model (LLM)-based automated heuristic design methods can generate effective routing rules, but aggregate evaluation may mask recurrent failures on particular instance structures. To address this limitation, this study develops RouteRepair, which diagnoses parent-specific weaknesses from instance-level performance and applies targeted modifications to the corresponding heuristic components while protecting behavior that already performs well. Routing evidence, solver behavior, and program context are combined to define bounded repair objectives, and each intervention is validated through matched parent-child evaluation of failure recovery and collateral degradation. Experiments on the traveling salesman problem (TSP) and capacitated vehicle routing problem (CVRP) span constructive search, guided local search, and ant colony optimization. RouteRepair-GLS reduces the mean TSP optimality gap from 1.7476% to 0.7587%, while the constructive CVRP heuristic lowers average route cost by 1.91% relative to the savings heuristic; the generated ACO priors also outperform matched hand-designed priors. These results show that failure-aware, evidence-constrained refinement can improve routing heuristics on difficult instances while preserving performance on cases they already solve well.

Keywords:

Large Language Models; Automated Heuristic Design; Routing Optimization; Hyper-Heuristics; Evolutionary Search

1. Introduction

Routing optimization is central to freight distribution, urban logistics, shared mobility, and emerging autonomous delivery services. The traveling salesman problem (TSP) and the capacitated vehicle routing problem (CVRP) remain two basic models for route sequencing and capacity-constrained distribution. Exact algorithms are indispensable for benchmarking, but their burden grows rapidly with the number of customers and operational constraints. Constructive heuristics, local search, and population-based metaheuristics therefore remain important when good routes must be obtained within limited time (Laporte 2009; Toth and Vigo 2014). Transportation studies have also embedded reinforcement learning and learning-guided decomposition in truck-drone routing, heterogeneous-fleet routing, and large-scale vehicle routing (Bogyrbayeva et al. 2023; Li et al. 2025).

  • Corresponding author.

E-mail address: 1109918035@qq.com(Binghao Ji), dihuang@seu.edu.cn.(Di Huang), fj15252428916@163.com(Jiahui Fang), zhiyuanl@seu.edu.cn(Zhiyuan Liu),

The effectiveness of these methods often depends on compact heuristic components. A constructive procedure must decide which node or customer should be selected next; guided local search must determine which route feature should receive an additional penalty; and population-based methods require rules for variation and selection. Designing these components is difficult because the designer must choose informative state variables, combine competing criteria, and test whether the rule remains useful when customer density, demand dispersion, vehicle capacity, or instance size changes. A rule that works on compact TSP instances may become excessively local on dispersed networks, while a capacity-oriented CVRP rule may consolidate demand too early and create costly detours.

Automated heuristic design (AHD) reframes this task as a search over rules, operators, or executable programs rather than solutions to a single instance. Classical hyper-heuristics and genetic programming established this distinction, although their search spaces generally rely on manually specified primitives (Burke et al. 2013; Dokeroglu et al. 2024). Code-capable large language models (LLMs) provide a broader program prior and support semantically meaningful code variation. FunSearch, EoH, and ReEvo combine LLM generation with execution, evaluation, evolutionary selection, and feedback, turning one-shot generation into iterative program search (Romera-Paredes et al. 2024; Liu et al. 2024; Ye et al. 2024). Most LLM-based AHD methods, however, still rank candidates using a mean objective, average optimality gap, or another scalar fitness. This aggregation hides whether a heuristic is uniformly weak or strong on most instances but repeatedly poor on a smaller, structurally coherent subset.

Recent work addresses heterogeneity through complementary heuristic sets, state-dependent selection, cross-scale training, and robustness-oriented benchmarking (Liu et al. 2025; Yang et al. 2025; Sim et al. 2025). However, these methods do not directly explain how a competitive routing heuristic should be revised when it repeatedly fails on particular spatial, distance, or demand-capacity patterns. RouteRepair addresses this gap by retaining the instance-wise profile of each selected parent and constructing failure, strength, and protection sets. A Failure Diagnosis Expert identifies the likely routing weakness from objective records, instance descriptors, route behavior, and program context, while a separate Targeted Repair Expert modifies only the designated scoring rule or edge-prior function. The repaired heuristic is then evaluated against its parent under matched instances, random seeds, solver settings, and computational budgets. This study makes three contributions:

(i) A new refinement perspective for routing heuristic design. RouteRepair shifts LLM-based automated heuristic design from average-fitness-driven replacement to instance-level repair, enabling recurrent routing failures to be corrected without discarding an otherwise competitive heuristic.

(ii) An evidence-constrained two-expert diagnosis-repair methodology. Parent-specific failure, strength, and protection cases guide a Failure Diagnosis Expert and a separate Targeted Repair Expert, linking routing evidence to bounded code modifications rather than LLM self-assessment.

(iii) A transferable and verifiable repair mechanism. Experiments on five TSP and CVRP adapters show that RouteRepair applies to constructive search, guided local search, and ACO, while improving solution quality and limiting degradation on previously well-solved instances.

References (33)