DualOpt: A Dual Divide-and-Optimize Algorithm for the Large-scale Traveling Salesman Problem

Shipei Zhou, Yuandong Ding, Chi Zhang, Zhiguang Cao, Yan Jin

TL;DR

DualOpt is a novel "dual" divide-and-conquer framework that solves massive Traveling Salesman Problems (TSP) with up to 100,000 nodes. By combining grid-based partitioning with neural path optimization, it achieves a staggering 104x speedup over the industry-standard LKH3 solver while actually improving solution quality by up to 1.4%.

Introduction

The Traveling Salesman Problem (TSP)—finding the shortest route through $N$ cities—is a cornerstone of combinatorial optimization. While small instances are manageable, large-scale TSPs (10,000+ nodes) present significant computational challenges. Traditional exact solvers like Concorde become intractable at this scale, and high-quality heuristics like LKH3 can take hours or even days to converge on massive datasets.

Modern Machine Learning (ML) approaches often suffer from "distribution shift" and memory bottlenecks when scaling from training on small instances to solving massive ones. DualOpt bridges this gap by integrating classical heuristics with neural networks in a scalable, hierarchical framework.

Methods

The "Dual" in DualOpt refers to its two-stage optimization process:

  1. Grid-based Divide-and-Conquer: The algorithm partitions the 2D space into an $M \times M$ grid. Sub-problems within each grid are solved in parallel using the LKH3 heuristic. A novel edge-breaking strategy is used during merging: the algorithm "breaks" edges near boundaries while keeping internal partial routes intact, effectively reducing the problem size for subsequent iterations.
  2. Path-based Divide-and-Optimize: Once an initial global solution is formed, DualOpt refines it by breaking the long route into small, overlapping sub-paths (e.g., 50 nodes). A pre-trained Attention-based Neural Solver re-optimizes these sub-paths in parallel batches.
The DualOpt workflow illustrating the grid-based partitioning and edge-breaking strategy.

Datasets

The authors evaluated DualOpt on several benchmarks:

  • TSP_random: Synthetic Euclidean instances ranging from 1,000 to 100,000 nodes.
  • TSPLIB: Real-world instances from a standard library, including the massive pla85900 (85,900 nodes).
  • Training: Notably, the neural solver was trained only on small, 50-node instances, yet it demonstrated impressive zero-shot generalization to much larger problems.

Key Insights

  • Hierarchical Node Reduction: The edge-breaking strategy is a core innovation. By representing partial routes by their endpoints, the algorithm "shrinks" the problem size during merging, allowing local solvers to handle global merges without being overwhelmed by thousands of nodes.
  • ML as a Local Refiner: Instead of attempting end-to-end solving for massive instances, Transformers are used as high-speed local search operators. This plays to the strengths of neural networks in pattern recognition within fixed-size windows.
  • Parallelism: Both stages are designed for massive parallelism (CPUs for LKH3, GPUs for the neural solver), which is the primary driver of the significant speedup.

Key Results

DualOpt demonstrates state-of-the-art performance across various scales, outperforming both classical heuristics and recent ML-based methods:

  • Massive Speedup: For the largest instance (TSP100K), DualOpt finished in 8.6 minutes, compared to LKH3's 14.9 hours—a 104x speedup.
  • Superior Quality: On TSP100K, DualOpt found routes that were 1.40% shorter than those found by LKH3.
  • Robust Generalization: Despite being trained on uniform random data, the model performed excellently on the varied distributions of TSPLIB, proving the framework is not overfitted to synthetic data.
Performance comparison of DualOpt against LKH3 and various ML-based solvers across different TSP scales.

Limitations and Future Work

While powerful, DualOpt still relies on LKH3 as a sub-solver in its first stage. Furthermore, the current uniform grid partitioning could be improved with adaptive strategies like Quadtrees for highly clustered data. Future work includes extending this "dual" framework to more complex routing problems, such as the Vehicle Routing Problem (VRP) or problems with specific time windows.

Summary updated

BibTeX
@inproceedings{zhou2025dualopt,
  author = {Shipei Zhou and Yuandong Ding and Chi Zhang and Zhiguang Cao and Yan Jin},
  title = {{DualOpt: A Dual Divide-and-Optimize Algorithm for the Large-scale Traveling Salesman Problem}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i25.34926},
}
Figure