{"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/towards-a-generic-representation-of","title":"Towards a Generic Representation of Combinatorial Problems for Learning-Based Approaches","arxiv_id":"2403.06026","date":"2024-03-09","proceeding":null,"authors":["Léo Boisvert","Hélène Verhaeghe","Quentin Cappart"],"abstract":"In recent years, there has been a growing interest in using learning-based approaches for solving combinatorial problems, either in an end-to-end manner or in conjunction with traditional optimization algorithms. In both scenarios, the challenge lies in encoding the targeted combinatorial problems into a structure compatible with the learning algorithm. Many existing works have proposed problem-specific representations, often in the form of a graph, to leverage the advantages of \\textit{graph neural networks}. However, these approaches lack generality, as the representation cannot be easily transferred from one combinatorial problem to another one. While some attempts have been made to bridge this gap, they still offer a partial generality only. In response to this challenge, this paper advocates for progress toward a fully generic representation of combinatorial problems for learning-based approaches. The approach we propose involves constructing a graph by breaking down any constraint of a combinatorial problem into an abstract syntax tree and expressing relationships (e.g., a variable involved in a constraint) through the edges. Furthermore, we introduce a graph neural network architecture capable of efficiently learning from this representation. The tool provided operates on combinatorial problems expressed in the XCSP3 format, handling all the constraints available in the 2023 mini-track competition. Experimental results on four combinatorial problems demonstrate that our architecture achieves performance comparable to dedicated architectures while maintaining generality. Our code and trained models are publicly available at \\url{https://github.com/corail-research/learning-generic-csp}.","url_abs":"https://arxiv.org/abs/2403.06026v2","url_pdf":"https://arxiv.org/pdf/2403.06026v2.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":"towards-a-generic-representation-of","repo_url":"https://github.com/corail-research/learning-generic-csp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.06026","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.06026"}},"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/corail-research/learning-generic-csp","reach":{"status":"ok"}}],"summary":{"ran":11,"unverified":5},"by_repo_kind":{"official":{"samples":16,"ran":11,"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":16,"samples":[{"code_sha256_prefix":"f23e1348c626e075","entry":"build_variable","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/variable_parsing.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/variable_parsing.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":"f23e1348c626e075"}},{"code_sha256_prefix":"a2bed3dc1c938772","entry":"files_exist","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/dataset.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/dataset.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":"a2bed3dc1c938772"}},{"code_sha256_prefix":"ca6cea5d83ca57b3","entry":"parse_coeffs","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/sum_constraint.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/sum_constraint.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":"ca6cea5d83ca57b3"}},{"code_sha256_prefix":"4be7c7d106563d39","entry":"parse_constraint_section","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/constraints.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/constraints.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":"4be7c7d106563d39"}},{"code_sha256_prefix":"22c6fdfffbb766bb","entry":"parse_element_constraint","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/element.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/element.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":"22c6fdfffbb766bb"}},{"code_sha256_prefix":"8bcd60e69af0841c","entry":"parse_element_group","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/element.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/element.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":"8bcd60e69af0841c"}},{"code_sha256_prefix":"c27ab8b44cf6f1df","entry":"parse_extension_constraint","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/constraints.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/constraints.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":"c27ab8b44cf6f1df"}},{"code_sha256_prefix":"42d25a67e0abe887","entry":"parse_intension_constraint","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/intension_utils.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/intension_utils.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":"42d25a67e0abe887"}},{"code_sha256_prefix":"2a9312d517946c1c","entry":"parse_intension_group","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/intension_utils.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/intension_utils.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":"2a9312d517946c1c"}},{"code_sha256_prefix":"9137e841d497d264","entry":"parse_objective_type","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/instance.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/instance.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":"9137e841d497d264"}},{"code_sha256_prefix":"8989174eed170106","entry":"replace_placeholders","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/intension_utils.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/intension_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8989174eed170106"}},{"code_sha256_prefix":"15665d7c69101847","entry":"parse_all_variables","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/variable_parsing.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/variable_parsing.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":"15665d7c69101847"}},{"code_sha256_prefix":"a1baabf907df2579","entry":"parse_array_variables","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/variable_parsing.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/variable_parsing.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":"a1baabf907df2579"}},{"code_sha256_prefix":"dcb15033262fe468","entry":"parse_group","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/constraints.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/constraints.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":"dcb15033262fe468"}},{"code_sha256_prefix":"1bb8828ef0b858d9","entry":"parse_sum","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/sum_constraint.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/sum_constraint.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":"1bb8828ef0b858d9"}},{"code_sha256_prefix":"fef8b5c5f2f924f0","entry":"parse_sum_group","repo":"corail-research/learning-generic-csp","repo_kind":"official","path":"src/generic_xcsp/sum_constraint.py","file_url":"https://github.com/corail-research/learning-generic-csp/blob/HEAD/src/generic_xcsp/sum_constraint.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":"fef8b5c5f2f924f0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}