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

Learning Lagrangian Multipliers for the Travelling Salesman Problem

Augustin Parjadis, Quentin Cappart, Bistra Dilkina, Aaron M. Ferber, Louis-Martin Rousseau

TL;DR

While most machine learning research for the Travelling Salesman Problem (TSP) focuses on finding good routes (the primal side), this paper tackles the harder task of proving optimality (the dual side). By using an unsupervised Graph Neural Network (GNN) to predict Lagrangian multipliers for the classic Held-Karp relaxation, the authors significantly accelerate exact branch-and-bound solvers, cutting execution times by 10% and halving remaining optimality gaps.

What Problem Does This Paper Address?

To solve the NP-hard Travelling Salesman Problem exactly, a solver cannot just find the shortest tour; it must mathematically prove that no shorter tour exists. This proof relies on computing a tight "dual bound"—a lower limit on the total cost.

The gold standard for generating these bounds is the Held-Karp relaxation, which simplifies the TSP into a simpler combinatorial structure called a minimum 1-tree. However, to make this bound as tight as possible, the algorithm must iteratively adjust penalty terms known as Lagrangian multipliers. This traditional hill-climbing process is computationally expensive, slow, and prone to getting stuck in local minima. The authors address this bottleneck by replacing this slow iterative process with a fast, learned neural network prediction.

Methods

The authors propose an unsupervised learning approach to predict accurate Lagrangian multipliers in a single forward pass, using them to "warm-start" or replace the iterative Held-Karp bound calculation.

  1. Graph Neural Network Architecture: They utilize an Edge-Featured Graph Attention Network (EGAT). Because TSP is naturally represented as a graph, the EGAT maps node and edge features (like coordinates and distances) directly to a vector of node-level Lagrangian multipliers ($\theta_v$).
  2. Differentiable Unsupervised Training: Typically, backpropagating through discrete optimization problems requires complex approximations. However, the authors leverage a mathematical property of the Held-Karp relaxation: the derivative of the bound with respect to any multiplier is simply the degree of that node in the minimum 1-tree minus 2 ($\sum x_{i,j} - 2$). This allows them to train the GNN using standard gradient ascent to maximize the dual bound directly, without needing any ground-truth labels.
  3. Solver Integration: The predicted multipliers are integrated into a branch-and-bound solver that uses constraint programming (specifically, the weighted circuit global constraint) to filter out sub-optimal edges early in the search tree.

The difference between the traditional iterative approach and the proposed machine learning approach is illustrated below:

Illustration of both procedures to obtain dual bounds for the TSP.

An example of how modifying these costs changes the minimum 1-tree and tightens the lower bound can be seen here:

Illustration of a single iteration of Held-Karp relaxation for an arbitrary TSP instance.

Datasets

The approach was evaluated on five distinct metric TSP datasets containing up to 200 cities:

  • Random100 & Random200: Cities uniformly distributed in a 2D square.
  • Clustered100 & Clustered200: Cities distributed across five distinct clusters to mimic real-world logistics and delivery networks.
  • Hard: A benchmark of 50 challenging instances (ranging from 52 to 199 cities) specifically engineered to have large integrality gaps, making them notoriously difficult for exact solvers.

Key Insights and Ideas

  • Inherent Mathematical Guarantees: A common fear of using ML in exact optimization is that the neural network might make an error, leading to an invalid solution. Crucially, on the dual side, any predicted Lagrangian multiplier yields a mathematically valid lower bound. If the network predicts poorly, the bound is simply loose, but it never compromises the exactness or correctness of the solver.
  • Elegant, Exact Gradients: Instead of relying on black-box gradient estimators, the combinatorial structure of the minimum 1-tree yields an exact, analytical gradient based purely on node degrees. This makes unsupervised training remarkably stable.
  • Mitigating Distributional Shift: GNNs trained only on full graphs perform poorly when deployed inside a branch-and-bound tree where many edges are already fixed. The authors solved this by enriching their training data with partially solved subgraphs extracted from intermediate search nodes.

Key Results

  • Reduced Execution Time: For TSP instances solved within the 1,800-second timeout, adding the GNN prediction (HK + GNN) reduced total execution time by approximately 10%.
  • Halved Optimality Gaps: For the largest and most difficult unsolved instances, the approach reduced the remaining optimality gap by a factor of two (e.g., dropping the gap on Random200 from 1.82% to 0.59%).
  • Enhanced Edge Filtering: The GNN consistently improved the filtering level of the global constraints, allowing the solver to prune away unpromising paths much earlier in the search tree.

Limitations and Future Work

  • Problem Scale: The experiments were limited to instances with up to 200 cities. Scaling the GNN architecture to handle thousands of cities efficiently remains an open challenge.
  • Hyperparameter Tuning: Due to computational resource constraints, the authors did not extensively optimize the threshold depth ($k=10$) determining how deep into the search tree the GNN should be executed.
  • Extension to TSP Variants: The authors note that the weighted circuit constraint is highly useful for more complex routing problems. A natural next step is applying this method to TSPs with Time Windows (TSPTW) or time-dependent costs, where traditional mathematical relaxations struggle even more.

Summary updated

BibTeX
@inproceedings{parjadis2024learning,
  author = {Augustin Parjadis and Quentin Cappart and Bistra Dilkina and Aaron M. Ferber and Louis-Martin Rousseau},
  title = {{Learning Lagrangian Multipliers for the Travelling Salesman Problem}},
  booktitle = {CP},
  year = {2024},
  doi = {10.4230/lipics.cp.2024.22},
}
Figure