Homophily-oriented Heterogeneous Graph Rewiring

Jiayan Guo, Lun Du, Wendong Bi, Qiang Fu, Xiaojun Ma, Xu Chen, Shi Han, Dongmei Zhang, Yan Zhang · DOI

Abstract

With the rapid development of the World Wide Web, heterogeneous graphs (HG) have seen explosive growth. While heterogeneous graph neural networks (HGNNs) show great potential, they typically rely on the assumption of homophily—where connected nodes share similar labels. In many real-world scenarios, this assumption fails, leading to degraded performance. We propose HDHGR, a homophily-oriented deep heterogeneous graph rewiring approach that modifies HG structures to enhance HGNN performance. By introducing meta-path-induced metrics and a multi-objective similarity learner, HDHGR significantly improves generalization, yielding up to a 10% relative gain on non-homophilous datasets.

Introduction

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data. In many applications, these graphs are heterogeneous, containing multiple types of nodes and relations. A core assumption in most HGNN designs is homophily: the principle that "birds of a feather flock together." For instance, in academic networks, researchers in the same field are likely to cite one another.

However, many real-world networks exhibit heterophily, where connected nodes often have different labels. In a movie recommendation network, an actor might be linked to various films across disparate genres. When standard HGNNs aggregate information across these heterophilous links, they introduce noise into node embeddings, making classification difficult. While heterophily has been studied in homogeneous graphs, extending these solutions to heterogeneous graphs is complex due to the diverse semantics of meta-paths.

The HDHGR Framework

To address these challenges, we introduce HDHGR (Homophily-oriented Deep Heterogeneous Graph Rewiring). HDHGR functions as a structural preprocessing framework that "cleans" the graph before training the downstream HGNN.

1. Measuring Homophily via Meta-paths

The framework begins by defining a meta-path-induced metric to quantify the homophily of a heterogeneous graph. The authors observed that HGNN performance is often bottlenecked by the homophily ratio of the most relevant meta-paths. If even the "best" meta-path exhibits low homophily, standard models struggle to generalize.

2. Meta-path Similarity Learner (MSL)

The core of the rewiring process is the MSL, which determines the ideal connectivity between nodes. It evaluates node similarity based on two primary factors:

  • Neighborhood Attribute Distribution (NAD): Comparing the feature distributions of a node's neighbors.
  • Neighborhood Label Distribution (NLD): Analyzing the label patterns within a node's local neighborhood.

Nodes with high similarity in both NAD and NLD are deemed likely candidates for connection, even if they are not currently linked.

3. Multi-objective Optimization

Because heterogeneous graphs involve multiple meta-paths with different semantic meanings, optimizing for one might degrade another. HDHGR employs a Pareto-based optimizer using the Frank-Wolfe algorithm. This ensures a balanced improvement across various semantic relationships, preventing any single meta-path from dominating the structural update.

4. Graph Rewiring

Finally, the framework prunes "noisy" edges (those with low learned similarity) and adds "helpful" edges (those with high similarity). This results in a rewired graph with a significantly higher homophily ratio, providing a cleaner signal for the HGNN.

Theoretical Insights

The paper provides a theoretical foundation for rewiring, proving that as the homophily ratio of a graph approaches 1, the upper bound of an HGNN’s generalization ability reaches its optimum. This confirms that structural "cleaning" directly translates to better model intelligence and robustness.

Experimental Evaluation

The effectiveness of HDHGR was tested across six datasets, ranging from highly heterophilous (FB-American, Actor, Liar, IMDB) to standard homophilous networks (ACM, DBLP).

Performance Gains

The results demonstrate that HDHGR is particularly potent on heterophilous datasets:

  • Significant Improvement: The method achieved up to a 10% relative gain in accuracy on non-homophilous graphs.
  • Case Study (Actor Dataset): On the Actor dataset, a standard GCN’s Macro-F1 score improved from approximately 55% to over 67% after the graph was rewired.
  • Structural Transformation: In one instance, the homophily ratio of a primary meta-path in the Actor dataset increased from 34.18% to a staggering 94.67% post-rewiring.
  • Long-Tail Performance: HDHGR is especially effective at helping models classify rare or "long-tailed" classes, as evidenced by larger gains in Macro-F1 compared to Micro-F1.

Universal Compatibility

A key advantage of HDHGR is its model-agnostic nature. Since it modifies the underlying graph structure, it can be seamlessly integrated with various HGNN architectures, including HAN, HGT, and RGCN, consistently boosting their performance.

Conclusion

HDHGR represents a significant step forward in making Heterogeneous Graph Neural Networks robust to heterophily. By shifting the focus from model architecture to data structure, the framework allows existing HGNNs to excel in complex, noisy environments. Future work will look toward scaling these methods for dynamic graphs and expanding the approach to tasks beyond node classification, such as link prediction.

Summary updated

BibTeX
@inproceedings{guo2023homophily,
  author = {Jiayan Guo and Lun Du and Wendong Bi and Qiang Fu and Xiaojun Ma and Xu Chen and Shi Han and Dongmei Zhang and Yan Zhang},
  title = {{Homophily-oriented Heterogeneous Graph Rewiring}},
  booktitle = {The Web Conference},
  year = {2023},
  doi = {10.1145/3543507.3583454},
}
Figure