{"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-to-iteratively-solve-routing","title":"Learning to Iteratively Solve Routing Problems with Dual-Aspect Collaborative Transformer","arxiv_id":"2110.02544","date":"2021-10-06","proceeding":"NeurIPS 2021 12","authors":["Yining Ma","Jingwen Li","Zhiguang Cao","Wen Song","Le Zhang","Zhenghua Chen","Jing Tang"],"abstract":"Recently, Transformer has become a prevailing deep architecture for solving vehicle routing problems (VRPs). However, it is less effective in learning improvement models for VRP because its positional encoding (PE) method is not suitable in representing VRP solutions. This paper presents a novel Dual-Aspect Collaborative Transformer (DACT) to learn embeddings for the node and positional features separately, instead of fusing them together as done in existing ones, so as to avoid potential noises and incompatible correlations. Moreover, the positional features are embedded through a novel cyclic positional encoding (CPE) method to allow Transformer to effectively capture the circularity and symmetry of VRP solutions (i.e., cyclic sequences). We train DACT using Proximal Policy Optimization and design a curriculum learning strategy for better sample efficiency. We apply DACT to solve the traveling salesman problem (TSP) and capacitated vehicle routing problem (CVRP). Results show that our DACT outperforms existing Transformer based improvement models, and exhibits much better generalization performance across different problem sizes on synthetic and benchmark instances, respectively.","url_abs":"https://arxiv.org/abs/2110.02544v3","url_pdf":"https://arxiv.org/pdf/2110.02544v3.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-to-iteratively-solve-routing","repo_url":"https://github.com/yining043/VRP-DACT","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learning-to-iteratively-solve-routing","repo_url":"https://github.com/yining043/TSP-improve","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"traveling-salesman-problem","task_name":"Traveling Salesman Problem"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.02544","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.02544"}},"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":"deterministic:regex_extraction","url":"https://github.com/yining043/VRP-DACT","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yining043/TSP-improve","reach":null}],"summary":{"ran":9,"unverified":7},"by_repo_kind":{"official":{"samples":11,"ran":7,"repositories":1},"listed":{"samples":5,"ran":2,"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":0,"samples":[{"code_sha256_prefix":"d32eca8fe0b18c43","entry":"EmbeddingNet","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d32eca8fe0b18c43"}},{"code_sha256_prefix":"850da12d3368c65a","entry":"FFandNormsubLayer","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"850da12d3368c65a"}},{"code_sha256_prefix":"355814dd5ff90a73","entry":"MLP","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"355814dd5ff90a73"}},{"code_sha256_prefix":"fa54d99ecac04864","entry":"MultiHeadAttention","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fa54d99ecac04864"}},{"code_sha256_prefix":"3e9c7f43e77628ea","entry":"MultiHeadAttention","repo":"yining043/TSP-improve","repo_kind":"listed","path":"nets/attention_model.py","file_url":"https://github.com/yining043/TSP-improve/blob/HEAD/nets/attention_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e9c7f43e77628ea"}},{"code_sha256_prefix":"211b65805e3d00f5","entry":"MultiHeadCompat","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"211b65805e3d00f5"}},{"code_sha256_prefix":"30b971afd000a522","entry":"MultiHeadDecoder","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"30b971afd000a522"}},{"code_sha256_prefix":"5b8ea40ba7cb0c66","entry":"MultiHeadDecoder","repo":"yining043/TSP-improve","repo_kind":"listed","path":"nets/attention_model.py","file_url":"https://github.com/yining043/TSP-improve/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5b8ea40ba7cb0c66"}},{"code_sha256_prefix":"08bc67177889a2b3","entry":"Normalization","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"08bc67177889a2b3"}},{"code_sha256_prefix":"c62ea025f6578059","entry":"Actor","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c62ea025f6578059"}},{"code_sha256_prefix":"afcbe0b62b04095b","entry":"AttentionModel","repo":"yining043/TSP-improve","repo_kind":"listed","path":"nets/attention_model.py","file_url":"https://github.com/yining043/TSP-improve/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"afcbe0b62b04095b"}},{"code_sha256_prefix":"5a3c7c6596133237","entry":"EmbeddingNet","repo":"yining043/TSP-improve","repo_kind":"listed","path":"nets/attention_model.py","file_url":"https://github.com/yining043/TSP-improve/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5a3c7c6596133237"}},{"code_sha256_prefix":"1905f5c7465accec","entry":"MultiHeadAttentionLayer","repo":"yining043/TSP-improve","repo_kind":"listed","path":"nets/attention_model.py","file_url":"https://github.com/yining043/TSP-improve/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1905f5c7465accec"}},{"code_sha256_prefix":"500395d982e1b1bb","entry":"MultiHeadAttentionsubLayer","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"500395d982e1b1bb"}},{"code_sha256_prefix":"8147e91b3d0fe9f1","entry":"MultiHeadEncoder","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8147e91b3d0fe9f1"}},{"code_sha256_prefix":"b48a3565db4b5491","entry":"mySequential","repo":"yining043/VRP-DACT","repo_kind":"official","path":"nets/actor_network.py","file_url":"https://github.com/yining043/VRP-DACT/blob/HEAD/nets/actor_network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b48a3565db4b5491"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}