Abstract
Graph Neural Networks (GNNs) have achieved remarkable performance in modeling graphs for various applications. However, most existing GNNs assume the graphs exhibit strong homophily in node labels, i.e., nodes with similar labels are connected in the graphs. They fail to generalize to heterophilic graphs where linked nodes may have dissimilar labels and attributes. Therefore, in this paper, we investigate a novel framework that performs well on graphs with either homophily or heterophily. More specifically, we propose a label-wise message passing mechanism to avoid the negative effects caused by aggregating dissimilar node representations and preserve the heterophilic contexts for representation learning. We further propose a bi-level optimization method to automatically select the model for graphs with homophily/heterophily. Theoretical analysis and extensive experiments demonstrate the effectiveness of our proposed framework for node classification on both homophilic and heterophilic graphs.
Introduction: The Homophily Assumption
Standard Graph Neural Networks (GNNs), such as GCN and GAT, operate on the implicit assumption of homophily—the principle that connected nodes likely share the same class label. In homophilic graphs, like citation networks, averaging the features of a node's neighbors effectively smooths noise and improves classification. However, many real-world networks exhibit heterophily, where connected nodes are often dissimilar (e.g., dating networks or specific molecular structures).
When standard GNNs aggregate features in heterophilic environments, they mix disparate feature distributions, creating a non-discriminative representation. This often causes GNNs to perform worse than a simple Multi-Layer Perceptron (MLP) that ignores the graph structure entirely. To bridge this gap, we introduce LW-GCN (Label-Wise Graph Convolutional Network), a framework designed to adapt dynamically to any graph's homophily level.
Theoretical Insights: Why GCN Fails
A core contribution of this work is a rigorous theoretical analysis showing exactly why GCN fails on heterophilic graphs. We prove that as the homophily ratio decreases, the discriminative power of GCN's representations drops, hitting a mathematical minimum when the homophily ratio equals $1/C$ (where $C$ is the number of classes), before showing a slight recovery.
As illustrated in Figure 6, standard GNN performance degrades significantly as homophily decreases, eventually falling below the MLP baseline. This visualization confirms that standard aggregation is ill-suited for low-homophily regimes.
Proposed Method: LW-GCN
LW-GCN addresses these limitations through three primary components:
1. Label-Wise Graph Convolution
Instead of blindly averaging all neighbors, LW-GCN groups a node's neighbors by their class labels. It aggregates features within each class group separately and then concatenates these group representations. This preserves the specific "heterophilic context"—the unique pattern of connections to different classes—which serves as a discriminative "neighborhood fingerprint."
Figure 1 demonstrates how these label-wise patterns vary across different heterophilic datasets like Crocodile, Squirrel, and Chameleon, providing rich local context that standard GNNs would otherwise blur.
2. Pseudo-Label Predictor
Because most nodes in semi-supervised learning lack ground-truth labels, LW-GCN uses a simple MLP to generate "pseudo-labels" for unlabeled nodes. These labels are used to route neighbors into the correct groups for the label-wise convolution.
3. Automatic Model Selection
To ensure the model remains effective on homophilic graphs, the framework trains both the label-wise GNN and a standard homophilic GNN (like GCNII) in parallel. A bi-level optimization strategy on the validation set learns a weighting parameter, allowing the model to automatically route predictions to the best architecture for the given graph without manual tuning.
Experimental Results
We evaluated LW-GCN across a wide range of benchmarks, including homophilic citation networks (Cora, Citeseer, Pubmed) and heterophilic webpage/Wikipedia networks (Texas, Cornell, Chameleon, Squirrel, Crocodile).
- Heterophilic Gains: On the highly heterophilic Texas dataset (homophily ratio 0.11), LW-GCN achieved 86.2% accuracy, significantly outperforming standard GCN (57.6%) and other heterophily-specific models like SimP-GCN (80.5%).
- Homophilic Robustness: On the Cora dataset (homophily ratio 0.81), LW-GCN achieved 84.3% accuracy, matching the state-of-the-art homophilic model GCNII (84.2%).
- Adaptive Routing: The bi-level optimization module successfully acted as a smart router, assigning nearly 100% weight to the label-wise GNN on heterophilic graphs and nearly 100% to the standard GNN on homophilic ones.
Conclusion
LW-GCN demonstrates that heterophily is an informative feature rather than a limitation. By preserving local context through label-wise aggregation and employing an automated model selection mechanism, LW-GCN provides a robust, unified solution for node classification across diverse graph structures. Future work will investigate generating useful pseudo-labels for tasks where node labels are entirely absent, such as pure link prediction.
Summary updated