Multi-Task Learning for Routing Problem with Cross-Problem Zero-Shot Generalization

Fei Liu, Xi Lin, Qingfu Zhang, Xialiang Tong, Mingxuan YuanKDD 2024

Introduction

The Vehicle Routing Problem (VRP) is a cornerstone of logistics, encompassing the optimization of delivery routes under various constraints. However, real-world applications often involve a "zoo" of VRP variants, such as Capacitated VRP (CVRP), VRP with Time Windows (VRPTW), or Open VRP (OVRP). Traditional Neural Combinatorial Optimization (NCO) solvers are typically single-task specialists; a model trained for CVRP cannot effectively solve VRPTW. This specialization necessitates training separate models for every constraint combination, which is computationally prohibitive. This research introduces a unified neural solver capable of cross-problem zero-shot generalization, solving unseen VRP variants without additional fine-tuning.

Methodology: The Attribute-Sharing Model

The core innovation lies in decomposing complex VRP variants into fundamental "attribute blocks." Instead of treating each VRP type as a distinct task, the model identifies shared constraints like Capacity (C), Time Windows (TW), Open Routes (O), Backhauls (B), and Duration Limits (L).

Decomposition of VRP variants into shared attribute blocks.

The architecture utilizes an Attribute-Sharing Model based on the Attention Model (AM). Key components include:

  1. Unified Encoder-Decoder: A Transformer-style encoder embeds node features, while the decoder receives an "attribute vector" specifying active constraints.
  2. Attribute Composition Block: This block dynamically calculates infeasibility masks. For instance, if the "Time Window" attribute is active, it masks customers whose windows have closed, ensuring valid route construction.
  3. Multi-Task Reinforcement Learning: The model is trained using the REINFORCE algorithm on five VRP variants simultaneously, learning the underlying mechanics of each attribute rather than memorizing specific problem instances.

Evaluation and Datasets

The model's performance was rigorously tested across three categories:

  • Synthetic Variants: 11 VRP types, including 6 unseen during training to evaluate zero-shot capabilities.
  • CVRPLib Benchmarks: Standard industry sets (A, B, F, M, P, and X) with sizes up to 1,000 nodes.
  • Real-World Data: 64 instances derived from 30 days of historical logistics operations.

Key Results and Insights

The unified model demonstrates remarkable robustness and efficiency. By learning the "logic" of individual attributes, it can solve complex combinations (e.g., OVRPTW) at test time even if that specific combination was never encountered during training.

Performance gap comparison between single-task baselines and the proposed unified model across various VRP variants.

Superior Generalization

On unseen VRP variants, the unified model reduced the average performance gap to approximately 5%. In contrast, single-task baselines often exhibited gaps exceeding 20% when applied to different problem types. This suggests that training on diverse constraints helps the model learn more fundamental routing patterns.

Efficiency and Industry Performance

The unified model (1.35M parameters) effectively replaces five specialized models (totaling 6.56M parameters). Training time was reduced from 49 days (for five specialists) to just 10.5 days. In real-world logistics tests, the model maintained gaps of less than 5% on standard cases, significantly outperforming zero-shot single-task baselines.

Conclusion and Future Work

This research highlights that compositionality is key to solving the VRP zoo. While the model shows strong zero-shot performance, "fast fine-tuning" can further reduce performance gaps to 1-3%. Future work will explore expanding the attribute set to include multi-depot or heterogeneous fleet constraints and investigating more sophisticated multi-task optimization techniques like GradNorm to improve convergence.

Summary updated

BibTeX
@inproceedings{liu2024multi,
  author = {Fei Liu and Xi Lin and Qingfu Zhang and Xialiang Tong and Mingxuan Yuan},
  title = {{Multi-Task Learning for Routing Problem with Cross-Problem Zero-Shot Generalization}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
  url = {https://openreview.net/forum?id=ZZSnRqBAJf},
}
Figure