[Paper Review] Attention Solves Your TSP.
This paper proposes an attention-based reinforcement learning framework for solving the 2D Euclidean TSP, replacing the Pointer Network with a pure graph attention architecture trained via REINFORCE and a dynamic greedy baseline. It achieves a 75% reduction in optimality gap (to 0.33%) for 20-node TSP instances and 50% reduction (to 2.28%) for 50-node instances, significantly outperforming prior learning-based methods.
We propose a framework for solving combinatorial optimization problems of which the output can be represented as a sequence of input elements. As an alternative to the Pointer Network, we parameterize a policy by a model based entirely on (graph) attention layers, and train it efficiently using REINFORCE with a simple and robust baseline based on a deterministic (greedy) rollout of the best policy found during training. We significantly improve over state-of-the-art results for learning algorithms for the 2D Euclidean TSP, reducing the optimality gap for a single tour construction by more than 75% (to 0.33%) and 50% (to 2.28%) for instances with 20 and 50 nodes respectively.
Motivation & Objective
- To address the limitations of existing deep learning methods for combinatorial optimization, particularly the Pointer Network, in solving the TSP.
- To develop a model that uses only graph attention layers for policy parameterization, avoiding autoregressive decoding with pointer mechanisms.
- To improve sample efficiency and performance in reinforcement learning for TSP by introducing a dynamic baseline based on greedy rollouts of the best policy found during training.
- To achieve state-of-the-art performance in learning-based TSP solving with minimal architectural modifications.
Proposed method
- The policy is parameterized entirely using multi-head graph attention layers, enabling end-to-end learning of sequence generation for TSP tours.
- Reinforcement learning is performed using the REINFORCE algorithm with advantage estimation.
- A dynamic baseline is employed, which maintains the best policy observed during training and uses its greedy rollout to reduce policy gradient variance.
- The model is trained on a large dataset of TSP instances with 20 and 50 nodes, using a reward shaped as the negative tour length.
- The attention mechanism computes context-aware representations of nodes, allowing the model to attend to relevant nodes at each step of tour construction.
- The final tour is generated autoregressively by attending to the current node and the remaining unvisited nodes.
Experimental results
Research questions
- RQ1Can a pure attention-based architecture outperform the Pointer Network in learning to solve the TSP?
- RQ2Does using a dynamic greedy baseline improve sample efficiency and performance in REINFORCE-based training for TSP?
- RQ3To what extent can self-attention mechanisms capture long-range dependencies and structural patterns in TSP instances?
- RQ4How does the proposed method compare to prior learning-based approaches in terms of optimality gap on standard TSP benchmarks?
- RQ5Can the model generalize across different TSP instance sizes without architectural retraining?
Key findings
- The proposed method reduces the optimality gap to 0.33% for 20-node TSP instances, representing a 75% improvement over previous learning-based methods.
- For 50-node TSP instances, the optimality gap is reduced to 2.28%, marking a 50% improvement over prior learning-based approaches.
- The model achieves state-of-the-art performance on both 20- and 50-node TSP benchmarks using only attention layers and a dynamic baseline.
- The dynamic baseline significantly improves training stability and convergence speed compared to static or baseline-free alternatives.
- The attention mechanism enables effective modeling of node relationships without relying on pointer networks or recurrence.
- The framework generalizes well across different instance sizes and maintains high performance without architectural retraining.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.