{"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/gnns-getting-comfy-community-and-feature","title":"GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring","arxiv_id":"2502.04891","date":"2025-02-07","proceeding":null,"authors":["Celia Rubio-Madrigal","Adarsh Jamadandi","Rebekka Burkholz"],"abstract":"Maximizing the spectral gap through graph rewiring has been proposed to enhance the performance of message-passing graph neural networks (GNNs) by addressing over-squashing. However, as we show, minimizing the spectral gap can also improve generalization. To explain this, we analyze how rewiring can benefit GNNs within the context of stochastic block models. Since spectral gap optimization primarily influences community strength, it improves performance when the community structure aligns with node labels. Building on this insight, we propose three distinct rewiring strategies that explicitly target community structure, node labels, and their alignment: (a) community structure-based rewiring (ComMa), a more computationally efficient alternative to spectral gap optimization that achieves similar goals; (b) feature similarity-based rewiring (FeaSt), which focuses on maximizing global homophily; and (c) a hybrid approach (ComFy), which enhances local feature similarity while preserving community structure to optimize label-community alignment. Extensive experiments confirm the effectiveness of these strategies and support our theoretical insights.","url_abs":"https://arxiv.org/abs/2502.04891v1","url_pdf":"https://arxiv.org/pdf/2502.04891v1.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":"gnns-getting-comfy-community-and-feature","repo_url":"https://github.com/RelationalML/ComFy","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"node-classification","task_name":"Node Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2502.04891","atlas_url":"https://app.syntology.ai/?focus=2502.04891","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.04891"}},"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/RelationalML/ComFy","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"unverified":7},"by_repo_kind":{"official":{"samples":11,"ran":4,"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":"f9f42b8b5fc8871f","entry":"convert_labels_to_consecutive_integers","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/nodeli.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/nodeli.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":"f9f42b8b5fc8871f"}},{"code_sha256_prefix":"8a42ddb4c2e9ada3","entry":"get_graph_and_labels_from_pyg_dataset","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/nodeli.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/nodeli.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":"8a42ddb4c2e9ada3"}},{"code_sha256_prefix":"26fc619ec8678aa9","entry":"make_labels_hashable","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/nodeli.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/nodeli.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":"26fc619ec8678aa9"}},{"code_sha256_prefix":"fe1befd93025f18b","entry":"proxydelmax","repo":"RelationalML/ComFy","repo_kind":"official","path":"Spectral/methods.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Spectral/methods.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":"fe1befd93025f18b"}},{"code_sha256_prefix":"50cb189b5c97597b","entry":"load_data","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/dataloader.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/dataloader.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":"50cb189b5c97597b"}},{"code_sha256_prefix":"8402cd79e63ca15b","entry":"load_data","repo":"RelationalML/ComFy","repo_kind":"official","path":"CommunityRewiring/dataloader.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/CommunityRewiring/dataloader.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":"8402cd79e63ca15b"}},{"code_sha256_prefix":"2abb6906606a7567","entry":"proxyaddmax","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/methods.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/methods.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":"2abb6906606a7567"}},{"code_sha256_prefix":"0b0dc22e984c1dbf","entry":"proxyaddmax","repo":"RelationalML/ComFy","repo_kind":"official","path":"Spectral/methods.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Spectral/methods.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":"0b0dc22e984c1dbf"}},{"code_sha256_prefix":"edde6e5c733773f9","entry":"proxydelmax","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/methods.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/methods.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":"edde6e5c733773f9"}},{"code_sha256_prefix":"290a39798ff9d0ce","entry":"proxydelmin","repo":"RelationalML/ComFy","repo_kind":"official","path":"Comm+Sim/methods.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Comm%2BSim/methods.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":"290a39798ff9d0ce"}},{"code_sha256_prefix":"568fa2708cd35ca3","entry":"proxydelmin","repo":"RelationalML/ComFy","repo_kind":"official","path":"Spectral/methods.py","file_url":"https://github.com/RelationalML/ComFy/blob/HEAD/Spectral/methods.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":"568fa2708cd35ca3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}