{"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/chemical-reaction-aware-molecule","title":"Chemical-Reaction-Aware Molecule Representation Learning","arxiv_id":"2109.09888","date":"2021-09-21","proceeding":"ICLR 2022 4","authors":["Hongwei Wang","Weijiang Li","Xiaomeng Jin","Kyunghyun Cho","Heng Ji","Jiawei Han","Martin D. Burke"],"abstract":"Molecule representation learning (MRL) methods aim to embed molecules into a real vector space. However, existing SMILES-based (Simplified Molecular-Input Line-Entry System) or GNN-based (Graph Neural Networks) MRL methods either take SMILES strings as input that have difficulty in encoding molecule structure information, or over-emphasize the importance of GNN architectures but neglect their generalization ability. Here we propose using chemical reactions to assist learning molecule representation. The key idea of our approach is to preserve the equivalence of molecules with respect to chemical reactions in the embedding space, i.e., forcing the sum of reactant embeddings and the sum of product embeddings to be equal for each chemical equation. This constraint is proven effective to 1) keep the embedding space well-organized and 2) improve the generalization ability of molecule embeddings. Moreover, our model can use any GNN as the molecule encoder and is thus agnostic to GNN architectures. Experimental results demonstrate that our method achieves state-of-the-art performance in a variety of downstream tasks, e.g., 17.4% absolute Hit@1 gain in chemical reaction prediction, 2.3% absolute AUC gain in molecule property prediction, and 18.5% relative RMSE gain in graph-edit-distance prediction, respectively, over the best baseline method. The code is available at https://github.com/hwwang55/MolR.","url_abs":"https://arxiv.org/abs/2109.09888v2","url_pdf":"https://arxiv.org/pdf/2109.09888v2.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":"chemical-reaction-aware-molecule","repo_url":"https://github.com/hwwang55/MolR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"chemical-reaction-prediction","task_name":"Chemical Reaction Prediction"},{"task_slug":"property-prediction","task_name":"Property Prediction"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2109.09888","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.09888"}},"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/hwwang55/MolR","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"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":"6440cab6b6cebe1a","entry":"calculate_ged","repo":"hwwang55/MolR","repo_kind":"official","path":"src/ged_pred/gp_data_processing.py","file_url":"https://github.com/hwwang55/MolR/blob/HEAD/src/ged_pred/gp_data_processing.py","link_basis":"plan_row","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":"6440cab6b6cebe1a"}},{"code_sha256_prefix":"809c8ea91f172f97","entry":"get_feature_encoder","repo":"hwwang55/MolR","repo_kind":"official","path":"src/data_processing.py","file_url":"https://github.com/hwwang55/MolR/blob/HEAD/src/data_processing.py","link_basis":"plan_row","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":"809c8ea91f172f97"}},{"code_sha256_prefix":"787f31204cb2ceac","entry":"get_params_for_mp","repo":"hwwang55/MolR","repo_kind":"official","path":"src/ged_pred/gp_data_processing.py","file_url":"https://github.com/hwwang55/MolR/blob/HEAD/src/ged_pred/gp_data_processing.py","link_basis":"plan_row","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":"787f31204cb2ceac"}},{"code_sha256_prefix":"706bbfe8ec633e7d","entry":"calculate_ged_with_mp","repo":"hwwang55/MolR","repo_kind":"official","path":"src/ged_pred/gp_data_processing.py","file_url":"https://github.com/hwwang55/MolR/blob/HEAD/src/ged_pred/gp_data_processing.py","link_basis":"plan_row","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":"706bbfe8ec633e7d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}