NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Machine Learning-based Two-Stage Graph Sparsification for the Travelling Salesman Problem

Bo-Cheng Lin, Yi Mei, Mengjie ZhangarXiv 2026

Here is a concise, engaging blog-style summary of the research paper.

Rethinking TSP Sparsification: A Clever Two-Stage Machine Learning Approach

TL;DR

Instead of using heavy deep learning models to find optimal routes from scratch, this paper introduces a two-stage pipeline that combines classical heuristics with lightweight machine learning to prune Travelling Salesman Problem (TSP) graphs. By fusing two traditional heuristics, the authors create a "source provenance" signal that simplifies the learning task, reducing graph density by up to 47% while retaining over 99.69% of optimal edges across both Euclidean and non-Euclidean problems.

What Problem Does This Paper Address?

The Travelling Salesman Problem (TSP) is a cornerstone of combinatorial optimization. State-of-the-art exact and heuristic solvers (like the Lin-Kernighan-Helsgaun, or LKH, solver) don't actually look at every possible connection between cities. Doing so on a complete graph requires evaluating $O(N^2)$ edges, which quickly becomes computationally intractable. Instead, they operate on a candidate graph—a highly sparse subset of promising edges.

Designing these candidate graphs requires a delicate balance: they must be sparse enough to ensure fast search times, yet high-quality enough to contain the actual optimal tour edges (high coverage/recall). Traditional heuristics like $\alpha$-Nearest and POPMUSIC either end up too dense or lose accuracy at scale. Meanwhile, recent machine learning approaches try to predict edge importance directly from the complete graph, which is computationally expensive, scales poorly, and is almost exclusively limited to standard 2D Euclidean spaces.

Methods

The authors propose a two-stage framework that flips the standard machine learning logic on its head:

  1. Stage 1 (Heuristic Fusion): Instead of running ML on the full graph, they take the union of two leading classical heuristics: $\alpha$-Nearest and POPMUSIC. This initial step filters out the obviously bad edges, leaving a base candidate graph of roughly $\sim6N$ edges that achieves near-perfect optimal edge coverage ($\ge 99.96\%$). Crucially, this step tags each edge with its source provenance—whether it was selected by $\alpha$-Nearest, POPMUSIC, or both.
  2. Stage 2 (Learned Pruning): A lightweight, edge-independent classifier (such as Logistic Regression or XGBoost) is trained on distance-agnostic features (like ranks, ratios, and local statistics) alongside the source provenance tags. Because edges endorsed by both heuristics are almost always part of the optimal tour, the ML model's job is drastically simplified: it only needs to figure out which single-source edges to discard.

Finally, instead of using a flawed global threshold to cut edges, the authors introduce a novel node-level softmax selection rule to ensure every city maintains a structurally feasible number of connections.

[Full Graph O(N²)] ➔ Stage 1: Heuristic Union (α-Nearest ∪ POPMUSIC) ➔ [Sparse Graph ~6N + Provenance Tags] ➔ Stage 2: Lightweight ML Pruning ➔ [Final Ultra-Sparse Candidate Graph]

Datasets

The method was evaluated on a comprehensive benchmark consisting of 20 TSP families, generated by crossing:

  • 4 Distance Types: Rounded Euclidean (EUC_2D), Manhattan (MAN_2D), Great-Circle/Sphere (GEO), and pseudo-Euclidean (ATT).
  • 5 Spatial Distributions: Uniform, Clustered, Grid-jitter, Outlier mixture, and Corridor.

Models were trained on 100,000 instances at problem size $N=100$ and evaluated on out-of-training sizes ($N=50, 200, 500$) to test how well the learned features generalize across scales.

Key Insights and Ideas

  • Complementary Failure Modes: The authors discovered that $\alpha$-Nearest and POPMUSIC fail in completely different ways. $\alpha$-Nearest misses long chords on geometric extremes, while POPMUSIC misses moderate-length edges that cross subproblem boundaries. Their union perfectly covers each other's blind spots.
  • The Power of Consensus: The "aha moment" of the paper is the utilization of source provenance. If both classical algorithms agree an edge is good, it is almost guaranteed to be optimal. This transforms a massive needle-in-a-haystack $O(N^2)$ classification problem into a much simpler filtering task on a tiny subset of edges.
  • Geometry Agnosticism: By avoiding coordinate-based features and relying purely on edge-weight ranks and local statistics, the exact same machine learning model seamlessly generalizes to non-Euclidean metrics (like Manhattan or spherical distances) without any per-type tuning.

Key Results

  • Significant Sparsification: The pipeline successfully reduced candidate-graph density by 37% to 47% while retaining $\ge 99.69\%$ of optimal-tour edges.
  • Downstream Speedups: When these pruned graphs were fed into the LKH solver, it achieved a 1.21× to 1.28× speedup with absolutely zero degradation in final solution quality.
  • Outperforming Deep Learning: On the TSP500 benchmark, the lightweight Union + XGBoost method matched or exceeded the coverage of recent, heavy GPU-dependent neural sparsifiers (like DIFUSCO and AttGCN) while maintaining a lower graph density.
  • Excellent Scale Transfer: Even though the models were only trained on small graphs ($N=100$), they transferred stably to instances five times larger ($N=500$).

Limitations and Future Work

The primary bottleneck of this pipeline is not the machine learning step (which takes mere milliseconds), but Stage 1 data preparation. Computing the classical $\alpha$-values and POPMUSIC subproblems dominates the runtime at larger scales (taking up to ~15 seconds at TSP500).

The authors note that future performance gains will need to come from optimizing Stage 1 via parallelization or candidate caching. Additionally, they point to two exciting future directions: establishing theoretical coverage guarantees for the learned pruning step, and replacing the hand-crafted features with a Graph Neural Network (GNN) explicitly trained to exploit the source-provenance signals.

Summary updated

BibTeX
@misc{lin2026machine,
  author = {Bo-Cheng Lin and Yi Mei and Mengjie Zhang},
  title = {{Machine Learning-based Two-Stage Graph Sparsification for the Travelling Salesman Problem}},
  year = {2026},
  eprint = {2604.20236},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.20236},
}

Loading related content...

Figure