Table of Contents
Fetching ...

Incorporating Heterophily into Graph Neural Networks for Graph Classification

Jiayi Yang, Sourav Medya, Wei Ye

TL;DR

This work targets graph classification in networks exhibiting both homophily and heterophily, where traditional GNNs struggle due to uniform aggregation. It introduces IHGNN, which combines ego- and neighbor-embedding integration/separation, adaptively aggregates intermediate embeddings across layers, and employs a permutation-invariant readout aligned with continuous 1-WL to handle varying homophily ratios. Empirical results on nine benchmark datasets show IHGNN achieving state-of-the-art accuracy on 7 of 9 datasets, with ablations confirming the critical roles of each design component; the model demonstrates strong robustness to deeper architectures. Overall, IHGNN provides a principled framework to learn graph representations under mixed homophily, improving graph classification performance and offering scalable, heterophily-aware readouts and aggregations.$

Abstract

Graph Neural Networks (GNNs) often assume strong homophily for graph classification, seldom considering heterophily, which means connected nodes tend to have different class labels and dissimilar features. In real-world scenarios, graphs may have nodes that exhibit both homophily and heterophily. Failing to generalize to this setting makes many GNNs underperform in graph classification. In this paper, we address this limitation by identifying three effective designs and develop a novel GNN architecture called IHGNN (short for Incorporating Heterophily into Graph Neural Networks). These designs include the combination of integration and separation of the ego- and neighbor-embeddings of nodes, adaptive aggregation of node embeddings from different layers, and differentiation between different node embeddings for constructing the graph-level readout function. We empirically validate IHGNN on various graph datasets and demonstrate that it outperforms the state-of-the-art GNNs for graph classification.

Incorporating Heterophily into Graph Neural Networks for Graph Classification

TL;DR

This work targets graph classification in networks exhibiting both homophily and heterophily, where traditional GNNs struggle due to uniform aggregation. It introduces IHGNN, which combines ego- and neighbor-embedding integration/separation, adaptively aggregates intermediate embeddings across layers, and employs a permutation-invariant readout aligned with continuous 1-WL to handle varying homophily ratios. Empirical results on nine benchmark datasets show IHGNN achieving state-of-the-art accuracy on 7 of 9 datasets, with ablations confirming the critical roles of each design component; the model demonstrates strong robustness to deeper architectures. Overall, IHGNN provides a principled framework to learn graph representations under mixed homophily, improving graph classification performance and offering scalable, heterophily-aware readouts and aggregations.$

Abstract

Graph Neural Networks (GNNs) often assume strong homophily for graph classification, seldom considering heterophily, which means connected nodes tend to have different class labels and dissimilar features. In real-world scenarios, graphs may have nodes that exhibit both homophily and heterophily. Failing to generalize to this setting makes many GNNs underperform in graph classification. In this paper, we address this limitation by identifying three effective designs and develop a novel GNN architecture called IHGNN (short for Incorporating Heterophily into Graph Neural Networks). These designs include the combination of integration and separation of the ego- and neighbor-embeddings of nodes, adaptive aggregation of node embeddings from different layers, and differentiation between different node embeddings for constructing the graph-level readout function. We empirically validate IHGNN on various graph datasets and demonstrate that it outperforms the state-of-the-art GNNs for graph classification.
Paper Structure (18 sections, 8 equations, 5 figures, 2 tables)

This paper contains 18 sections, 8 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: The histogram of the graph homophily ratios for the MUTAG and the COLLAB dataset.
  • Figure 2: The pipeline of our model IHGNN. Each IHGNN layer consists of the integration and separation of ego- and neighbor-embeddings. All layers are adaptively aggregated to form the node embeddings $\mathbf{H}$. The process of generating node embeddings $\mathbf{H}$ is analogous to applying the 1-WL algorithm for $K$ iterations. The graph-level readout function utilizes the last column of $\mathbf{H}$ as the final continuous labels of the nodes. Subsequently, We sort and align the nodes based on the final continuous labels. Dummy nodes are appended to ensure equal graph size.
  • Figure 3: Illustration of one iteration of the first order Weisfeiler-Lehman isomorphism test (1-WL) for graphs. (b) and (f) show that for each node in $\mathcal{G}_1$ and $\mathcal{G}_2$, 1-WL aggregates/concatenates its label and the labels of its neighboring nodes as a string. (c) and (g) show that 1-WL uses an injective hash function to project the label string to a new integer label. For (a) and (e), $\Sigma=\{1,2,3,4\}$. For (d) and (h), $\Sigma=\{5,6,7,8,9,10,11,12,13,14\}$.
  • Figure 4: IHGNN
  • Figure 5: Parameter sensitivity of IHGNN over 10 different random seeds on 9 benchmark datasets.