{"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/from-stars-to-subgraphs-uplifting-any-gnn","title":"From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness","arxiv_id":"2110.03753","date":"2021-10-07","proceeding":"ICLR 2022 4","authors":["Lingxiao Zhao","Wei Jin","Leman Akoglu","Neil Shah"],"abstract":"Message Passing Neural Networks (MPNNs) are a common type of Graph Neural Network (GNN), in which each node's representation is computed recursively by aggregating representations (messages) from its immediate neighbors akin to a star-shaped pattern. MPNNs are appealing for being efficient and scalable, how-ever their expressiveness is upper-bounded by the 1st-order Weisfeiler-Lehman isomorphism test (1-WL). In response, prior works propose highly expressive models at the cost of scalability and sometimes generalization performance. Our work stands between these two regimes: we introduce a general framework to uplift any MPNN to be more expressive, with limited scalability overhead and greatly improved practical performance. We achieve this by extending local aggregation in MPNNs from star patterns to general subgraph patterns (e.g.,k-egonets):in our framework, each node representation is computed as the encoding of a surrounding induced subgraph rather than encoding of immediate neighbors only (i.e. a star). We choose the subgraph encoder to be a GNN (mainly MPNNs, considering scalability) to design a general framework that serves as a wrapper to up-lift any GNN. We call our proposed method GNN-AK(GNN As Kernel), as the framework resembles a convolutional neural network by replacing the kernel with GNNs. Theoretically, we show that our framework is strictly more powerful than 1&2-WL, and is not less powerful than 3-WL. We also design subgraph sampling strategies which greatly reduce memory footprint and improve speed while maintaining performance. Our method sets new state-of-the-art performance by large margins for several well-known graph ML tasks; specifically, 0.08 MAE on ZINC,74.79% and 86.887% accuracy on CIFAR10 and PATTERN respectively.","url_abs":"https://arxiv.org/abs/2110.03753v3","url_pdf":"https://arxiv.org/pdf/2110.03753v3.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":"from-stars-to-subgraphs-uplifting-any-gnn","repo_url":"https://github.com/gnnaskernel/gnnaskernel","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"from-stars-to-subgraphs-uplifting-any-gnn","repo_url":"https://github.com/GNNAsKernel/GNNAsKernel","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"},{"method_slug":"mpnn","method_name":"MPNN"},{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"GIN-AK","rank_in_archive_order":18,"of":36,"metrics":{"Ext. data":"No","Number of params":"3081029","Test AP":"0.2930 ± 0.0044","Validation AP":"0.3047 ± 0.0007"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2110.03753","atlas_url":"https://app.syntology.ai/?focus=2110.03753","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.03753"}},"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/gnnaskernel/gnnaskernel","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/GNNAsKernel/GNNAsKernel","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":14,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":18,"ran":15,"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":"3f4feffe7a709b10","entry":"barabasi_albert","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/graph_generation.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/graph_generation.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":"3f4feffe7a709b10"}},{"code_sha256_prefix":"425c2e76c1369d72","entry":"compute_block_num_edges","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/sbm_cliques.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/sbm_cliques.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":"425c2e76c1369d72"}},{"code_sha256_prefix":"f6b944f50d3f15ae","entry":"count_parameters","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/train_helper.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/train_helper.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f6b944f50d3f15ae"}},{"code_sha256_prefix":"5ab4deddff163d3b","entry":"erdos_renyi","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/graph_generation.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/graph_generation.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":"5ab4deddff163d3b"}},{"code_sha256_prefix":"2a59fa799463cd9d","entry":"first_neighbours","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/graph_algorithms.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/graph_algorithms.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":"2a59fa799463cd9d"}},{"code_sha256_prefix":"a471d7256b3eb9bd","entry":"generate_sbm_task1","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/sbm_cliques.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/sbm_cliques.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":"a471d7256b3eb9bd"}},{"code_sha256_prefix":"f3ee26dcf23b9502","entry":"generate_sbm_task2","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/sbm_cliques.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/sbm_cliques.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":"f3ee26dcf23b9502"}},{"code_sha256_prefix":"5547f9317a2e9d3e","entry":"grid","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/graph_generation.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/graph_generation.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":"5547f9317a2e9d3e"}},{"code_sha256_prefix":"fb8499ec76ac4593","entry":"identity","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/graph_algorithms.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/graph_algorithms.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":"fb8499ec76ac4593"}},{"code_sha256_prefix":"49425b9ed823cdbc","entry":"is_connected","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/graph_algorithms.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/graph_algorithms.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":"49425b9ed823cdbc"}},{"code_sha256_prefix":"3f97bfae7118b1d2","entry":"k_fold","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/train_helper.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/train_helper.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":"3f97bfae7118b1d2"}},{"code_sha256_prefix":"1e745661a3f4937f","entry":"read_gin_tudataset","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/tudataset_gin_split.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/tudataset_gin_split.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":"1e745661a3f4937f"}},{"code_sha256_prefix":"f930a8015a340687","entry":"to_sparse","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/transform.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/transform.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":"f930a8015a340687"}},{"code_sha256_prefix":"62d7c9d7e000ee36","entry":"to_torch_geom","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/data_utils/data_pna.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/data_utils/data_pna.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":"62d7c9d7e000ee36"}},{"code_sha256_prefix":"62aaa0dd4a43fa3a","entry":"update_cfg","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/config.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/config.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":"62aaa0dd4a43fa3a"}},{"code_sha256_prefix":"c04724063899461e","entry":"config_logger","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/log.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/log.py","link_basis":"harvester_set","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":"c04724063899461e"}},{"code_sha256_prefix":"47f0ee2b5e3edb95","entry":"extract_subgraphs","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/transform.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/transform.py","link_basis":"harvester_set","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":"47f0ee2b5e3edb95"}},{"code_sha256_prefix":"88b93663a02c01ff","entry":"select_subgraphs","repo":"GNNAsKernel/GNNAsKernel","repo_kind":"official","path":"core/transform.py","file_url":"https://github.com/GNNAsKernel/GNNAsKernel/blob/HEAD/core/transform.py","link_basis":"harvester_set","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":"88b93663a02c01ff"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}