When Do Graph Neural Networks Help with Node Classification? Investigating the Homophily Principle on Node Distinguishability

Sitao Luan, Chenqing Hua, Minkai Xu, Qincheng Lu, Jiaqi Zhu, Xiao-Wen Chang, Jie Fu, Jure Leskovec, Doina Precup

For years, the "homophily principle"—the idea that connected nodes tend to share the same labels—has been the dominant explanation for why Graph Neural Networks (GNNs) succeed. The prevailing assumption was that if a graph is "heterophilic" (where connected nodes are likely to have different labels), GNNs are fundamentally disadvantaged.

However, research presented at NeurIPS 2023 by a collaborative team from McGill, Mila, Stanford, and HKUST argues that this view is incomplete. By shifting the focus from simple connectivity to Node Distinguishability (ND), the authors provide a clearer framework for understanding when graph structure actually adds value to a classification task.

Beyond the Homophily Myth

The GNN community has historically operated under a "homophily wins, heterophily loses" mindset. While some studies suggested that GNNs can work on heterophilic graphs if neighborhood patterns are consistent, the field lacked a rigorous way to quantify this phenomenon.

Existing homophily metrics are often "feature-blind," meaning they analyze the graph's edges and labels while ignoring the actual data sitting on the nodes. Furthermore, these metrics fail to provide a statistical threshold to help engineers decide whether to use a GNN or a simpler Multi-Layer Perceptron (MLP). If the graph structure does not make classes more distinguishable than the features alone, the added complexity of a GNN may be counterproductive.

Theoretical Framework: CSBM-H and Node Distinguishability

The authors address these gaps through three primary contributions:

  1. CSBM-H (Contextual Stochastic Block Model for Homophily): A new generative graph model that allows researchers to precisely control homophily levels, class variances, and node degrees. This provides a controlled environment to test how different graph properties affect model performance.
  2. Quantifying Distinguishability: The study utilizes Probabilistic Bayes Error (PBE) and Jeffreys divergence to measure how "separable" classes are after passing through graph filters (such as low-pass or high-pass filters). This moves the conversation from simple topology to statistical separability.
  3. CPM (Classifier-based Performance Metric): This is the practical application of the paper's theory. Instead of a simple ratio, CPM uses a "training-free" classifier (like Gaussian Naive Bayes) on both raw features and aggregated features. By using hypothesis testing, it provides a p-value that indicates whether the graph structure significantly improves node classification over features alone.

Key Insights: The Mid-Homophily Pitfall

One of the most surprising discoveries in the paper is the "Mid-Homophily Pitfall." GNN performance does not necessarily decline linearly as homophily decreases. Instead, GNNs often perform their worst at medium levels of homophily, rather than at extreme heterophily. At these middle ranges, the neighborhood aggregation process often creates the most overlap between class distributions, making them harder to distinguish.

Additionally, the paper provides a novel theoretical explanation for why high-pass filters work in heterophilic settings. They demonstrate that these filters capture "relative center distance," essentially pushing aggregated class centers further apart even when the graph structure appears messy or inconsistent.

Experimental Results

The authors tested their framework on an exhaustive suite of benchmarks, including small-scale datasets (Cornell, Texas, Cora) and large-scale datasets (Penn94, arXiv-year, snap-patents), alongside 280 synthetic graphs generated via CSBM-H.

The results for the new CPM metric were particularly compelling:

  • Predictive Accuracy: On standard benchmarks, CPM reduced the number of "incorrect" predictions (cases where a metric fails to predict if a GNN will beat an MLP) from 5–11 cases down to just 1 out of 18.
  • Statistical Power: Unlike traditional metrics that provide a vague coefficient between 0 and 1, CPM provides a p-value. A result of $p < 0.05$ gives researchers a mathematically grounded reason to choose a GNN over a simpler model.
  • Efficiency: Despite its complexity, CPM is highly efficient, processing massive datasets like snap-patents (millions of nodes and edges) in only a few minutes.

Limitations and Future Directions

While the paper offers a significant leap forward, some anomalies remain. In specific cases like PubMed, GCNs still outperform MLPs even when statistical tests suggest they should not. Furthermore, on certain large-scale heterophilic graphs like Penn94, linear GNNs fail while non-linear ones succeed, suggesting a "synergy" between graph structure and feature non-linearity that requires further study.

For practitioners, the takeaway is clear: stop relying solely on homophily ratios. To determine if a GNN is right for a specific dataset, one must look at node distinguishability. By using feature-aware metrics like CPM, developers can make more informed decisions about when the graph structure is a benefit rather than a distraction.

Summary updated

BibTeX
@inproceedings{luan2023when,
  author = {Sitao Luan and Chenqing Hua and Minkai Xu and Qincheng Lu and Jiaqi Zhu and Xiao-Wen Chang and Jie Fu and Jure Leskovec and Doina Precup},
  title = {{When Do Graph Neural Networks Help with Node Classification? Investigating the Homophily Principle on Node Distinguishability}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=kJmYu3Ti2z},
}
Figure