DAN: Decentralized Attention-based Neural Network to Solve the MinMax Multiple Traveling Salesman Problem

Yuhong Cao, Zhanhong Sun, Guillaume Sartoretti

Abstract

The Multiple Traveling Salesman Problem (mTSP) is a complex combinatorial optimization challenge with significant applications in robotics and logistics. This paper introduces the Decentralized Attention-based Neural Network (DAN), a deep reinforcement learning approach specifically designed for the MinMax mTSP objective—minimizing the longest individual tour. DAN utilizes a Transformer-based architecture that incorporates city, agent, and cross-attention encoders to facilitate implicit coordination among agents. Our results show that DAN provides high-quality solutions in seconds, maintaining linear scaling performance that surpasses traditional solvers like Google's OR-Tools for large-scale instances.

Introduction

The Traveling Salesman Problem (TSP) is a foundational problem in optimization, requiring the identification of the shortest route to visit a set of cities. The Multiple Traveling Salesman Problem (mTSP) extends this by employing $m$ agents. In many real-world scenarios, such as multi-robot coordination, the goal is not just to minimize total distance but to minimize the "makespan"—the time until the last agent completes its task. This is known as the MinMax mTSP.

Visualization of a MinMax mTSP solution with multiple agents.

Traditional exact solvers like Gurobi are computationally prohibitive for large instances, while heuristics like OR-Tools often struggle to balance speed and solution quality as the number of cities and agents increases.

Methodology

DAN treats the mTSP as a cooperative sequential decision-making problem. Each agent independently utilizes the same neural network to select its next destination, enabling decentralized execution.

The DAN Architecture

The core of DAN is a Transformer-based model consisting of four primary components:

  1. City Encoder: Employs self-attention to capture spatial relationships between cities.
  2. Agent Encoder: Models dependencies between agents, considering their current positions and remaining travel budgets.
  3. City-Agent Encoder: A novel cross-attention mechanism that allows agents to implicitly predict the intentions of others, preventing redundant path assignments.
  4. Decoder: Integrates the encoded information to produce a probability distribution over unvisited cities.
The DAN architecture featuring city, agent, and city-agent encoders.

Training and Execution

The model is trained using the REINFORCE algorithm within a Multi-Agent Reinforcement Learning (MARL) framework. A key feature is parameter sharing; all agents use the same weights, allowing the model to generalize to varying numbers of agents and cities without retraining. Decisions are made asynchronously—agents only select a new city upon arrival at their current destination—which naturally mitigates congestion and conflict. Additionally, the authors found that using coordinates relative to the agent, rather than absolute coordinates, significantly improved model performance.

Experimental Evaluation

DAN was evaluated against randomized instances (up to 1000 cities and 20 agents) and the TSPlib benchmark library.

Key Results

  • Scalability: Unlike traditional meta-heuristics that exhibit exponential growth in computation time, DAN’s execution time scales linearly with the number of cities.
  • Performance at Scale: On instances with 100 cities and 10 agents, DAN's sampling variant outperformed OR-Tools by approximately 10%. For very large instances (500+ cities), DAN provided solutions in seconds, whereas traditional solvers became impractical.
  • Coordination Efficiency: The cross-attention mechanism proved superior to explicit communication protocols, offering a computationally efficient way to achieve multi-agent coordination without high overhead.

Conclusion

DAN represents a significant step forward in solving the MinMax mTSP using deep reinforcement learning. By replacing explicit communication with implicit prediction via cross-attention, DAN achieves high-quality, decentralized coordination. Future work will focus on addressing limitations such as full observability requirements and incorporating real-world constraints like battery life and time windows.

Summary updated

BibTeX
@inproceedings{cao2022dan,
  author = {Yuhong Cao and Zhanhong Sun and Guillaume Sartoretti},
  title = {{DAN: Decentralized Attention-based Neural Network to Solve the MinMax Multiple Traveling Salesman Problem}},
  booktitle = {DARS},
  year = {2022},
  doi = {10.1007/978-3-031-51497-5\_15},
}
Figure