Abstract
Graph Neural Networks (GNNs) achieve state-of-the-art performance on graph-structured data across numerous domains. Their underlying ability to represent nodes as summaries of their vicinities has proven effective for homophilous graphs in particular, in which same-type nodes tend to connect. On heterophilous graphs, in which different-type nodes are likely connected, GNNs perform less consistently, as neighborhood information might be less representative or even misleading. On the other hand, GNN performance is not inferior on all heterophilous graphs, and there is a lack of understanding of what other graph properties affect GNN performance. In this work, we highlight the limitations of the widely used homophily ratio and the recent Cross-Class Neighborhood Similarity (CCNS) metric in estimating GNN performance. To overcome these limitations, we introduce 2-hop Neighbor Class Similarity (2NCS), a new quantitative graph structural property that correlates with GNN performance more strongly and consistently than alternative metrics. 2NCS considers two-hop neighborhoods as a theoretically derived consequence of the two-step label propagation process governing GCN's training-inference process. Experiments on one synthetic and eight real-world graph datasets confirm consistent improvements over existing metrics in estimating the accuracy of GCN- and GAT-based architectures on the node classification task.
Introduction
Graph Neural Networks (GNNs) typically thrive on homophily—the tendency of similar nodes to connect. However, on heterophilous graphs, where different types of nodes connect (e.g., buyer-seller networks), GNN performance becomes unpredictable. For years, researchers relied on the "edge homophily ratio" ($h$) to estimate GNN efficacy, but this metric is often misleading. Some graphs exhibit low homophily yet yield high GNN accuracy, creating a gap in understanding that makes it difficult for practitioners to choose between GNNs and simpler models like Multilayer Perceptrons (MLPs). This work introduces 2-hop Neighbor Class Similarity (2NCS), a structural metric that accurately correlates with GNN success across diverse graph types.
Methods: The 2NCS Metric
The authors analyzed the learning process of a simplified, single-layer Graph Convolutional Network (GCN), observing that information propagation extends beyond immediate neighbors. The weights learned for a node are influenced by the labels of its neighbors' neighbors.
Based on this, 2-hop Neighbor Class Similarity (2NCS) was proposed.
- Intuition: A node $u$ is likely to be classified correctly if its neighbors are connected to nodes that share $u$’s class.
- Calculation: For a node $u$, 2NCS calculates the average fraction of "same-class" nodes found in the neighborhoods of all its immediate neighbors (excluding $u$ itself).
- Graph-level Metric: The graph-level 2NCS is the average of these values across all nodes.
This 2-hop "neighborhood of neighbors" view more closely mirrors the actual information propagation within GNNs compared to traditional 1-hop metrics.
Key Insights and Ideas
A primary finding is that GNNs effectively perform a two-step label propagation. Even if an immediate neighbor belongs to a different class, if that neighbor’s vicinity is dominated by the target node's class, the GNN can extract a useful signal.
This explains the "Squirrel Paradox": on datasets like Chameleon and Squirrel, traditional homophily is low ($≈ 0.22$), yet GNNs perform well. 2NCS correctly identifies these as "GNN-friendly" structures where other metrics suggest they are not.
Key Results
2NCS demonstrates a significantly stronger Pearson correlation ($r$) with GCN and GAT accuracy than previous metrics. On the Chameleon dataset, the correlation between 2NCS and GCN accuracy reached $r = 0.97$, compared to just $0.41$ for standard homophily.
Furthermore, the metric successfully predicted which specific classes within a graph would benefit from the graph structure. Classes with high per-class 2NCS values showed significant performance gains when using a GNN instead of an MLP, proving it is a robust indicator of GNN suitability.
Limitations and Future Work
As a purely structural metric, 2NCS does not account for node feature quality. If features are highly informative despite a noisy graph structure, 2NCS might underestimate performance. Additionally, while derived from a 1-layer GCN, deeper architectures might require a generalized "$k$-NCS" metric. Future work aims to provide a formal mathematical proof that high 2NCS correlates with high performance across all graph topologies.
Summary updated