Neural LKH (NeuroLKH)
A sparse graph network that predicts edge scores and node penalties to guide the LKH traveling salesman solver.
Graphs and geometry · 1,497 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Graphs and geometry
- Parameters
- 3.6M
- Operations
- 1,497
- Framework
- PyTorch
- Recurrent
- No
- Published
- NeurIPS 2021
- Cited by
- 66 (as of 28 October 2026)
- Authors
- Liang Xin, Wen Song, Zhiguang Cao, Jie Zhang
- Source
- GitHub: liangxinedu/NeuroLKH
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18800
- Graph hash
- e364f05adaef90a40726d60213ba25b8aa03a4d4562e20f64d4257affa8377cb
- Skeleton hash
- 4afd54c6c8e674620f42849afa5d8c1abd066ea6d05c009195d24bc6ffb9371c
- Architecture hash
- 041de87c5a202c7c489f647213daf9b618dc68afb4eb1c5fcc4aa76d9c4cee5f
- Diagram SHA-256
- c57021f79e618708bdd8adb441489deb0c7780b2091fdb8819a51c51ce1ae5d0
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
NeuroLKH combines deep learning with Lin-Kernighan-Helsgaun (LKH), a strong traditional heuristic for the Traveling Salesman Problem (TSP). Its network is the Sparse Graph Network (SGN), trained with supervised learning for edge scores and unsupervised learning for node penalties. From those two outputs NeuroLKH creates the edge candidate set and transforms the edge distances that guide the LKH search.
The TSP instance is formatted as a sparse directed graph that keeps only a set number of the shortest edges pointed from each node. The node inputs are the node coordinates and the edge inputs are the edge distances. The SGN has one encoder that embeds the edge and node inputs and two decoders, one for the edge scores and one for the node penalties. The paper sets the hidden dimension to 128 and uses 30 Sparse Graph Convolutional Layers. Because the input graph is directed and sparse, edges with different directions are embedded separately.
The node penalties are learned from training instances, so NeuroLKH does not perform the iterative optimization for each instance that LKH does. The authors train only one network, on TSP instances ranging from 101 to 500 nodes. They also show that NeuroLKH can be applied to other routing problems: CVRP, PDP and CVRP with Time Windows.
Key idea. The paper trains one Sparse Graph Network to predict edge scores and node penalties, which generate the edge candidate set and transform the edge distances for LKH.
- neurolkh
- neural lkh
- sparse graph network
- sgn
- traveling salesman problem
- tsp
- lin-kernighan-helsgaun
- routing problems
- edge candidate set
- combinatorial optimization
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{xin2021neurolkhcombiningdeeplearning,
title={NeuroLKH: Combining Deep Learning Model with Lin-Kernighan-Helsgaun Heuristic for Solving the Traveling Salesman Problem},
author={Liang Xin and Wen Song and Zhiguang Cao and Jie Zhang},
year={2021},
eprint={2110.07983},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2110.07983},
}