{"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/learning-collaborative-policies-to-solve-np","title":"Learning Collaborative Policies to Solve NP-hard Routing Problems","arxiv_id":"2110.13987","date":"2021-10-26","proceeding":"NeurIPS 2021 12","authors":["Minsu Kim","Jinkyoo Park","Joungho Kim"],"abstract":"Recently, deep reinforcement learning (DRL) frameworks have shown potential for solving NP-hard routing problems such as the traveling salesman problem (TSP) without problem-specific expert knowledge. Although DRL can be used to solve complex problems, DRL frameworks still struggle to compete with state-of-the-art heuristics showing a substantial performance gap. This paper proposes a novel hierarchical problem-solving strategy, termed learning collaborative policies (LCP), which can effectively find the near-optimum solution using two iterative DRL policies: the seeder and reviser. The seeder generates as diversified candidate solutions as possible (seeds) while being dedicated to exploring over the full combinatorial action space (i.e., sequence of assignment action). To this end, we train the seeder's policy using a simple yet effective entropy regularization reward to encourage the seeder to find diverse solutions. On the other hand, the reviser modifies each candidate solution generated by the seeder; it partitions the full trajectory into sub-tours and simultaneously revises each sub-tour to minimize its traveling distance. Thus, the reviser is trained to improve the candidate solution's quality, focusing on the reduced solution space (which is beneficial for exploitation). Extensive experiments demonstrate that the proposed two-policies collaboration scheme improves over single-policy DRL framework on various NP-hard routing problems, including TSP, prize collecting TSP (PCTSP), and capacitated vehicle routing problem (CVRP).","url_abs":"https://arxiv.org/abs/2110.13987v1","url_pdf":"https://arxiv.org/pdf/2110.13987v1.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":"learning-collaborative-policies-to-solve-np","repo_url":"https://github.com/alstn12088/lcp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"},{"task_slug":"traveling-salesman-problem","task_name":"Traveling Salesman Problem"}],"methods":[{"method_slug":"entropy-regularization","method_name":"Entropy Regularization"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.13987","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.13987"}},"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/alstn12088/lcp","reach":null}],"summary":{"ran":4,"ran_fixture":1,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":11,"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":11,"samples":[{"code_sha256_prefix":"88d0041a61c7c24e","entry":"CachedLookup","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"88d0041a61c7c24e"}},{"code_sha256_prefix":"ada666a76adb71c1","entry":"LCP_TSP","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ada666a76adb71c1"}},{"code_sha256_prefix":"c5d3fd20d5155301","entry":"MultiHeadAttention","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"c5d3fd20d5155301"}},{"code_sha256_prefix":"dd680450b0176037","entry":"MultiHeadAttentionLayer","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"dd680450b0176037"}},{"code_sha256_prefix":"2315c99926d06f41","entry":"PositionalEncoding","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"2315c99926d06f41"}},{"code_sha256_prefix":"a23d253f0a097ed3","entry":"decomposition","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a23d253f0a097ed3"}},{"code_sha256_prefix":"654e85e1dfb7a324","entry":"AttentionModel","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"654e85e1dfb7a324"}},{"code_sha256_prefix":"5b916624ecb45a96","entry":"GraphAttentionEncoder","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"5b916624ecb45a96"}},{"code_sha256_prefix":"c15e4327c52243c6","entry":"compute_in_batches","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"c15e4327c52243c6"}},{"code_sha256_prefix":"ccfdec9c8e6fb04f","entry":"revision","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"ccfdec9c8e6fb04f"}},{"code_sha256_prefix":"5f3e3de087964e54","entry":"sample_many","repo":"alstn12088/lcp","repo_kind":"official","path":"nets/attention_model.py","file_url":"https://github.com/alstn12088/lcp/blob/HEAD/nets/attention_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":"5f3e3de087964e54"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}