Towards Feature-free TSP Solver Selection: A Deep Learning Approach

Kangfei Zhao, Shengcai Liu, Yu Rong, Jeffrey Xu Yu · DOI

Abstract

The Travelling Salesman Problem (TSP) is a classical NP-hard problem with broad applications in logistics and industry. Due to the diversity of TSP instances, no single solver dominates all others, necessitating per-instance solver selection. We propose CTAS (Convolution-based TSP Solver Selection), the first deep learning framework for end-to-end TSP solver selection. CTAS utilizes deep convolutional neural networks to extract informative features from TSP instances represented as density maps. To handle data scarcity, we employ safe data augmentation strategies. We also introduce a new benchmark of 6,000 instances, the largest to date. CTAS achieves over a 2x speedup in average running time compared to the single best solver and outperforms state-of-the-art statistical models.

Introduction

The Traveling Salesman Problem (TSP) remains a cornerstone of combinatorial optimization. While advanced solvers like LKH and EAX provide high-quality solutions, their performance varies significantly across different instance distributions. This variability necessitates Algorithm Selection (AS)—the task of predicting the most efficient solver for a specific instance.

Historically, AS has relied on manual feature engineering, where experts define mathematical descriptors to characterize instances. This process is labor-intensive and often fails to capture complex spatial nuances. We introduce CTAS, a "feature-free" approach that learns representations directly from raw data by treating TSP instances as images.

Methodology: From Points to Pixels

The core innovation of CTAS is the transformation of a 2D point cloud into a format suitable for computer vision models.

Instance-to-Image Transformation

To process a TSP instance with $n$ points, we first normalize the coordinates and map them onto a $64 \times 64$ grid. Each cell in the grid stores a count of the points it contains, creating a raw density map.

The raw 2D point cloud of a TSP instance.

To ensure the neural network can effectively capture fine-grained spatial patterns, this grid is up-scaled to a $256 \times 256$ image. This representation allows standard CNN architectures to treat the TSP instance as a single-channel image where "pixel intensity" represents point density.

The up-scaled density map used as input for the deep learning model.

Model Architecture and Training

We utilize ResNet18 and ResNet34 architectures to extract features from these density maps. Rather than simple classification, we employ a regression strategy. The model predicts the actual running time for each solver in the portfolio. This approach is more robust than classification because it accounts for the relative performance differences between solvers, helping the system avoid "disastrously slow" choices.

Safe Data Augmentation

To improve generalization, we apply random horizontal flips, vertical flips, and rotations. These are "safe" augmentations because they preserve the underlying geometric structure and difficulty of the TSP instance, unlike cropping or adding noise.

Experimental Setup

We constructed a massive benchmark of 6,000 TSP instances using six different generators (uniform, explosion, implosion, expansion, cluster, and grid) to ensure a diverse range of spatial distributions. Our solver portfolio includes six state-of-the-art solvers and variants: LKH, LKHr, LKHc, EAX, EAXr, and MAOS.

Key Results

CTAS demonstrates significant improvements over both individual solvers and traditional statistical models:

  • Efficiency: CTAS achieved a 2x speedup in average running time compared to the Single Best Solver (EAXr).
  • Accuracy: Using the PAR10 metric (which penalizes timeouts), the regression-based ResNet34 model scored 36.89s, significantly better than the best traditional model (41.01s) using hand-crafted Pihera features.
  • Robustness: While individual solvers often struggle with specific distributions (e.g., EAX on "expansion" instances), CTAS consistently selects a high-performing solver across all types.

Conclusion

CTAS marks a milestone in algorithm selection by proving that learned spatial features can outperform expert-designed ones. By treating TSP instances as density maps, we leverage the power of modern computer vision to solve a classical optimization problem. Future work will explore extending this framework to non-Euclidean and higher-dimensional problems using Graph Neural Networks.

Summary updated

BibTeX
@inproceedings{zhao2021towards,
  author = {Kangfei Zhao and Shengcai Liu and Yu Rong and Jeffrey Xu Yu},
  title = {{Towards Feature-free TSP Solver Selection: A Deep Learning Approach}},
  booktitle = {IJCNN},
  year = {2021},
  doi = {10.1109/ijcnn52387.2021.9533538},
}
Figure