Learning TSP Requires Rethinking Generalization

Chaitanya K. Joshi, Quentin Cappart, Louis-Martin Rousseau, Thomas Laurent, Xavier BressonarXiv 2020 · DOI

Abstract: End-to-end training of neural network solvers for graph combinatorial optimization problems such as the Travelling Salesperson Problem (TSP) have seen a surge of interest recently, but remain intractable and inefficient beyond graphs with few hundreds of nodes. While state-of-the-art learning-driven approaches for TSP perform closely to classical solvers when trained on trivially small sizes, they are unable to generalize the learnt policy to larger instances at practical scales. This work presents an end-to-end neural combinatorial optimization pipeline that unifies several recent papers in order to identify the inductive biases, model architectures and learning algorithms that promote generalization to instances larger than those seen in training. Our controlled experiments provide the first principled investigation into such zero-shot generalization, revealing that extrapolating beyond training data requires rethinking the neural combinatorial optimization pipeline, from network layers and learning paradigms to evaluation protocols. Additionally, we analyze recent advances in deep learning for routing problems through the lens of our pipeline and provide new directions to stimulate future research.

The Challenge of Scaling Combinatorial Optimization

The Travelling Salesperson Problem (TSP) is a foundational NP-hard combinatorial optimization problem. While exact solvers like Concorde are highly effective, their computational cost becomes prohibitive as the number of nodes increases. Deep learning offers a potential alternative: training Graph Neural Networks (GNNs) to learn heuristics that provide near-instant solutions at inference time.

However, a significant bottleneck exists. Most neural solvers are trained on small instances (e.g., 20-50 nodes) due to the high computational cost of training on large graphs. When these models are evaluated on larger graphs (e.g., 200+ nodes), their performance often collapses, frequently falling behind simple, non-learnt heuristics like "furthest insertion." This research investigates how to design neural solvers that achieve "zero-shot" generalization—performing well on large scales without retraining.

A Unified Pipeline for Neural TSP

To systematically study the components of neural TSP solvers, the authors propose a five-stage pipeline:

  1. Problem Definition: Formulating TSP as a graph and applying sparsification (e.g., $k$-nearest neighbors) to manage scale.
  2. Graph Embedding: Utilizing GNNs to create mathematical representations of nodes and edges.
  3. Solution Decoding: Comparing Autoregressive (AR) decoding (sequential tour construction) versus Non-autoregressive (NAR) decoding (simultaneous edge prediction).
  4. Solution Search: Employing greedy or beam search to convert probabilities into a final tour.
  5. Policy Learning: Evaluating Supervised Learning (SL) with optimal labels versus Reinforcement Learning (RL) by minimizing tour length directly.

Architectural Biases for Zero-Shot Generalization

The study identifies several critical design choices that promote generalization to larger instances:

  • Aggregation Functions: While "SUM" aggregation is theoretically more expressive for GNNs, it generalizes poorly because node degrees shift as graphs scale, leading to embedding instability. MEAN and MAX aggregations are more robust as they are agnostic to the number of neighbors.
  • Normalization Strategies: Standard BatchNorm fails during scale-up because it relies on fixed statistics from small training graphs. LayerNorm or BatchNorm with running statistics are essential for handling distribution shifts.
  • Decoding Inductive Biases: Autoregressive decoding provides a powerful sequential bias. Even without complex graph information, AR models generalize better than NAR models because they inherently respect the constraint of building a continuous tour.
  • Learning Paradigms: Supervised Learning is limited by the availability of optimal labels for large graphs. Reinforcement Learning, though slower initially, continues to improve as it processes more data, making it more suitable for long-term scaling.

Results: Bridging the Generalization Gap

By integrating the identified biases—specifically MAX aggregation, BatchNorm with running statistics, and AR decoding—the authors developed models that significantly outperform previous state-of-the-art methods on TSP200 instances after training only on TSP20-50.

Comparison of training efficiency and wall-clock time for various neural TSP solvers evaluated on TSP200 instances.

As shown in the figure above, different learning strategies exhibit varying efficiencies. While pretraining and finetuning can reduce the optimality gap more quickly than training from scratch, many complex neural models still struggle to beat the simple Insertion Heuristic (brown line) within a fixed computational budget. This highlights the "heuristic hurdle": for large graphs, simple heuristics often remain the most efficient solvers unless the neural model is specifically architected for generalization.

Conclusion and Future Directions

While this work identifies key biases for generalization, neural models still face challenges in maintaining global context as graphs grow. Future research may focus on Geometric Deep Learning to incorporate symmetries directly into architectures, or Hybrid Solvers that use GNNs to guide classical local search algorithms like Lin-Kernighan-Helsgaun. Ultimately, rethinking the neural combinatorial optimization pipeline is essential for moving beyond small-scale toy problems toward real-world utility.

Summary updated

BibTeX
@misc{joshi2020learning,
  author = {Chaitanya K. Joshi and Quentin Cappart and Louis-Martin Rousseau and Thomas Laurent and Xavier Bresson},
  title = {{Learning TSP Requires Rethinking Generalization}},
  year = {2020},
  eprint = {2006.07054},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.07054},
}
Figure