{"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/invit-a-generalizable-routing-problem-solver","title":"INViT: A Generalizable Routing Problem Solver with Invariant Nested View Transformer","arxiv_id":"2402.02317","date":"2024-02-04","proceeding":null,"authors":["Han Fang","Zhihao Song","Paul Weng","Yutong Ban"],"abstract":"Recently, deep reinforcement learning has shown promising results for learning fast heuristics to solve routing problems. Meanwhile, most of the solvers suffer from generalizing to an unseen distribution or distributions with different scales. To address this issue, we propose a novel architecture, called Invariant Nested View Transformer (INViT), which is designed to enforce a nested design together with invariant views inside the encoders to promote the generalizability of the learned solver. It applies a modified policy gradient algorithm enhanced with data augmentations. We demonstrate that the proposed INViT achieves a dominant generalization performance on both TSP and CVRP problems with various distributions and different problem scales.","url_abs":"https://arxiv.org/abs/2402.02317v3","url_pdf":"https://arxiv.org/pdf/2402.02317v3.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":"invit-a-generalizable-routing-problem-solver","repo_url":"https://github.com/kasumigaoka-utaha/invit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"}],"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=2402.02317","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.02317"}},"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/Kasumigaoka-Utaha/INViT","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kasumigaoka-utaha/invit","reach":{"status":"ok"}}],"summary":{"ran":5,"ran_draft_wrong":2,"ran_honours":1,"unverified":4},"by_repo_kind":{"official":{"samples":12,"ran":8,"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":12,"samples":[{"code_sha256_prefix":"e0a166dca4c52b70","entry":"Scale","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"utils/utils_for_model.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/utils/utils_for_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":"e0a166dca4c52b70"}},{"code_sha256_prefix":"367529155ea96828","entry":"count_identical_elements","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"utils/utils_for_model.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/utils/utils_for_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":"367529155ea96828"}},{"code_sha256_prefix":"797fad5ede15d1a2","entry":"create_parser","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"utils/utils_for_model.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/utils/utils_for_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":"797fad5ede15d1a2"}},{"code_sha256_prefix":"bef6d297cd8d3b81","entry":"myMHA","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"blocks.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/blocks.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":"bef6d297cd8d3b81"}},{"code_sha256_prefix":"a85a0f5335ab636b","entry":"read_cvrp_instances_from_file","repo":"Kasumigaoka-Utaha/INViT","repo_kind":"official","path":"load_data.py","file_url":"https://github.com/Kasumigaoka-Utaha/INViT/blob/HEAD/load_data.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a85a0f5335ab636b"}},{"code_sha256_prefix":"9dc70752fb3689f8","entry":"read_solutions_from_file","repo":"Kasumigaoka-Utaha/INViT","repo_kind":"official","path":"load_data.py","file_url":"https://github.com/Kasumigaoka-Utaha/INViT/blob/HEAD/load_data.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9dc70752fb3689f8"}},{"code_sha256_prefix":"0c06a4baa49d8aee","entry":"read_solutions_from_file","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"load_data.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/load_data.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":"0c06a4baa49d8aee"}},{"code_sha256_prefix":"789efe45deac8e0d","entry":"read_tsp_instances_from_file","repo":"Kasumigaoka-Utaha/INViT","repo_kind":"official","path":"load_data.py","file_url":"https://github.com/Kasumigaoka-Utaha/INViT/blob/HEAD/load_data.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"789efe45deac8e0d"}},{"code_sha256_prefix":"9605372dd5b48ee8","entry":"read_cvrp_instances_from_file","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"load_data.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/load_data.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":"9605372dd5b48ee8"}},{"code_sha256_prefix":"ee05b200953e00d2","entry":"read_lkh_outputs","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"baselines/solve_cvrp_baselines.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/baselines/solve_cvrp_baselines.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":"ee05b200953e00d2"}},{"code_sha256_prefix":"059e9855d5b8e0e9","entry":"read_tsp_instances_from_file","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"load_data.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/load_data.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":"059e9855d5b8e0e9"}},{"code_sha256_prefix":"79560f35c4e05b23","entry":"solve_cvrp_instance_by_LKH3","repo":"kasumigaoka-utaha/invit","repo_kind":"official","path":"baselines/solve_cvrp_baselines.py","file_url":"https://github.com/kasumigaoka-utaha/invit/blob/HEAD/baselines/solve_cvrp_baselines.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":"79560f35c4e05b23"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}