{"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/small-molecule-optimization-with-large","title":"Small Molecule Optimization with Large Language Models","arxiv_id":"2407.18897","date":"2024-07-26","proceeding":null,"authors":["Philipp Guevorguian","Menua Bedrosian","Tigran Fahradyan","Gayane Chilingaryan","Hrant Khachatrian","Armen Aghajanyan"],"abstract":"Recent advancements in large language models have opened new possibilities for generative molecular drug design. We present Chemlactica and Chemma, two language models fine-tuned on a novel corpus of 110M molecules with computed properties, totaling 40B tokens. These models demonstrate strong performance in generating molecules with specified properties and predicting new molecular characteristics from limited samples. We introduce a novel optimization algorithm that leverages our language models to optimize molecules for arbitrary properties given limited access to a black box oracle. Our approach combines ideas from genetic algorithms, rejection sampling, and prompt optimization. It achieves state-of-the-art performance on multiple molecular optimization benchmarks, including an 8% improvement on Practical Molecular Optimization compared to previous methods. We publicly release the training corpus, the language models and the optimization algorithm.","url_abs":"https://arxiv.org/abs/2407.18897v1","url_pdf":"https://arxiv.org/pdf/2407.18897v1.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":"small-molecule-optimization-with-large","repo_url":"https://github.com/yerevann/chemlactica","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"drug-design","task_name":"Drug Design"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.18897","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.18897"}},"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/yerevann/chemlactica","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9},"by_repo_kind":{"official":{"samples":9,"ran":9,"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":"065a5bb1902da67e","entry":"cast_lm_head_to_fp32_init","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/utils/model_utils.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/utils/model_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":"065a5bb1902da67e"}},{"code_sha256_prefix":"e7adaca25a7956de","entry":"float_casting_decorator","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/utils/model_utils.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/utils/model_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":"e7adaca25a7956de"}},{"code_sha256_prefix":"9956078624de1fe1","entry":"format_sample","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/jsonl_dataset.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/jsonl_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9956078624de1fe1"}},{"code_sha256_prefix":"acb00a561f686900","entry":"get_command","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/submit_run.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/submit_run.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":"acb00a561f686900"}},{"code_sha256_prefix":"eb49201acc8e63e7","entry":"get_index2prop_map","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/eval_metrics.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/eval_metrics.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":"eb49201acc8e63e7"}},{"code_sha256_prefix":"83d07bde5de745f8","entry":"get_prop2index_map","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/eval_metrics.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/eval_metrics.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":"83d07bde5de745f8"}},{"code_sha256_prefix":"002d40978f4f7f97","entry":"perplexity","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/eval_metrics.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/eval_metrics.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":"002d40978f4f7f97"}},{"code_sha256_prefix":"14fac09514ed57d8","entry":"setup_generator","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/jsonl_dataset.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/jsonl_dataset.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":"14fac09514ed57d8"}},{"code_sha256_prefix":"be6e33dc2e966ffa","entry":"should_yield_on_current_rank","repo":"yerevann/chemlactica","repo_kind":"official","path":"chemlactica/jsonl_dataset.py","file_url":"https://github.com/yerevann/chemlactica/blob/HEAD/chemlactica/jsonl_dataset.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":"be6e33dc2e966ffa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}