An Efficient Diffusion-based Non-Autoregressive Solver for Traveling Salesman Problem

Mingzhao Wang, You Zhou, Zhiguang Cao, Yubin Xiao, Xuan Wu, Wei Pang, Yuan Jiang, Hui Yang, Peng Zhao, Yuanshu Li

Abstract

Neural solvers for the Traveling Salesman Problem (TSP) often face a trade-off between the high solution quality of slow autoregressive (AR) models and the speed of non-autoregressive (NAR) models. While diffusion models have shown promise, their multi-step sampling process typically negates the speed advantages of NAR approaches. This paper presents DEITSP, an efficient diffusion-based solver that utilizes a one-step self-consistency constraint and a novel iterative "add-and-remove" noise strategy. By employing a dual-modality graph transformer and an inverse noise schedule, DEITSP achieves inference speeds 7-13 times faster than existing diffusion-based solvers while maintaining state-of-the-art solution quality and strong generalization to real-world instances.

Introduction

The Traveling Salesman Problem (TSP) is a fundamental combinatorial optimization challenge: finding the shortest Hamiltonian cycle in a graph. Traditional exact solvers like Concorde provide optimal solutions but scale poorly. Recent deep learning approaches have introduced neural solvers, categorized into Autoregressive (AR) and Non-Autoregressive (NAR) models. AR models generate routes sequentially, achieving high accuracy at the cost of significant latency. Conversely, NAR models predict edge probabilities in parallel, offering high speed but often lower solution quality.

Diffusion models have recently emerged as a powerful framework for NAR solvers. However, standard diffusion relies on a multi-step Markov chain to refine noise into a solution, which reintroduces the latency issues that NAR models aim to avoid. This paper introduces DEITSP (Diffusion model with Efficient Iterations tailored for TSP), which bridges the gap between speed and quality.

Methodology

DEITSP is built upon three primary innovations designed to optimize diffusion for combinatorial optimization.

One-Step Diffusion via Self-Consistency

Unlike traditional diffusion models that require many denoising steps, DEITSP is trained with a self-consistency constraint. This allows the model to learn a direct mapping from any noise level $t$ back to the clean data $a_0$ in a single step. This "one-shot" capability is the foundation of the model's efficiency.

Overview of the diffusion and denoising process in DEITSP, showing the one-step mapping from various noise levels.

Iterative Denoising and Inverse Noise Scheduling

To improve solution quality without the overhead of a full Markov chain, DEITSP employs an "add-and-remove" noise iteration strategy. Starting from an initial prediction, the model iteratively adds a controlled amount of noise and then performs a one-step denoising. Every intermediate denoised output is decoded, and the best solution from the resulting pool is selected.

Comparison of the standard DDIM sampling versus the proposed iterative "add-and-remove" noise strategy.

The authors also introduce an inverse function noise schedule. Unlike linear or cosine schedules, this schedule allocates more iterations to low-noise levels. This is crucial for TSP because the optimal solution is highly sparse; high noise levels quickly destroy the structural signal, whereas low-noise iterations allow for effective local search and refinement of the edge set.

Dual-Modality Graph Transformer

The architecture utilizes a specialized transformer to handle the dual nature of TSP data: continuous node coordinates and discrete edge connections. By processing these modalities separately and fusing them through a mixing module, the model captures global structural dependencies more effectively than standard Graph Neural Networks (GNNs), requiring fewer layers and further reducing inference time.

Experiments and Results

The model was trained on synthetic 2D Euclidean TSP instances (sizes 20, 50, and 100) and evaluated on both in-distribution synthetic data and out-of-distribution real-world benchmarks.

Performance and Efficiency

DEITSP demonstrates a significant speedup over existing diffusion-based solvers. On TSP50 and TSP100, it is approximately 7 to 13 times faster than models like DIFUSCO and T2TCO. Despite this speed, the solution quality remains top-tier. With 16 iteration steps, DEITSP achieves an optimality gap of just 0.01% on TSP50 and 0.10% on TSP100 relative to the exact Concorde solver.

Generalization

A key strength of DEITSP is its ability to generalize. The model, trained on instances up to 100 nodes, successfully solved problems with 1000 nodes. Furthermore, it outperformed baselines on the TSPLIB benchmark and real-world city maps, indicating that it learns robust routing patterns rather than simply memorizing synthetic distributions.

Conclusion

DEITSP represents a significant advancement in neural TSP solvers, combining the speed of NAR models with the refinement capabilities of diffusion. By leveraging one-step self-consistency and an iterative local search strategy, it overcomes the latency bottlenecks of traditional diffusion. Future work includes exploring unsupervised training to remove the dependency on exact solvers for ground-truth labels and extending the framework to more complex vehicle routing problems.

Summary updated

BibTeX
@inproceedings{wang2025efficient,
  author = {Mingzhao Wang and You Zhou and Zhiguang Cao and Yubin Xiao and Xuan Wu and Wei Pang and Yuan Jiang and Hui Yang and Peng Zhao and Yuanshu Li},
  title = {{An Efficient Diffusion-based Non-Autoregressive Solver for Traveling Salesman Problem}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
}
Figure