{"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/moleculargpt-open-large-language-model-llm","title":"MolecularGPT: Open Large Language Model (LLM) for Few-Shot Molecular Property Prediction","arxiv_id":"2406.12950","date":"2024-06-18","proceeding":null,"authors":["Yuyan Liu","Sirui Ding","Sheng Zhou","Wenqi Fan","Qiaoyu Tan"],"abstract":"Molecular property prediction (MPP) is a fundamental and crucial task in drug discovery. However, prior methods are limited by the requirement for a large number of labeled molecules and their restricted ability to generalize for unseen and new tasks, both of which are essential for real-world applications. To address these challenges, we present MolecularGPT for few-shot MPP. From a perspective on instruction tuning, we fine-tune large language models (LLMs) based on curated molecular instructions spanning over 1000 property prediction tasks. This enables building a versatile and specialized LLM that can be adapted to novel MPP tasks without any fine-tuning through zero- and few-shot in-context learning (ICL). MolecularGPT exhibits competitive in-context reasoning capabilities across 10 downstream evaluation datasets, setting new benchmarks for few-shot molecular prediction tasks. More importantly, with just two-shot examples, MolecularGPT can outperform standard supervised graph neural network methods on 4 out of 7 datasets. It also excels state-of-the-art LLM baselines by up to 15.7% increase on classification accuracy and decrease of 17.9 on regression metrics (e.g., RMSE) under zero-shot. This study demonstrates the potential of LLMs as effective few-shot molecular property predictors. The code is available at https://github.com/NYUSHCS/MolecularGPT.","url_abs":"https://arxiv.org/abs/2406.12950v2","url_pdf":"https://arxiv.org/pdf/2406.12950v2.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":"moleculargpt-open-large-language-model-llm","repo_url":"https://github.com/nyushcs/moleculargpt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"drug-discovery","task_name":"Drug Discovery"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"molecular-property-prediction","task_name":"Molecular Property Prediction"},{"task_slug":"property-prediction","task_name":"Property Prediction"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.12950","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.12950"}},"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/nyushcs/moleculargpt","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":9,"unverified":1},"by_repo_kind":{"official":{"samples":10,"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":"5cbb7bb23f2c061d","entry":"create_prompt","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"ICL_test_diversity.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/ICL_test_diversity.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5cbb7bb23f2c061d"}},{"code_sha256_prefix":"437f17c491f15275","entry":"create_prompt","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"ICL_test_reverse_cls.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/ICL_test_reverse_cls.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"437f17c491f15275"}},{"code_sha256_prefix":"40ec3f3c72f787b8","entry":"create_prompt","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"ICL_test_reverse_reg.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/ICL_test_reverse_reg.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"40ec3f3c72f787b8"}},{"code_sha256_prefix":"504b9ab37dc7458f","entry":"create_prompt","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"ICL_test_sim_cls.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/ICL_test_sim_cls.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"504b9ab37dc7458f"}},{"code_sha256_prefix":"32661c96034aa972","entry":"create_prompt","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"ICL_test_sim_reg.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/ICL_test_sim_reg.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"32661c96034aa972"}},{"code_sha256_prefix":"d5fa4e62584661e2","entry":"shard_name","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d5fa4e62584661e2"}},{"code_sha256_prefix":"eb752e4e58f7074a","entry":"tanimoto_ecfp4","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"metrics_numba.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/metrics_numba.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eb752e4e58f7074a"}},{"code_sha256_prefix":"8297a70b2a756969","entry":"tanimoto_maccs","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"metrics_numba.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/metrics_numba.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8297a70b2a756969"}},{"code_sha256_prefix":"8372cd306fe6ea81","entry":"word_popcount","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"metrics_numba.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/metrics_numba.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8372cd306fe6ea81"}},{"code_sha256_prefix":"f725c39623b78b8e","entry":"write_table","repo":"nyushcs/moleculargpt","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/nyushcs/moleculargpt/blob/HEAD/dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f725c39623b78b8e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}