{"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/what-is-missing-in-homophily-disentangling","title":"What Is Missing In Homophily? Disentangling Graph Homophily For Graph Neural Networks","arxiv_id":"2406.18854","date":"2024-06-27","proceeding":null,"authors":["Yilun Zheng","Sitao Luan","Lihui Chen"],"abstract":"Graph homophily refers to the phenomenon that connected nodes tend to share similar characteristics. Understanding this concept and its related metrics is crucial for designing effective Graph Neural Networks (GNNs). The most widely used homophily metrics, such as edge or node homophily, quantify such \"similarity\" as label consistency across the graph topology. These metrics are believed to be able to reflect the performance of GNNs, especially on node-level tasks. However, many recent studies have empirically demonstrated that the performance of GNNs does not always align with homophily metrics, and how homophily influences GNNs still remains unclear and controversial. Then, a crucial question arises: What is missing in our current understanding of homophily? To figure out the missing part, in this paper, we disentangle the graph homophily into $3$ aspects: label, structural, and feature homophily, providing a more comprehensive understanding of GNN performance. To investigate their synergy, we propose a Contextual Stochastic Block Model with $3$ types of Homophily (CSBM-3H), where the topology and feature generation are controlled by the $3$ metrics. Based on the theoretical analysis of CSBM-3H, we derive a new composite metric, named Tri-Hom, that considers all $3$ aspects and overcomes the limitations of conventional homophily metrics. The theoretical conclusions and the effectiveness of Tri-Hom have been verified through synthetic experiments on CSBM-3H. In addition, we conduct experiments on $31$ real-world benchmark datasets and calculate the correlations between homophily metrics and model performance. Tri-Hom has significantly higher correlation values than $17$ existing metrics that only focus on a single homophily aspect, demonstrating its superiority and the importance of homophily synergy. Our code is available at \\url{https://github.com/zylMozart/Disentangle_GraphHom}.","url_abs":"https://arxiv.org/abs/2406.18854v1","url_pdf":"https://arxiv.org/pdf/2406.18854v1.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":"what-is-missing-in-homophily-disentangling","repo_url":"https://github.com/zylmozart/disentangle_graphhom","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"stochastic-block-model","task_name":"Stochastic Block Model"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.18854","atlas_url":"https://app.syntology.ai/?focus=2406.18854","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.18854"}},"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/zylmozart/disentangle_graphhom","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":11,"ran":10,"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":"6c070d8d3769da17","entry":"cross_class_neighbor_similarity","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/homophily_metrics.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/homophily_metrics.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":"6c070d8d3769da17"}},{"code_sha256_prefix":"95ad75b3e583df53","entry":"edge_homophily","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"homophily.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/homophily.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":"95ad75b3e583df53"}},{"code_sha256_prefix":"bf40f9371cf13ba1","entry":"neighborhood_homophily","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/homophily_metrics.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/homophily_metrics.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":"bf40f9371cf13ba1"}},{"code_sha256_prefix":"aaa80033faca2aeb","entry":"node_homophily","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"homophily.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/homophily.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":"aaa80033faca2aeb"}},{"code_sha256_prefix":"7864a49a3e2da4fd","entry":"normalize","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/util_funcs.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/util_funcs.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":"7864a49a3e2da4fd"}},{"code_sha256_prefix":"6784eb2b1dbf4455","entry":"normalize_tensor","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/train_utils.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/train_utils.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":"6784eb2b1dbf4455"}},{"code_sha256_prefix":"ef90ba6dacfae5eb","entry":"remove_self_loops","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"homophily.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/homophily.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ef90ba6dacfae5eb"}},{"code_sha256_prefix":"6f63e8ed588c5c47","entry":"spectral_radius_sp_matrix","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/train_utils.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/train_utils.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":"6f63e8ed588c5c47"}},{"code_sha256_prefix":"ad582bcf67eada8c","entry":"spectral_radius_sp_matrix","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/util_funcs.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/util_funcs.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":"ad582bcf67eada8c"}},{"code_sha256_prefix":"d8014340a3d1f330","entry":"sym_matrix","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"utils/train_utils.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/utils/train_utils.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":"d8014340a3d1f330"}},{"code_sha256_prefix":"0b2b4a99abaf17f1","entry":"get_pyg_dataset","repo":"zylmozart/disentangle_graphhom","repo_kind":"official","path":"preprocess_dataset.py","file_url":"https://github.com/zylmozart/disentangle_graphhom/blob/HEAD/preprocess_dataset.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":"0b2b4a99abaf17f1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}