{"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/classifier-free-graph-diffusion-for-molecular","title":"Classifier-free graph diffusion for molecular property targeting","arxiv_id":"2312.17397","date":"2023-12-28","proceeding":null,"authors":["Matteo Ninniri","Marco Podda","Davide Bacciu"],"abstract":"This work focuses on the task of property targeting: that is, generating molecules conditioned on target chemical properties to expedite candidate screening for novel drug and materials development. DiGress is a recent diffusion model for molecular graphs whose distinctive feature is allowing property targeting through classifier-based (CB) guidance. While CB guidance may work to generate molecular-like graphs, we hint at the fact that its assumptions apply poorly to the chemical domain. Based on this insight we propose a classifier-free DiGress (FreeGress), which works by directly injecting the conditioning information into the training process. CF guidance is convenient given its less stringent assumptions and since it does not require to train an auxiliary property regressor, thus halving the number of trainable parameters in the model. We empirically show that our model yields up to 79% improvement in Mean Absolute Error with respect to DiGress on property targeting tasks on QM9 and ZINC-250k benchmarks. As an additional contribution, we propose a simple yet powerful approach to improve chemical validity of generated samples, based on the observation that certain chemical properties such as molecular weight correlate with the number of atoms in molecules.","url_abs":"https://arxiv.org/abs/2312.17397v2","url_pdf":"https://arxiv.org/pdf/2312.17397v2.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":"classifier-free-graph-diffusion-for-molecular","repo_url":"https://github.com/asduffo/freegress","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"hint","method_name":"HINT"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.17397","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.17397"}},"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/asduffo/freegress","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"ran":2,"unverified":7},"by_repo_kind":{"official":{"samples":10,"ran":3,"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":"039fc6561a9516bc","entry":"l2","repo":"asduffo/freegress","repo_kind":"official","path":"src/analysis/dist_helper.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/analysis/dist_helper.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"039fc6561a9516bc"}},{"code_sha256_prefix":"82a9ab480b4063ca","entry":"normalize","repo":"asduffo/freegress","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/utils.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":"82a9ab480b4063ca"}},{"code_sha256_prefix":"04bee8fa958e3921","entry":"to_dense","repo":"asduffo/freegress","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/utils.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":"04bee8fa958e3921"}},{"code_sha256_prefix":"ab10f4ba7e15c9c9","entry":"compare_hash","repo":"asduffo/freegress","repo_kind":"official","path":"src/datasets/guacamol_dataset.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/datasets/guacamol_dataset.py","link_basis":"harvester_set","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":"ab10f4ba7e15c9c9"}},{"code_sha256_prefix":"2830d89cd6960c9d","entry":"degree_worker","repo":"asduffo/freegress","repo_kind":"official","path":"src/analysis/spectre_utils.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/analysis/spectre_utils.py","link_basis":"harvester_set","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":"2830d89cd6960c9d"}},{"code_sha256_prefix":"934e88324646e2d7","entry":"files_exist","repo":"asduffo/freegress","repo_kind":"official","path":"src/datasets/guacamol_dataset.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/datasets/guacamol_dataset.py","link_basis":"harvester_set","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":"934e88324646e2d7"}},{"code_sha256_prefix":"0c9e13c0bf546794","entry":"mol2smiles","repo":"asduffo/freegress","repo_kind":"official","path":"src/analysis/rdkit_functions.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/analysis/rdkit_functions.py","link_basis":"harvester_set","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":"0c9e13c0bf546794"}},{"code_sha256_prefix":"d06299b76725edd9","entry":"spectral_worker","repo":"asduffo/freegress","repo_kind":"official","path":"src/analysis/spectre_utils.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/analysis/spectre_utils.py","link_basis":"harvester_set","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":"d06299b76725edd9"}},{"code_sha256_prefix":"85832bcd5531c861","entry":"to_list","repo":"asduffo/freegress","repo_kind":"official","path":"src/datasets/guacamol_dataset.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/datasets/guacamol_dataset.py","link_basis":"harvester_set","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":"85832bcd5531c861"}},{"code_sha256_prefix":"4656e7ee2a2bec2f","entry":"unnormalize","repo":"asduffo/freegress","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/asduffo/freegress/blob/HEAD/src/utils.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":"4656e7ee2a2bec2f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}