Finding Global Homophily in Graph Neural Networks When Meeting Heterophily

Xiang Li, Renyu Zhu, Yao Cheng, Caihua Shan, Siqiang Luo, Dongsheng Li, Weining Qian · DOI

Abstract

Traditional Graph Neural Networks (GNNs) are predominantly designed under the assumption of homophily, where connected nodes are expected to share similar features or labels. However, real-world graphs often exhibit heterophily, where linked nodes belong to different classes, causing standard GNNs to perform poorly due to over-smoothing. This paper introduces GloGNN and GloGNN++, two novel architectures that address heterophily by aggregating information from all nodes in a graph. By leveraging a closed-form solution to an optimization problem and a linear-time implementation, these models effectively capture "global homophily"—identifying similar nodes regardless of their distance in the graph topology.

1. Introduction

Graph Neural Networks (GNNs) have achieved remarkable success in various domains by exploiting the structural dependencies between data points. Most existing GNNs rely on the homophily assumption: the principle that "birds of a feather flock together." In homophilous graphs, such as citation networks, nodes with the same label are likely to be connected. Standard GNNs utilize neighborhood aggregation to smooth feature representations, which works well in these scenarios.

However, many practical applications involve heterophilous graphs. For instance, in a predator-prey network or a dating app graph, connected nodes are often intentionally dissimilar. In these cases, the standard smoothing operation of GNNs becomes a liability, as it mixes signals from different classes and degrades classification performance. While some researchers have attempted to mitigate this by expanding the neighborhood search (e.g., 2-hop or 3-hop neighbors), these methods often struggle to find the optimal neighborhood size and remain limited by the graph's physical topology.

2. Methodology: Capturing Global Homophily

The core innovation of GloGNN (Global Graph Neural Network) is the shift from local neighborhood aggregation to a global perspective. Instead of restricting a node's influence to its immediate neighbors, GloGNN considers every node in the graph as a potential source of information.

2.1 Global Aggregation via Coefficient Matrix

GloGNN learns a coefficient matrix $Z$, where each entry $Z_{ij}$ represents the importance of node $j$ to node $i$. Unlike the non-negative attention weights used in models like Graph Attention Networks (GAT), $Z$ can contain signed values. These positive and negative weights allow the model to perform a "high-pass filter" operation, effectively "pushing away" dissimilar nodes while aggregating information from similar ones, even if they are many hops away.

2.2 Optimization and Closed-Form Solution

The authors derive the coefficient matrix $Z$ by solving an optimization problem that balances feature similarity with multi-hop structural similarity. A significant advantage of this approach is that it yields a closed-form solution. This allows the model to determine optimal weights without relying solely on the iterative process of backpropagation for the aggregation coefficients, leading to more stable and theoretically grounded representations.

2.3 GloGNN++: Feature-Wise Attention

An enhanced version, GloGNN++, introduces "horizontal" attention. This mechanism allows the model to learn which specific hidden features are most relevant for the classification task at hand. By combining global node aggregation with feature-wise attention, GloGNN++ further improves the model's ability to distinguish between classes in complex, heterophilous environments.

3. Scalability and the "Linear Time" Trick

A common critique of global aggregation methods is their computational complexity. For a graph with $N$ nodes, an $N \times N$ coefficient matrix typically results in $O(N^2)$ or $O(N^3)$ complexity, which is prohibitive for large-scale datasets.

To overcome this, the authors utilize matrix multiplication reordering (inspired by the Woodbury formula logic). This mathematical optimization allows the model to compute updates in linear time $O(N)$ relative to the number of nodes. Consequently, GloGNN can scale to graphs with millions of nodes, providing a global view without the quadratic memory and time costs associated with dense matrix operations.

4. Theoretical Insights: The Grouping Effect

The paper provides a mathematical proof that GloGNN satisfies a "grouping effect." This property ensures that if two nodes are similar—either in their feature space or their multi-hop structural roles—their learned embeddings will be close to each other. This effect is independent of the physical distance between the nodes in the graph, allowing the model to bridge the gap between distant but similar nodes.

5. Experimental Evaluation

The researchers evaluated GloGNN and GloGNN++ against 11 competing models across 15 diverse benchmark datasets. These datasets ranged from small-scale web networks (Texas, Wisconsin, Cornell) to large-scale social and citation networks (Penn94, arXiv-year, genius).

5.1 Performance and Efficiency

GloGNN++ achieved the highest average rank across all 15 datasets, showing particular dominance in highly heterophilous datasets like Chameleon and Squirrel. Beyond accuracy, the model demonstrated superior efficiency:

  • Speed: On the genius dataset, GloGNN++ was approximately 8x faster than the state-of-the-art ACM-GCN.
  • Memory: While many specialized heterophily models (such as H2GCN or WRGAT) suffered from "Out of Memory" errors on large-scale graphs, GloGNN handled them with ease due to its linear complexity.
  • Convergence: The model typically reached peak accuracy in fewer training epochs than its competitors.

6. Conclusion and Future Work

GloGNN and GloGNN++ represent a significant step forward in handling heterophily by moving beyond the constraints of local neighborhoods. By finding "global homophily" through an efficient, linear-time optimization framework, these models provide a robust solution for diverse graph structures.

Future research may explore the sensitivity of the model's hyperparameters ($\alpha, \beta_1, \beta_2, \gamma$) to simplify the tuning process. Additionally, extending the concept of global homophily to other graph tasks, such as link prediction and graph-level classification, remains a promising avenue for further study.

Summary updated

BibTeX
@inproceedings{li2022finding,
  author = {Xiang Li and Renyu Zhu and Yao Cheng and Caihua Shan and Siqiang Luo and Dongsheng Li and Weining Qian},
  title = {{Finding Global Homophily in Graph Neural Networks When Meeting Heterophily}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=FcZaZ-XlmEW},
}
Figure