Introduction
The Traveling Salesperson Problem (TSP) is a classic NP-hard combinatorial optimization problem with massive implications for logistics, transportation, and automation. While exact solvers like Concorde can find perfect solutions, they are often too slow for real-time applications, such as dynamically re-routing a delivery fleet.
Existing fast alternatives generally fall into two camps: classical heuristics, which are efficient but often rigid, and Machine Learning (ML) approaches, which frequently struggle with generalization. For instance, an ML model trained to solve 20-city problems usually fails when tasked with a 100-city problem. To bridge this gap, this paper introduces a hybrid solver that combines the pattern-recognition power of Graph Neural Networks (GNNs) with the robust search capabilities of Guided Local Search (GLS).
A Hybrid Architecture: GNN Meets Local Search
The core innovation of this work is a hybrid architecture that uses ML to provide high-level guidance to a classical Operations Research (OR) algorithm.
The pipeline relies on three key mechanisms:
- Predicting Global Regret: Unlike previous models that attempt binary classification (predicting if an edge is strictly "in" or "out" of the optimal tour), this model predicts global regret. Regret is the extra distance added to a tour if you force a specific edge to be included. This continuous cost signal helps the search algorithm prioritize which edges to explore or avoid.
- The Line Graph Trick: Standard GNNs operate on city locations (nodes). This approach transforms the TSP graph into a line graph, where the edges of the original graph become the nodes of the new graph. This allows the model to ignore absolute coordinates and focus entirely on edge weights (distances), making the model rotation and translation invariant.
- Guided Local Search (GLS): The predicted regrets are fed into GLS, a metaheuristic that sits on top of standard local search. When the search gets stuck in a local optimum, GLS uses the GNN’s regret predictions to penalize bad edges, effectively pushing the search toward more promising areas of the solution space.
Key Insights and Generalization
By using the line graph and focusing only on edge weights, the model learns the underlying logic of the TSP rather than memorizing spatial patterns. Furthermore, predicting regret rather than binary inclusion allows the solver to differentiate between "slightly suboptimal" edges and "disastrously expensive" ones.
Because the ML model provides a highly informed "warm start" and the GLS continuously improves the solution over time, the algorithm functions as an "anytime" solver. It can be stopped at any point to yield the best solution found so far, a critical feature for real-world robotics and logistics.
Results and Performance
The researchers evaluated the model on 2D Euclidean TSP instances (20, 50, and 100 nodes) and tested its sim-to-real transfer on TSPLIB, a standard library of real-world TSP instances.
The hybrid approach demonstrated significant improvements over existing learning-based solvers:
- Superior Accuracy: On 100-node problems, the approach reduced the mean optimality gap (the distance from the perfect solution) from 1.534% to 0.705%, a 2x improvement over previous state-of-the-art learning methods.
- Massive Generalization Gains: When a model trained only on 20-node instances was tested on 100-node instances, it reduced the optimality gap from 18.845% (baselines) to 2.622%—a 7x improvement.
- Fast Convergence: The model reaches optimal or near-optimal solutions significantly faster than competing learning-based solvers.
Limitations and Future Work
While highly effective, the model currently relies on supervised learning, requiring "ground truth" optimal solutions from exact solvers like Concorde to train. This limits training to problem sizes that Concorde can solve reasonably quickly. Additionally, transforming a graph into a line graph increases the number of nodes significantly ($O(n^2)$), consuming substantial GPU memory for very large TSPs. Future work may explore Reinforcement Learning (RL) to eliminate the need for labeled data and investigate ways to scale the line graph approach to instances with thousands of nodes.
Summary updated