{"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/motif-aware-attribute-masking-for-molecular","title":"Motif-aware Attribute Masking for Molecular Graph Pre-training","arxiv_id":"2309.04589","date":"2023-09-08","proceeding":null,"authors":["Eric Inae","Gang Liu","Meng Jiang"],"abstract":"Attribute reconstruction is used to predict node or edge features in the pre-training of graph neural networks. Given a large number of molecules, they learn to capture structural knowledge, which is transferable for various downstream property prediction tasks and vital in chemistry, biomedicine, and material science. Previous strategies that randomly select nodes to do attribute masking leverage the information of local neighbors However, the over-reliance of these neighbors inhibits the model's ability to learn from higher-level substructures. For example, the model would learn little from predicting three carbon atoms in a benzene ring based on the other three but could learn more from the inter-connections between the functional groups, or called chemical motifs. In this work, we propose and investigate motif-aware attribute masking strategies to capture inter-motif structures by leveraging the information of atoms in neighboring motifs. Once each graph is decomposed into disjoint motifs, the features for every node within a sample motif are masked. The graph decoder then predicts the masked features of each node within the motif for reconstruction. We evaluate our approach on eight molecular property prediction datasets and demonstrate its advantages.","url_abs":"https://arxiv.org/abs/2309.04589v2","url_pdf":"https://arxiv.org/pdf/2309.04589v2.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":"motif-aware-attribute-masking-for-molecular","repo_url":"https://github.com/einae-nd/moama-dev","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"molecular-property-prediction","task_name":"Molecular Property Prediction"},{"task_slug":"property-prediction","task_name":"Property Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.04589","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.04589"}},"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/einae-nd/moama-dev","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":10,"samples":[{"code_sha256_prefix":"0480e4cd40f3bbb2","entry":"checkpoint_path","repo":"einae-nd/moama-dev","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/finetune.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":"0480e4cd40f3bbb2"}},{"code_sha256_prefix":"287484b87212f47d","entry":"graph_data_obj_to_nx_simple","repo":"einae-nd/moama-dev","repo_kind":"official","path":"loader.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/loader.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"287484b87212f47d"}},{"code_sha256_prefix":"953ca2b6f9e169f9","entry":"make_grad_scaler","repo":"einae-nd/moama-dev","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/finetune.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":"953ca2b6f9e169f9"}},{"code_sha256_prefix":"e4fc8364925146e1","entry":"reconstruction_loss","repo":"einae-nd/moama-dev","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/pretrain.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":"e4fc8364925146e1"}},{"code_sha256_prefix":"c8e38ae70c7e3a31","entry":"sce_loss","repo":"einae-nd/moama-dev","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/pretrain.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":"c8e38ae70c7e3a31"}},{"code_sha256_prefix":"a719fb4645e84d66","entry":"inter_motif_proximity","repo":"einae-nd/moama-dev","repo_kind":"official","path":"datautils.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/datautils.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":"a719fb4645e84d66"}},{"code_sha256_prefix":"d33c6045784db272","entry":"process","repo":"einae-nd/moama-dev","repo_kind":"official","path":"get_vocab.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/get_vocab.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":"d33c6045784db272"}},{"code_sha256_prefix":"35f82dabb56be006","entry":"read_encoder_checkpoint","repo":"einae-nd/moama-dev","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/finetune.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":"35f82dabb56be006"}},{"code_sha256_prefix":"6f9bb5eb98ec4887","entry":"sce_loss","repo":"einae-nd/moama-dev","repo_kind":"official","path":"gnn_model.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/gnn_model.py","link_basis":"harvester_set","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":"6f9bb5eb98ec4887"}},{"code_sha256_prefix":"64031117dac3cd1d","entry":"set_atommap","repo":"einae-nd/moama-dev","repo_kind":"official","path":"chemutils.py","file_url":"https://github.com/einae-nd/moama-dev/blob/HEAD/chemutils.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":"64031117dac3cd1d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}