{"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/a-flexible-equivariant-framework-for-subgraph","title":"A Flexible, Equivariant Framework for Subgraph GNNs via Graph Products and Graph Coarsening","arxiv_id":"2406.09291","date":"2024-06-13","proceeding":null,"authors":["Guy Bar-Shalom","Yam Eitan","Fabrizio Frasca","Haggai Maron"],"abstract":"Subgraph Graph Neural Networks (Subgraph GNNs) enhance the expressivity of message-passing GNNs by representing graphs as sets of subgraphs. They have shown impressive performance on several tasks, but their complexity limits applications to larger graphs. Previous approaches suggested processing only subsets of subgraphs, selected either randomly or via learnable sampling. However, they make suboptimal subgraph selections or can only cope with very small subset sizes, inevitably incurring performance degradation. This paper introduces a new Subgraph GNNs framework to address these issues. We employ a graph coarsening function to cluster nodes into super-nodes with induced connectivity. The product between the coarsened and the original graph reveals an implicit structure whereby subgraphs are associated with specific sets of nodes. By running generalized message-passing on such graph product, our method effectively implements an efficient, yet powerful Subgraph GNN. Controlling the coarsening function enables meaningful selection of any number of subgraphs while, contrary to previous methods, being fully compatible with standard training techniques. Notably, we discover that the resulting node feature tensor exhibits new, unexplored permutation symmetries. We leverage this structure, characterize the associated linear equivariant layers and incorporate them into the layers of our Subgraph GNN architecture. Extensive experiments on multiple graph learning benchmarks demonstrate that our method is significantly more flexible than previous approaches, as it can seamlessly handle any number of subgraphs, while consistently outperforming baseline approaches.","url_abs":"https://arxiv.org/abs/2406.09291v3","url_pdf":"https://arxiv.org/pdf/2406.09291v3.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":[],"tasks":[{"task_slug":"graph-learning","task_name":"Graph Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.09291","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.09291"}},"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":"deterministic:regex_extraction","url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":12,"ran_violates":1,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":15,"ran":13,"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":"9ffa2cf95ac5b0c6","entry":"get_all_pairs_shortest_paths","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/preprocess.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/preprocess.py","link_basis":"first_harvest_node","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":"9ffa2cf95ac5b0c6"}},{"code_sha256_prefix":"80cc23392b358be2","entry":"get_coarsened_graph","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/coarsening_func.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/coarsening_func.py","link_basis":"first_harvest_node","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":"80cc23392b358be2"}},{"code_sha256_prefix":"14df510cbecb4592","entry":"get_coarsened_graph_attributes_K_means","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/coarsening_func.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/coarsening_func.py","link_basis":"first_harvest_node","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":"14df510cbecb4592"}},{"code_sha256_prefix":"87c78454cb407527","entry":"get_loss_func","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/training.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/training.py","link_basis":"first_harvest_node","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":"87c78454cb407527"}},{"code_sha256_prefix":"ab310e224d130e10","entry":"get_optim_func","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/training.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/training.py","link_basis":"first_harvest_node","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":"ab310e224d130e10"}},{"code_sha256_prefix":"5c0f4df6f4ca1127","entry":"get_sched_func","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/training.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/training.py","link_basis":"first_harvest_node","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":"5c0f4df6f4ca1127"}},{"code_sha256_prefix":"73de73b70ab4d430","entry":"get_spd_for_product_graph","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/preprocess.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/preprocess.py","link_basis":"first_harvest_node","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":"73de73b70ab4d430"}},{"code_sha256_prefix":"d06e25f9691220a7","entry":"initialize_best_metrics","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/my_logging.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/my_logging.py","link_basis":"first_harvest_node","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":"d06e25f9691220a7"}},{"code_sha256_prefix":"bb2d04f8c8fcd377","entry":"load_config","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/arguments.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/arguments.py","link_basis":"first_harvest_node","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":"bb2d04f8c8fcd377"}},{"code_sha256_prefix":"b6c845f0c18e84b7","entry":"override_config_with_args","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/arguments.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/arguments.py","link_basis":"first_harvest_node","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":"b6c845f0c18e84b7"}},{"code_sha256_prefix":"4a401f868d8c79e3","entry":"spectral_clustering","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/coarsening_func.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/coarsening_func.py","link_basis":"first_harvest_node","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":"4a401f868d8c79e3"}},{"code_sha256_prefix":"7c508037b40522af","entry":"str2bool","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/arguments.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/arguments.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c508037b40522af"}},{"code_sha256_prefix":"92a281b2818ac230","entry":"update_best_metrics","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/my_logging.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/my_logging.py","link_basis":"first_harvest_node","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":"92a281b2818ac230"}},{"code_sha256_prefix":"4d396f8ff7388ef6","entry":"get_zinc12k_dataloader","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/data.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/data.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":"4d396f8ff7388ef6"}},{"code_sha256_prefix":"083c1d99bb6ad80b","entry":"get_zincfull_dataloader","repo":"BarSGuy/Efficient-Subgraph-GNNs","repo_kind":"found_in_text","path":"utils/data.py","file_url":"https://github.com/BarSGuy/Efficient-Subgraph-GNNs/blob/HEAD/utils/data.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":"083c1d99bb6ad80b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}