{"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/relm-leveraging-language-models-for-enhanced","title":"ReLM: Leveraging Language Models for Enhanced Chemical Reaction Prediction","arxiv_id":"2310.13590","date":"2023-10-20","proceeding":null,"authors":["Yaorui Shi","An Zhang","Enzhi Zhang","Zhiyuan Liu","Xiang Wang"],"abstract":"Predicting chemical reactions, a fundamental challenge in chemistry, involves forecasting the resulting products from a given reaction process. Conventional techniques, notably those employing Graph Neural Networks (GNNs), are often limited by insufficient training data and their inability to utilize textual information, undermining their applicability in real-world applications. In this work, we propose ReLM, a novel framework that leverages the chemical knowledge encoded in language models (LMs) to assist GNNs, thereby enhancing the accuracy of real-world chemical reaction predictions. To further enhance the model's robustness and interpretability, we incorporate the confidence score strategy, enabling the LMs to self-assess the reliability of their predictions. Our experimental results demonstrate that ReLM improves the performance of state-of-the-art GNN-based methods across various chemical reaction datasets, especially in out-of-distribution settings. Codes are available at https://github.com/syr-cn/ReLM.","url_abs":"https://arxiv.org/abs/2310.13590v1","url_pdf":"https://arxiv.org/pdf/2310.13590v1.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":"relm-leveraging-language-models-for-enhanced","repo_url":"https://github.com/syr-cn/relm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"chemical-reaction-prediction","task_name":"Chemical Reaction Prediction"},{"task_slug":"prediction","task_name":"Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.13590","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.13590"}},"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/syr-cn/relm","reach":{"status":"ok"}}],"summary":{"ran_violates":1,"ran":7,"unverified":3},"by_repo_kind":{"official":{"samples":11,"ran":8,"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":11,"samples":[{"code_sha256_prefix":"aab9d967b4f428fa","entry":"avg","repo":"syr-cn/relm","repo_kind":"official","path":"utils.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aab9d967b4f428fa"}},{"code_sha256_prefix":"271f23bf893ac4f8","entry":"combined_edit","repo":"syr-cn/relm","repo_kind":"official","path":"models/LocalRetro/get_edit.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/models/LocalRetro/get_edit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"271f23bf893ac4f8"}},{"code_sha256_prefix":"af40520646b41f87","entry":"election","repo":"syr-cn/relm","repo_kind":"official","path":"evaluate_real_reaction.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/evaluate_real_reaction.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af40520646b41f87"}},{"code_sha256_prefix":"6a6078bc485b6194","entry":"get_id_template","repo":"syr-cn/relm","repo_kind":"official","path":"models/LocalRetro/get_edit.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/models/LocalRetro/get_edit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a6078bc485b6194"}},{"code_sha256_prefix":"cf163e7a8dc90490","entry":"output2edit","repo":"syr-cn/relm","repo_kind":"official","path":"models/LocalRetro/get_edit.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/models/LocalRetro/get_edit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cf163e7a8dc90490"}},{"code_sha256_prefix":"247f8416a3532c44","entry":"simplify_product","repo":"syr-cn/relm","repo_kind":"official","path":"evaluate_llm.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/evaluate_llm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"247f8416a3532c44"}},{"code_sha256_prefix":"0a1a4509c3514448","entry":"timeit","repo":"syr-cn/relm","repo_kind":"official","path":"utils.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0a1a4509c3514448"}},{"code_sha256_prefix":"f64f973f30990c73","entry":"to_char","repo":"syr-cn/relm","repo_kind":"official","path":"utils.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f64f973f30990c73"}},{"code_sha256_prefix":"c9041d9073a6ad1d","entry":"load_featurizer","repo":"syr-cn/relm","repo_kind":"official","path":"model.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9041d9073a6ad1d"}},{"code_sha256_prefix":"a0139633bd549f30","entry":"load_model","repo":"syr-cn/relm","repo_kind":"official","path":"model.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a0139633bd549f30"}},{"code_sha256_prefix":"7785c3507c28444f","entry":"pair_atom_feats","repo":"syr-cn/relm","repo_kind":"official","path":"models/LocalRetro/model_utils.py","file_url":"https://github.com/syr-cn/relm/blob/HEAD/models/LocalRetro/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7785c3507c28444f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}