{"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/molecular-language-model-as-multi-task","title":"Domain-Agnostic Molecular Generation with Chemical Feedback","arxiv_id":"2301.11259","date":"2023-01-26","proceeding":null,"authors":["Yin Fang","Ningyu Zhang","Zhuo Chen","Lingbing Guo","Xiaohui Fan","Huajun Chen"],"abstract":"The generation of molecules with desired properties has become increasingly popular, revolutionizing the way scientists design molecular structures and providing valuable support for chemical and drug design. However, despite the potential of language models in molecule generation, they face challenges such as generating syntactically or chemically flawed molecules, having narrow domain focus, and struggling to create diverse and feasible molecules due to limited annotated data or external molecular databases. To tackle these challenges, we introduce MolGen, a pre-trained molecular language model tailored specifically for molecule generation. Through the reconstruction of over 100 million molecular SELFIES, MolGen internalizes structural and grammatical insights. This is further enhanced by domain-agnostic molecular prefix tuning, fostering robust knowledge transfer across diverse domains. Importantly, our chemical feedback paradigm steers the model away from molecular hallucinations, ensuring alignment between the model's estimated probabilities and real-world chemical preferences. Extensive experiments on well-known benchmarks underscore MolGen's optimization capabilities in properties such as penalized logP, QED, and molecular docking. Additional analyses confirm its proficiency in accurately capturing molecule distributions, discerning intricate structural patterns, and efficiently exploring the chemical space. Code is available at https://github.com/zjunlp/MolGen.","url_abs":"https://arxiv.org/abs/2301.11259v6","url_pdf":"https://arxiv.org/pdf/2301.11259v6.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":"molecular-language-model-as-multi-task","repo_url":"https://github.com/zjunlp/MolGen","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"drug-design","task_name":"Drug Design"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"molecular-docking","task_name":"Molecular Docking"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2301.11259","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.11259"}},"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/zjunlp/MolGen","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":5,"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":"c083e60f5001bd38","entry":"get_pairs","repo":"zjunlp/MolGen","repo_kind":"official","path":"MolGen/model/bart/tokenization_bart.py","file_url":"https://github.com/zjunlp/MolGen/blob/HEAD/MolGen/model/bart/tokenization_bart.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c083e60f5001bd38"}},{"code_sha256_prefix":"996937099be3e2fa","entry":"reduce_value","repo":"zjunlp/MolGen","repo_kind":"official","path":"MolGen/src/distributed_utils.py","file_url":"https://github.com/zjunlp/MolGen/blob/HEAD/MolGen/src/distributed_utils.py","link_basis":"harvester_set","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":"996937099be3e2fa"}},{"code_sha256_prefix":"cfb09657fff12fcf","entry":"shift_tokens_right","repo":"zjunlp/MolGen","repo_kind":"official","path":"MolGen/model/bart/modeling_bart.py","file_url":"https://github.com/zjunlp/MolGen/blob/HEAD/MolGen/model/bart/modeling_bart.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":"cfb09657fff12fcf"}},{"code_sha256_prefix":"4a77ef0b3dd30448","entry":"RankingLoss","repo":"zjunlp/MolGen","repo_kind":"official","path":"MolGen/src/utils.py","file_url":"https://github.com/zjunlp/MolGen/blob/HEAD/MolGen/src/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":"4a77ef0b3dd30448"}},{"code_sha256_prefix":"73f856655a61345c","entry":"set_optim","repo":"zjunlp/MolGen","repo_kind":"official","path":"MolGen/src/utils.py","file_url":"https://github.com/zjunlp/MolGen/blob/HEAD/MolGen/src/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":"73f856655a61345c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}