{"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/neural-graph-pattern-machine","title":"Beyond Message Passing: Neural Graph Pattern Machine","arxiv_id":"2501.18739","date":"2025-01-30","proceeding":null,"authors":["Zehong Wang","Zheyuan Zhang","Tianyi Ma","Nitesh V Chawla","Chuxu Zhang","Yanfang Ye"],"abstract":"Graph learning tasks often hinge on identifying key substructure patterns -- such as triadic closures in social networks or benzene rings in molecular graphs -- that underpin downstream performance. However, most existing graph neural networks (GNNs) rely on message passing, which aggregates local neighborhood information iteratively and struggles to explicitly capture such fundamental motifs, like triangles, k-cliques, and rings. This limitation hinders both expressiveness and long-range dependency modeling. In this paper, we introduce the Neural Graph Pattern Machine (GPM), a novel framework that bypasses message passing by learning directly from graph substructures. GPM efficiently extracts, encodes, and prioritizes task-relevant graph patterns, offering greater expressivity and improved ability to capture long-range dependencies. Empirical evaluations across four standard tasks -- node classification, link prediction, graph classification, and graph regression -- demonstrate that GPM outperforms state-of-the-art baselines. Further analysis reveals that GPM exhibits strong out-of-distribution generalization, desirable scalability, and enhanced interpretability. Code and datasets are available at: https://github.com/Zehong-Wang/GPM.","url_abs":"https://arxiv.org/abs/2501.18739v2","url_pdf":"https://arxiv.org/pdf/2501.18739v2.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":"neural-graph-pattern-machine","repo_url":"https://github.com/zehong-wang/gpm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"neural-graph-pattern-machine","repo_url":"https://github.com/zehong-wang/g2pm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-classification","task_name":"Graph Classification"},{"task_slug":"graph-learning","task_name":"Graph Learning"},{"task_slug":"graph-regression","task_name":"Graph Regression"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":"out-of-distribution-generalization","task_name":"Out-of-Distribution Generalization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2501.18739","atlas_url":"https://app.syntology.ai/?focus=2501.18739","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2501.18739"}},"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":"deterministic:regex_extraction","url":"https://github.com/Zehong-Wang/GPM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zehong-wang/gpm","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zehong-wang/g2pm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":2,"ran":4,"ran_draft_wrong":2,"ran_honours":1,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":9,"repositories":1},"listed":{"samples":2,"ran":1,"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":"60fff7c3c400d7ff","entry":"default","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/model/vq.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/model/vq.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/model/vq.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/model/vq.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"672995c2ac8b327a","entry":"get_cosine_annealing_scheduler","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/utils/scheduler.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/utils/scheduler.py","link_basis":"harvester_set","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":"672995c2ac8b327a"}},{"code_sha256_prefix":"3e633b4f0c5302cf","entry":"get_device_from_model","repo":"zehong-wang/g2pm","repo_kind":"listed","path":"G2PM/model/encoder.py","file_url":"https://github.com/zehong-wang/g2pm/blob/HEAD/G2PM/model/encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e633b4f0c5302cf"}},{"code_sha256_prefix":"79e416fbce15d58c","entry":"get_inverse_sqrt_scheduler","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/utils/scheduler.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/utils/scheduler.py","link_basis":"harvester_set","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":"79e416fbce15d58c"}},{"code_sha256_prefix":"7558c1d41d184597","entry":"get_scheduler","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/utils/scheduler.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/utils/scheduler.py","link_basis":"harvester_set","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":"7558c1d41d184597"}},{"code_sha256_prefix":"f3232418205f7cbd","entry":"identity","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/model/vq.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/model/vq.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3232418205f7cbd"}},{"code_sha256_prefix":"61a99afe6c29b5cc","entry":"multitask_cross_entropy","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/task/graph.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/task/graph.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61a99afe6c29b5cc"}},{"code_sha256_prefix":"f76735dbf51c30a9","entry":"multitask_cross_entropy","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/task/node.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/task/node.py","link_basis":"harvester_set","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":"f76735dbf51c30a9"}},{"code_sha256_prefix":"774f1180f297f8a6","entry":"multitask_regression","repo":"Zehong-Wang/GPM","repo_kind":"official","path":"GPM/task/graph.py","file_url":"https://github.com/Zehong-Wang/GPM/blob/HEAD/GPM/task/graph.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"774f1180f297f8a6"}},{"code_sha256_prefix":"fea8ede8dfffb857","entry":"PatternEncoder","repo":"zehong-wang/g2pm","repo_kind":"listed","path":"G2PM/model/encoder.py","file_url":"https://github.com/zehong-wang/g2pm/blob/HEAD/G2PM/model/encoder.py","link_basis":"first_harvest_node","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":"fea8ede8dfffb857"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}