{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/neurolkh-combining-deep-learning-model-with","title":"NeuroLKH: Combining Deep Learning Model with Lin-Kernighan-Helsgaun Heuristic for Solving the Traveling Salesman Problem","arxiv_id":"2110.07983","date":"2021-10-15","proceeding":"NeurIPS 2021 12","authors":["Liang Xin","Wen Song","Zhiguang Cao","Jie Zhang"],"abstract":"We present NeuroLKH, a novel algorithm that combines deep learning with the strong traditional heuristic Lin-Kernighan-Helsgaun (LKH) for solving Traveling Salesman Problem. Specifically, we train a Sparse Graph Network (SGN) with supervised learning for edge scores and unsupervised learning for node penalties, both of which are critical for improving the performance of LKH. Based on the output of SGN, NeuroLKH creates the edge candidate set and transforms edge distances to guide the searching process of LKH. Extensive experiments firmly demonstrate that, by training one model on a wide range of problem sizes, NeuroLKH significantly outperforms LKH and generalizes well to much larger sizes. Also, we show that NeuroLKH can be applied to other routing problems such as Capacitated Vehicle Routing Problem (CVRP), Pickup and Delivery Problem (PDP), and CVRP with Time Windows (CVRPTW).","url_abs":"https://arxiv.org/abs/2110.07983v1","url_pdf":"https://arxiv.org/pdf/2110.07983v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"neurolkh-combining-deep-learning-model-with","repo_url":"https://github.com/liangxinedu/neurolkh","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"traveling-salesman-problem","task_name":"Traveling Salesman Problem"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.07983","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.07983"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/liangxinedu/neurolkh","reach":null}],"summary":{"ran":5,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":7,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":7,"samples":[{"code_sha256_prefix":"dd53721d43dba915","entry":"BatchNormNode","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dd53721d43dba915"}},{"code_sha256_prefix":"a59cecd20770be52","entry":"MLP","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a59cecd20770be52"}},{"code_sha256_prefix":"6fcb74336837dfef","entry":"NodeFeatures","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6fcb74336837dfef"}},{"code_sha256_prefix":"966ae97d2f0fb28c","entry":"SparseGCNLayer","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"966ae97d2f0fb28c"}},{"code_sha256_prefix":"c5a1285a6780ba31","entry":"SparseGCNModel","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c5a1285a6780ba31"}},{"code_sha256_prefix":"5696bc2a37ce5200","entry":"loss_edges","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5696bc2a37ce5200"}},{"code_sha256_prefix":"75d11841b23afbbe","entry":"EdgeFeatures","repo":"liangxinedu/neurolkh","repo_kind":"official","path":"net/sgcn_model.py","file_url":"https://github.com/liangxinedu/neurolkh/blob/HEAD/net/sgcn_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"75d11841b23afbbe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}