Is Homophily a Necessity for Graph Neural Networks?

Yao Ma, Xiaorui Liu, Neil Shah, Jiliang Tang

Introduction

Graph neural networks (GNNs) have shown great prowess in learning representations for numerous graph-based machine learning tasks. A long-standing belief in the field is the "homophily assumption"—the idea that GNNs, particularly Graph Convolutional Networks (GCNs), excel because they smooth features across neighbors, and neighbors usually share the same label ("like attracts like"). Conversely, it has been widely assumed that GNNs inherently fail on heterophilous graphs, where dissimilar nodes connect (e.g., dating networks or molecular structures).

This paper challenges that assumption. The authors demonstrate—both theoretically and empirically—that standard GCNs can actually achieve strong performance on heterophilous graphs under certain conditions, introducing a crucial distinction between "good" and "bad" heterophily.

The Homophily Assumption vs. Heterophily

The belief that GNNs require homophily has led researchers to develop complex, specialized architectures to "fix" GNNs for heterophilous datasets. However, the authors noticed a discrepancy: with proper hyperparameter tuning, a standard, "vanilla" GCN can actually outperform these specialized models on several heterophilous benchmarks.

Perfect Heterophily Example

This observation motivated a fundamental question: Is homophily truly a necessity for GNN performance, or have we been looking at the wrong metric?

Methodology

To answer this, the authors tackled the problem through a mix of theoretical proofs and controlled synthetic experiments:

  1. Theoretical Framework: They used the Contextual Stochastic Block Model (CSBM) to analyze how GCN operations affect the linear separability of node classes. They proved that GCNs learn similar embeddings for nodes of the same class if those nodes share a similar neighborhood distribution—regardless of whether those neighbors share the same label.
  2. Synthetic Graph Generation: To isolate variables, they created synthetic graphs by starting with real datasets (like Cora) and adding edges based on specific target distributions. This allowed them to control the homophily ratio and the noise level ($\gamma$) of neighborhood patterns.
  3. Cross-Class Neighborhood Similarity (CCNS): They introduced this metric to quantify how distinguishable neighborhood patterns are between different classes. High CCNS means classes look the same to a GCN; low CCNS means they are distinct.

Key Insights: "Good" vs. "Bad" Heterophily

The paper’s most significant contribution is the idea that heterophily isn't a monolith.

  • "Good" Heterophily: Occurs when nodes of a certain class connect to nodes of other classes in a consistent, predictable pattern. If Class A always connects to Class B, a GCN can easily tell them apart, even though the homophily is zero.
  • "Bad" Heterophily: Occurs when connections are essentially random or indistinguishable between classes, providing no useful signal for the GCN to aggregate.
V-Shape Performance Curve

This dynamic is perfectly illustrated by the V-Shape Performance Curve. In synthetic tests, as the authors added structured heterophilous edges, GCN performance followed a V-shape. Accuracy first dropped as the original homophily was destroyed (moving left on the x-axis), but then rose sharply—sometimes exceeding original performance—as a new, consistent heterophilous pattern emerged at lower homophily ratios.

Key Results

  • Beating Specialized Models: A standard GCN achieved 67.96% accuracy on the Chameleon dataset and 54.47% on Squirrel, outperforming several state-of-the-art models specifically designed for heterophily (like H2GCN and CPGNN).
  • Theoretical Validation: The authors proved that GCN operations can improve the linear separability of classes even in highly heterophilous settings, provided the node degree is high enough and the neighborhood distributions are sufficiently different.
  • Real-World Evidence: By analyzing CCNS heatmaps, the authors showed that GCNs fail on datasets like Actor and Cornell not because they are heterophilous, but because their neighborhood patterns are nearly identical across different classes (high CCNS).

Limitations and Future Work

  • Linearity Assumption: To make the math tractable, the theoretical analysis drops non-linear activation functions (like ReLU). While empirical results suggest the findings still hold, a formal proof including non-linearity remains for future work.
  • Feature Independence: The theoretical proofs assume independence between features, which is rarely true in real-world data.
  • Graph Sparsity: Real-world graphs are often very sparse. In sparse graphs, neighborhood distributions are noisier, making it harder for GCNs to reach the "class expectation" embeddings.
  • Beyond GCN: Extending this rigorous analysis to other message-passing architectures, such as GAT or GraphSAGE, is a logical next step for the community.

Summary updated

BibTeX
@inproceedings{ma2022is,
  author = {Yao Ma and Xiaorui Liu and Neil Shah and Jiliang Tang},
  title = {{Is Homophily a Necessity for Graph Neural Networks?}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=gpCxL3zgvyc},
}
Figure