Revisiting Learning to Delegate: LLM Discovered Heuristics for Large-Scale Vehicle Routing

Zhengyang Wang, Renfei Tan, Shuze Daniel Liu, David Simchi-LeviarXiv 2026

It’s late, you’ve had a long day, and the last thing you want to think about is the traveling salesperson problem on steroids. But imagine you’re running a logistics empire. You have thousands of packages and a fleet of trucks with limited capacity. Finding the perfect route for every driver isn't just a math puzzle; it’s a multi-million dollar optimization problem known as the Capacitated Vehicle Routing Problem (CVRP).

When these problems get massive—thousands of customers—you can’t solve them all at once. Instead, you use a "select-solve-merge" strategy: pick a small group of routes (a "delegation"), fix them using a specialized solver, and merge the improvements back into the master plan.

The million-dollar question is: How do you pick which routes to fix? This paper, Revisiting Learning to Delegate, suggests we stop trying to train complex neural networks to do it and instead ask a Large Language Model (LLM) to write the rules for us.

TL;DR

Researchers used an LLM to automatically "discover" Python-based heuristics for selecting subproblems in large-scale vehicle routing. These human-readable, LLM-generated rules not only matched the performance of specialized neural networks on familiar data but actually beat them when faced with larger, unfamiliar "out-of-distribution" problems.

What Problem Does This Paper Address?

Solving large-scale CVRP is a nightmare of combinatorial complexity. Traditional methods rely on "hand-crafted" heuristics—rules of thumb designed by experts over decades. Recently, researchers tried replacing these experts with "Learning to Delegate" (L2D) models—neural networks trained to predict which subproblems are worth solving.

However, neural networks are "black boxes." They are hard to interpret, expensive to train, and—most importantly—they often "brittle" out. If you train a model on 500 customers in a uniform grid, it might fall apart when you give it 2,000 customers clustered in a city center. The authors wanted to see if an LLM could discover generalizable, interpretable programs that handle this scale and variety better than a neural net.

Methods

The authors propose a framework for Automatic Heuristic Design (AHD). Think of it as an evolutionary loop where the LLM is the scientist:

  1. Hypothesis + Code: The LLM (specifically GPT-4o/Astra) proposes a "design hypothesis" (e.g., "Let's prioritize routes with high overlap") and writes the Python code to implement it.
  2. The Loop: The system picks a delegation of routes, uses a fixed solver (like LKH or HGS) to re-optimize them, and checks if the total cost went down.
  3. Evaluation & Feedback: The program is tested on a "discovery panel" of routing instances. The results (how much cost was reduced) are fed back to the LLM.
  4. Refinement: The LLM looks at the feedback, tweaks its hypothesis, and writes a better version of the code.
The Select-solve-merge procedure and the AHD discovery/validation pipeline.

Crucially, once the LLM "discovers" the best program, you don't need the LLM anymore. You just run the Python code, making it incredibly fast and cheap to deploy.

Datasets

The researchers tested their method on two main families of synthetic CVRP instances:

  • CVRP-S: 500-customer instances used for discovery and validation. These follow the distributions (Uniform, Clustered, Mixed) used in previous L2D research.
  • CVRP-X: The "stress test." These are out-of-distribution instances that vary depot placement, customer demand, and vehicle capacity. They also scaled these up to 1,000 and 2,000 customers to test how well the rules handle massive growth.

Key Insights and Ideas

  • Interpretability is a Superpower: Because the LLM produces Python code and a written hypothesis, researchers can actually see why a strategy works. For example, "Policy 135" (the winner) focuses on moving short customer sequences between routes and avoids repeating the same unsuccessful repairs.
  • Generalization via Logic: Neural networks often overfit to the specific geometry of their training data. LLM-generated heuristics, being algorithmic in nature, seem to capture the underlying logic of routing, allowing them to perform even better as the problems get larger.
  • The "Exploratory" Surprise: During discovery, some programs (like Policy 143 and 147) ranked lower on the validation set but actually performed better than the primary choice on the toughest test cases. This suggests that LLMs are capable of generating a diverse "zoo" of useful strategies.
Evaluation of proposals during the discovery phase. The step line shows the improvement of the best-retained program over time.

Key Results

  • Outperforming Neural Nets: On the CVRP-X (out-of-distribution) test set, the LLM-discovered Policy 135 achieved significantly higher cost reductions than the L2D neural baselines across all sizes (500, 1000, and 2000 customers).
  • Scaling Up: The advantage of the LLM policy actually increased as the problem size grew. On 2,000-customer instances, it outperformed the L2D models by up to 0.62 percentage points in cost reduction—a significant margin in the world of logistics.
  • Efficiency: The entire discovery campaign cost about $110 in API charges. Once discovered, the heuristic requires zero LLM calls to run, making it as efficient as a hand-coded rule.

Limitations and Future Work

The authors note that their validation panel was limited to 500-customer instances. A more robust future approach might involve validating on a wider variety of scales to pick the most resilient program. Additionally, while the LLM is great at picking which routes to fix, the "repair" itself is still handled by traditional solvers. Future work could involve letting the LLM design the repair heuristics themselves.

Finally, the authors suggest this "Learning to Delegate" framework could be applied far beyond trucks and packages—think multi-agent pathfinding in giant warehouses or inventory management across global supply chains.

Summary updated

Abstract

Efficient vehicle routing is critical to logistics and transportation, yet solving large-scale capacitated vehicle routing problems (CVRP) remains computationally challenging due to their combinatorial complexity. One approach to solve large-scale vehicle routing optimization is to identify promising subproblems and then optimize them using solvers. In this paper, we propose a framework of automatic heuristic design (AHD) in which a large language model (LLM) autonomously refines heuristics for selecting subproblems, enabling effective optimization of large-scale CVRP instances. Compared to prior approaches that train task-specific neural networks to select among heuristically constructed subproblems, our method discovers generalizable, interpretable LLM-generated heuristics to directly construct subproblems. Experiments show that our approach achieves comparable in-distribution performance while outperforming neural network-based policies on out-of-distribution instances with large-scale problems.
BibTeX
@misc{wang2026revisiting,
  author = {Zhengyang Wang and Renfei Tan and Shuze Daniel Liu and David Simchi-Levi},
  title = {{Revisiting Learning to Delegate: LLM Discovered Heuristics for Large-Scale Vehicle Routing}},
  year = {2026},
  eprint = {2611.31090},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31090},
}
Figure