{"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/where-to-mask-structure-guided-masking-for","title":"Where to Mask: Structure-Guided Masking for Graph Masked Autoencoders","arxiv_id":"2404.15806","date":"2024-04-24","proceeding":null,"authors":["Chuang Liu","Yuyao Wang","Yibing Zhan","Xueqi Ma","Dapeng Tao","Jia Wu","Wenbin Hu"],"abstract":"Graph masked autoencoders (GMAE) have emerged as a significant advancement in self-supervised pre-training for graph-structured data. Previous GMAE models primarily utilize a straightforward random masking strategy for nodes or edges during training. However, this strategy fails to consider the varying significance of different nodes within the graph structure. In this paper, we investigate the potential of leveraging the graph's structural composition as a fundamental and unique prior in the masked pre-training process. To this end, we introduce a novel structure-guided masking strategy (i.e., StructMAE), designed to refine the existing GMAE models. StructMAE involves two steps: 1) Structure-based Scoring: Each node is evaluated and assigned a score reflecting its structural significance. Two distinct types of scoring manners are proposed: predefined and learnable scoring. 2) Structure-guided Masking: With the obtained assessment scores, we develop an easy-to-hard masking strategy that gradually increases the structural awareness of the self-supervised reconstruction task. Specifically, the strategy begins with random masking and progresses to masking structure-informative nodes based on the assessment scores. This design gradually and effectively guides the model in learning graph structural information. Furthermore, extensive experiments consistently demonstrate that our StructMAE method outperforms existing state-of-the-art GMAE models in both unsupervised and transfer learning tasks. Codes are available at https://github.com/LiuChuang0059/StructMAE.","url_abs":"https://arxiv.org/abs/2404.15806v1","url_pdf":"https://arxiv.org/pdf/2404.15806v1.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":"where-to-mask-structure-guided-masking-for","repo_url":"https://github.com/liuchuang0059/structmae","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2404.15806","atlas_url":"https://app.syntology.ai/?focus=2404.15806","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.15806"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/liuchuang0059/structmae","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/LiuChuang0059/StructMAE","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran_draft_wrong":1,"ran_fixture":1,"ran":2,"unverified":6},"by_repo_kind":{"official":{"samples":12,"ran":6,"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":12,"samples":[{"code_sha256_prefix":"1d31c46fec1fe3d1","entry":"compute_accuracy","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/pretraining.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/pretraining.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1d31c46fec1fe3d1"}},{"code_sha256_prefix":"9d7dd278d1589149","entry":"create_activation","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/graphmae_utils.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/graphmae_utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d7dd278d1589149"}},{"code_sha256_prefix":"0fa9e6c975030f82","entry":"evaluate_graph_embeddings_using_svm","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/main_graph.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/main_graph.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0fa9e6c975030f82"}},{"code_sha256_prefix":"72802feedc425ec2","entry":"getPagerank","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-P/main_graph.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-P/main_graph.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":"72802feedc425ec2"}},{"code_sha256_prefix":"287484b87212f47d","entry":"graph_data_obj_to_nx_simple","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/loader.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/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":"80efc9c262d235a6","entry":"sce_loss","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/pretraining.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/pretraining.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":"80efc9c262d235a6"}},{"code_sha256_prefix":"90fff8ecfb1094f2","entry":"create_norm","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/graphmae_utils.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/graphmae_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":"90fff8ecfb1094f2"}},{"code_sha256_prefix":"ca7eaba82ff7ba27","entry":"eval","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/finetune.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/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":"ca7eaba82ff7ba27"}},{"code_sha256_prefix":"c7af8d881e2c711f","entry":"evaluate_graph_embeddings_using_svm","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-P/main_graph.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-P/main_graph.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":"c7af8d881e2c711f"}},{"code_sha256_prefix":"7a2bb855a3e02bfe","entry":"get_test_acc","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/chem/parse_result.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/chem/parse_result.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":"7a2bb855a3e02bfe"}},{"code_sha256_prefix":"4b1679ebff258c6e","entry":"graph_classification_evaluation","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-L/main_graph.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-L/main_graph.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":"4b1679ebff258c6e"}},{"code_sha256_prefix":"d2f26e4b3715247f","entry":"graph_classification_evaluation","repo":"LiuChuang0059/StructMAE","repo_kind":"official","path":"StructMAE-P/main_graph.py","file_url":"https://github.com/LiuChuang0059/StructMAE/blob/HEAD/StructMAE-P/main_graph.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":"d2f26e4b3715247f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}