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, we investigate a novel framework that performs well on graphs with either homophily or heterophily. 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 (https://github.com/EnyanDai/LWGCN) for node classification on both homophilic and heterophilic graphs.
All Science Journal Classification (ASJC) codes
- Artificial Intelligence
- Control and Systems Engineering
- Statistics and Probability