[Paper Review] Attention Solves Your TSP, Approximately
This paper proposes a graph attention network-based heuristic for the TSP that learns to construct near-optimal tours end-to-end, using REINFORCE with a dynamic baseline for efficient training. It reduces the optimality gap to 0.32% for 20-node instances, significantly outperforming prior learned heuristics.
The development of efficient (heuristic) algorithms for practical combinatorial optimization problems is costly, so we want to automatically learn them instead. We show the feasibility of this approach on the important Travelling Salesman Problem (TSP). We learn a heuristic algorithm that uses a Neural Network policy to construct a tour. As an alternative to the Pointer Network, our model is based entirely on (graph) attention layers and is invariant to the input order of the nodes. We train the model efficiently using REINFORCE with a simple and robust baseline based on a deterministic (greedy) rollout of the best policy so far. We significantly improve over results from previous works that consider learned heuristics for the TSP, reducing the optimality gap for a single tour construction from 1.51% to 0.32% for instances with 20 nodes, from 4.59% to 1.71% for 50 nodes and from 6.89% to 4.43% for 100 nodes. Additionally, we improve over a recent Reinforcement Learning framework for two variants of the Vehicle Routing Problem (VRP).
Motivation & Objective
- To develop an end-to-end trainable neural heuristic for the TSP that is invariant to node order.
- To improve upon existing learned heuristics by reducing the optimality gap in tour construction.
- To enable efficient training of the policy network using REINFORCE with a robust, adaptive baseline.
- To extend the method's effectiveness to variants of the Vehicle Routing Problem (VRP).
Proposed method
- The model uses a graph attention network (GAT) architecture to process node embeddings and attend over candidate nodes for tour construction.
- The policy network is trained via REINFORCE with a dynamic baseline that uses the best deterministic tour constructed so far.
- The model is permutation-invariant due to its attention-based architecture, ensuring consistent predictions regardless of input node order.
- Tour construction proceeds step-by-step, with the model selecting the next city based on attention scores over unvisited nodes.
- The training objective minimizes the negative expected tour length, encouraging the policy to learn high-quality tours.
- The method is evaluated on TSP and two VRP variants, demonstrating generalization beyond the TSP.
Experimental results
Research questions
- RQ1Can a pure attention-based neural network learn a competitive heuristic for the TSP that is invariant to input order?
- RQ2Does using a dynamic baseline in REINFORCE training lead to faster convergence and better performance than static or random baselines?
- RQ3How does the learned heuristic compare to prior learned and classical heuristics in terms of optimality gap across different instance sizes?
- RQ4Can the method be extended to solve variants of the Vehicle Routing Problem effectively?
Key findings
- The model reduces the optimality gap to 0.32% for 20-node TSP instances, down from 1.51% in prior work.
- For 50-node instances, the optimality gap is reduced from 4.59% to 1.71%.
- For 100-node instances, the optimality gap is reduced from 6.89% to 4.43%.
- The method outperforms previous learned heuristics on the TSP and also improves results on two VRP variants.
- The use of a dynamic baseline in REINFORCE training leads to stable and efficient learning.
- The model's attention mechanism enables permutation invariance, making it robust to input ordering.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.