SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.18854 · 2024

What Is Missing In Homophily? Disentangling Graph Homophily For Graph Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 11 functions out of this paper's own repositories and ran 10 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
zylmozart/disentangle_graphhom canonical 10 of 11
FunctionStatusWhere it lives
cross_class_neighbor_similarity Ran zylmozart/disentangle_graphhom/utils/homophily_metrics.py
code served (permissive licence) · get_code("6c070d8d3769da17")
edge_homophily Ran zylmozart/disentangle_graphhom/homophily.py
code served (permissive licence) · get_code("95ad75b3e583df53")
neighborhood_homophily Ran zylmozart/disentangle_graphhom/utils/homophily_metrics.py
code served (permissive licence) · get_code("bf40f9371cf13ba1")
node_homophily Ran zylmozart/disentangle_graphhom/homophily.py
code served (permissive licence) · get_code("aaa80033faca2aeb")
normalize Ran zylmozart/disentangle_graphhom/utils/util_funcs.py
code served (permissive licence) · get_code("7864a49a3e2da4fd")
normalize_tensor Ran zylmozart/disentangle_graphhom/utils/train_utils.py
code served (permissive licence) · get_code("6784eb2b1dbf4455")
remove_self_loops Ran zylmozart/disentangle_graphhom/homophily.py
code served (permissive licence) · get_code("ef90ba6dacfae5eb")
spectral_radius_sp_matrix Ran zylmozart/disentangle_graphhom/utils/train_utils.py
code served (permissive licence) · get_code("6f63e8ed588c5c47")
spectral_radius_sp_matrix Ran zylmozart/disentangle_graphhom/utils/util_funcs.py
code served (permissive licence) · get_code("ad582bcf67eada8c")
sym_matrix Ran zylmozart/disentangle_graphhom/utils/train_utils.py
code served (permissive licence) · get_code("d8014340a3d1f330")
get_pyg_dataset Not yet run zylmozart/disentangle_graphhom/preprocess_dataset.py
code served (permissive licence) · get_code("0b2b4a99abaf17f1")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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}.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.18854")
get_code_for_paper("2406.18854")
have("2406.18854")

Connect an agent — have() is free.