{"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/synflownet-towards-molecule-design-with","title":"SynFlowNet: Design of Diverse and Novel Molecules with Synthesis Constraints","arxiv_id":"2405.01155","date":"2024-05-02","proceeding":null,"authors":["Miruna Cretu","Charles Harris","Ilia Igashov","Arne Schneuing","Marwin Segler","Bruno Correia","Julien Roy","Emmanuel Bengio","Pietro Liò"],"abstract":"Generative models see increasing use in computer-aided drug design. However, while performing well at capturing distributions of molecular motifs, they often produce synthetically inaccessible molecules. To address this, we introduce SynFlowNet, a GFlowNet model whose action space uses chemical reactions and purchasable reactants to sequentially build new molecules. By incorporating forward synthesis as an explicit constraint of the generative mechanism, we aim at bridging the gap between in silico molecular generation and real world synthesis capabilities. We evaluate our approach using synthetic accessibility scores and an independent retrosynthesis tool to assess the synthesizability of our compounds, and motivate the choice of GFlowNets through considerable improvement in sample diversity compared to baselines. Additionally, we identify challenges with reaction encodings that can complicate traversal of the MDP in the backward direction. To address this, we introduce various strategies for learning the GFlowNet backward policy and thus demonstrate how additional constraints can be integrated into the GFlowNet MDP framework. This approach enables our model to successfully identify synthesis pathways for previously unseen molecules.","url_abs":"https://arxiv.org/abs/2405.01155v3","url_pdf":"https://arxiv.org/pdf/2405.01155v3.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":"synflownet-towards-molecule-design-with","repo_url":"https://github.com/mirunacrt/synflownet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"drug-design","task_name":"Drug Design"},{"task_slug":"drug-discovery","task_name":"Drug Discovery"},{"task_slug":"retrosynthesis","task_name":"Retrosynthesis"}],"methods":[{"method_slug":"aware","method_name":"AWARE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.01155","atlas_url":"https://app.syntology.ai/?focus=2405.01155","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.01155"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/mirunacrt/synflownet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran":5,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":12,"ran":7,"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":"2a8ed5bf472b7004","entry":"cross","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/algo/trajectory_balance.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/algo/trajectory_balance.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a8ed5bf472b7004"}},{"code_sha256_prefix":"698d73f4260ce129","entry":"graph_without_edge","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/envs/graph_building_env.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/envs/graph_building_env.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":"698d73f4260ce129"}},{"code_sha256_prefix":"91084575c9dd054e","entry":"graph_without_node","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/envs/graph_building_env.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/envs/graph_building_env.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":"91084575c9dd054e"}},{"code_sha256_prefix":"cf0b5b8b09080022","entry":"graph_without_node_attr","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/envs/graph_building_env.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/envs/graph_building_env.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":"cf0b5b8b09080022"}},{"code_sha256_prefix":"a1aab6ebb1f26dd0","entry":"load_yaml","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/config.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/config.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":"a1aab6ebb1f26dd0"}},{"code_sha256_prefix":"693d4ee3896b4768","entry":"model_grad_norm","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/online_trainer.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/online_trainer.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":"693d4ee3896b4768"}},{"code_sha256_prefix":"a508d01ed77ced0b","entry":"shift_right","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/algo/trajectory_balance.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/algo/trajectory_balance.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a508d01ed77ced0b"}},{"code_sha256_prefix":"f19d3a5719b35922","entry":"init_empty","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/config.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/config.py","link_basis":"plan_row","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":"f19d3a5719b35922"}},{"code_sha256_prefix":"98b668e5ea7726ba","entry":"load_original_model","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/models/bengio2021flow.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/models/bengio2021flow.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":"98b668e5ea7726ba"}},{"code_sha256_prefix":"687893e4cbfb90a7","entry":"load_weights","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/models/bengio2021flow.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/models/bengio2021flow.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":"687893e4cbfb90a7"}},{"code_sha256_prefix":"1c29a989bc24ec49","entry":"override_config","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/config.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/config.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":"1c29a989bc24ec49"}},{"code_sha256_prefix":"d2e1d2a558b75603","entry":"subTB","repo":"mirunacrt/synflownet","repo_kind":"official","path":"src/synflownet/algo/trajectory_balance.py","file_url":"https://github.com/mirunacrt/synflownet/blob/HEAD/src/synflownet/algo/trajectory_balance.py","link_basis":"plan_row","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":"d2e1d2a558b75603"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}