A First Guess is Rarely the Final Answer: Learning to Search in the Traveling Salesperson Problem
Organizations: University of the Basque Country (UPV/EHU)
Abstract
Most neural solvers for the Traveling Salesperson Problem (TSP) are trained to output a single solution, even though practitioners rarely stop there: at test time, they routinely spend extra compute on sampling or post-hoc search. This raises a natural question: can the search procedure itself be learned? Neural improvement methods take this perspective by learning a policy that applies local modifications to a candidate solution, accumulating gains over an improvement trajectory. Yet learned improvement for TSP remains comparatively immature, with existing methods still falling short of robust, scalable performance. We argue that a key reason is design mismatch: many approaches reuse state representations, architectural choices, and training recipes inherited from single-solution methods, rather than being built around the mechanics of local search. This mismatch motivates NICO-TSP (Neural Improvement for Combinatorial Optimization): a 2-opt improvement framework for TSP. NICO-TSP represents the current tour with exactly edge tokens aligned with the neighborhood operator, scores 2-opt moves directly without tour positional encodings, and trains via a two-stage procedure: imitation learning to short-horizon optimal trajectories, followed by critic-free group-based reinforcement learning over longer rollouts. Under compute-matched evaluations that measure improvement as a function of both search steps and wall-clock time, NICO-TSP delivers consistently stronger and markedly more step-efficient improvement than prior learned and heuristic search baselines, generalizes far more reliably to larger out-of-distribution instances, and serves both as a competitive replacement for classical local search and as a powerful test-time refinement module for constructive solvers.
Figures & tables
| Uniform Euclidean TSP | TSPLIB-gen | |||||||
| Method | ||||||||
| Cost | Time (s) | Cost | Time (s) | Cost | Time (s) | Cost | Time (s) | |
| Optimum | 5.6705 | 7.7352 | 16.5396 | 5.6911 | ||||
| 2opt Local Search | 5.9466 | 3.39 | 8.3318 | 6.43 | 18.2049 | 37.53 | 6.0862 | 6.81 |
| 3opt Local Search | 5.8338 | 6.54 | 8.0875 | 12.37 | 17.5621 | 3766.41 | 5.9126 | 10.97 |
| Tabu Search | 5.9474 | 14.65 | 8.2621 | 31.31 | 17.9746 | 307.94 | 6.0668 | 31.40 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Setting | Mean | Std. train ( ) | Std. infer ( ) |
|---|---|---|---|
| unif50 | |||
| unif100 | |||
| unif500 | |||
| tsplib100 |
| Component | Variant | Best Cost |
| Stabilization stack | Base RL model | 9.235 |
| + AdamW | 9.129 | |
| + 8 heads | 8.951 | |
| + RMSNorm | 8.930 | |
| + Mean pooling | 8.876 | |
| History mechanism | No history (Base + Stabilization stack) | 8.876 |
| Factor | Setting | Best cost | Relative training cost |
|---|---|---|---|
| Group size | 7.747 | 0.629 | |
| 7.744 | 0.843 | ||
| 7.742 | 1.000 | ||
| 7.742 | 1.846 | ||
| Rollout horizon | 7.856 | 0.179 | |
| 7.778 | 0.194 |
Traveling Salesperson Problem
The Traveling Salesperson Problem studies algorithms for finding shortest tours that visit every city exactly once.
See all 38 papers