NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Reinforcement Learning-based Non-Autoregressive Solver for Traveling Salesman Problems

Yubin Xiao, Di Wang, Huanhuan Chen, Boyang Li, Wei Pang, Xuan Wu, Hao Li, Dong Xu, Yanchun Liang, You Zhou · DOI

Introduction

The Traveling Salesman Problem (TSP) remains a cornerstone of combinatorial optimization. Recent deep learning approaches have diverged into two main paradigms: Autoregressive (AR) models, which offer high accuracy through sequential node generation but suffer from slow inference, and Non-Autoregressive (NAR) models, which provide rapid parallelized predictions but often at the cost of solution quality.

NAR4TSP addresses this gap as the first NAR solver successfully trained via Reinforcement Learning (RL). By moving away from Supervised Learning (SL), which requires expensive optimal labels, NAR4TSP achieves a balance of speed, accuracy, and generalization.

Taxonomy of TSP solvers highlighting the unique position of NAR4TSP.

Architecture and Methodology

The core of NAR4TSP is a specialized Graph Neural Network (GNN) designed to output both a starting-node pointer and an edge score matrix.

Model Architecture

The architecture utilizes multiple GNN modules and fully connected layers to process node coordinates and distances. A key feature is the starting-node pointer, a learnable component that identifies the optimal entry point for the tour. This deviates from standard NAR models that typically default to a fixed starting node, allowing for more flexible and efficient tour construction.

The NAR4TSP model architecture, illustrating the flow from input embeddings to the pointer and edge score outputs.

Consistent Sequential Constraints

To ensure the model produces valid Hamiltonian cycles, NAR4TSP integrates a decoding process—such as greedy or beam search—directly into the training loop. This consistency between training and inference allows the RL agent to learn the downstream impact of its edge predictions, enforcing constraints like "visit every node exactly once" during the weight update phase.

Reinforcement Learning Strategy

The training employs a "self-critical" RL approach. For each instance, the model generates two tours: one through Bernoulli sampling for exploration and another via greedy search to serve as a baseline. The relative difference in tour lengths provides the reward signal, enabling label-free optimization.

Evaluation and Results

NAR4TSP was evaluated across synthetic datasets (up to 1000 nodes) and real-world benchmarks like TSPLIB.

  • Efficiency and Speed: The model is approximately 90x faster than state-of-the-art AR models while maintaining an optimality gap within 1-2%. It is also parameter-efficient, using only ~0.91M parameters compared to ~11M in previous NAR architectures.
  • Generalization: Due to the parameter-sharing nature of GNNs, NAR4TSP demonstrates strong zero-shot generalization. A model trained on 50-node instances can effectively solve 1000-node problems, outperforming many existing neural solvers on the TSPLIB benchmark.

Conclusion

NAR4TSP represents a significant advancement in neural TSP solvers by combining the speed of NAR architectures with the flexibility of RL. While a small quality gap remains compared to the most intensive AR solvers, its efficiency and generalization capabilities make it a powerful tool for large-scale combinatorial optimization. Future research may explore semi-autoregressive variants to further refine the speed-accuracy trade-off.

Summary updated

BibTeX
@misc{xiao2023reinforcement,
  author = {Yubin Xiao and Di Wang and Huanhuan Chen and Boyang Li and Wei Pang and Xuan Wu and Hao Li and Dong Xu and Yanchun Liang and You Zhou},
  title = {{Reinforcement Learning-based Non-Autoregressive Solver for Traveling Salesman Problems}},
  year = {2023},
  eprint = {2308.00560},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.00560},
}
Figure