Generalizing Graph Neural Networks Beyond Homophily

Jiong Zhu, Yujun Yan, Lingxiao Zhao, Mark Heimann, Leman Akoglu, Danai Koutra

Abstract: We investigate the representation power of graph neural networks in the semi-supervised node classification task under heterophily or low homophily, i.e., in networks where connected nodes may have different class labels and dissimilar features. Many popular GNNs fail to generalize to this setting, and are even outperformed by models that ignore the graph structure (e.g., multilayer perceptrons). Motivated by this limitation, we identify a set of key designs—ego- and neighbor-embedding separation, higher-order neighborhoods, and combination of intermediate representations—that boost learning from the graph structure under heterophily. We combine them into a graph neural network, H2GCN, which we use as the base method to empirically evaluate the effectiveness of the identified designs. Going beyond the traditional benchmarks with strong homophily, our empirical analysis shows that the identified designs increase the accuracy of GNNs by up to 40% and 27% over models without them on synthetic and real networks with heterophily, respectively, and yield competitive performance under homophily.

Introduction

Most Graph Neural Networks (GNNs) are built on the assumption of homophily—the principle that "birds of a feather flock together," where connected nodes share the same labels. This assumption is the implicit engine behind popular models like GCN and GAT, which work by averaging the features of a node with its neighbors. While this "smoothing" helps in homophilous graphs like citation networks, it becomes a liability in heterophilous settings where "opposites attract."

In real-world networks such as dating apps (connections between opposite genders), fraud detection (fraudsters linking to clean accounts), or protein structures (dissimilar amino acids bonding), averaging a node's features with its neighbors destroys critical information. In these cases, standard GNNs often perform worse than a simple Multilayer Perceptron (MLP) that ignores graph structure entirely. This paper proposes H2GCN, a model designed to excel across the entire spectrum of network types by addressing these structural limitations.

The H2GCN Architecture

To overcome the "low-pass filter" trap of standard GNNs, the authors identify three key design principles:

  1. Ego- and Neighbor-Embedding Separation (D1): Instead of averaging a node's own features ("ego") with its neighbors, H2GCN keeps them separate via concatenation. This prevents the node's unique signal from being washed out by a diverse neighborhood.
  2. Higher-Order Neighborhoods (D2): The model explicitly aggregates information from 1-hop and 2-hop neighbors separately. Theoretically, even if immediate neighbors are different, "friends of friends" are often similar again in heterophilous networks.
  3. Combination of Intermediate Representations (D3): Using a "Jumping Knowledge" approach, H2GCN concatenates embeddings from every layer into the final classification head, allowing it to capture both local and global structural patterns.
Illustration of ego-node v and its higher-order neighborhoods N1(v) and N2(v).

Crucially, H2GCN simplifies the architecture by removing non-linearities between aggregation rounds, finding that a more linear aggregation is more robust in heterophilous settings.

Empirical Evaluation

The authors evaluated H2GCN on a mix of synthetic and real-world benchmarks. Synthetic datasets like syn-cora allowed for precise control over the homophily ratio ($h$), ranging from 0 (perfect heterophily) to 1 (perfect homophily). Real-world benchmarks included heterophilous networks (WebKB, Wikipedia subgraphs) and traditional homophilous ones (Cora, Citeseer).

Key Results

  • Superiority in Heterophily: H2GCN outperformed existing GNNs by up to 27% on real-world heterophilous datasets and up to 40% on synthetic ones. As shown in the performance plots, standard GNNs like GCN and GAT suffer a massive performance drop as homophily decreases, while H2GCN maintains high accuracy.
  • Universal Performance: Unlike previous attempts to fix heterophily, H2GCN remains highly competitive on traditional homophilous benchmarks, making it a robust choice for any graph type.
  • The MLP Baseline: The results confirm that if a GNN cannot beat a graph-agnostic MLP on a dataset, it is likely suffering from an over-reliance on the homophily assumption.
Test accuracy on syn-cora across varying homophily levels (h). H2GCN variants significantly outperform standard GNNs in low-homophily settings.

Discussion and Conclusion

The success of H2GCN lies in its ability to capture "high-frequency" signals that standard GNNs filter out. By separating ego-features and utilizing higher-order neighborhoods, the model preserves the structural nuances of heterophilous graphs.

While H2GCN represents a significant step forward, limitations remain. On certain datasets like Squirrel, all models performed poorly, suggesting that structural designs alone cannot fix cases where node features have low correlation with labels. Future work may involve developing "heterophily-aware" attention mechanisms to further refine how models weight diverse neighborhoods.

Summary updated

Abstract

We investigate the representation power of graph neural networks in the semi-supervised node classification task under heterophily or low homophily, i.e., in networks where connected nodes may have different class labels and dissimilar features. Many popular GNNs fail to generalize to this setting, and are even outperformed by models that ignore the graph structure (e.g., multilayer perceptrons). Motivated by this limitation, we identify a set of key designs -- ego- and neighbor-embedding separation, higher-order neighborhoods, and combination of intermediate representations -- that boost learning from the graph structure under heterophily. We combine them into a graph neural network, H2GCN, which we use as the base method to empirically evaluate the effectiveness of the identified designs. Going beyond the traditional benchmarks with strong homophily, our empirical analysis shows that the identified designs increase the accuracy of GNNs by up to 40% and 27% over models without them on synthetic and real networks with heterophily, respectively, and yield competitive performance under homophily.
BibTeX
@inproceedings{zhu2020generalizing,
  author = {Jiong Zhu and Yujun Yan and Lingxiao Zhao and Mark Heimann and Leman Akoglu and Danai Koutra},
  title = {{Generalizing Graph Neural Networks Beyond Homophily}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=tschVBAgP},
}
Figure