Simple and Efficient Heterogeneous Graph Neural Network

Xiaocheng Yang, Mingyu Yan, Shirui Pan, Xiaochun Ye, Dongrui Fan · DOI

Abstract

Heterogeneous Graph Neural Networks (HGNNs) have traditionally relied on complex architectures involving neighbor-level attention and multi-layer stacking to capture rich semantic information. However, these mechanisms often introduce significant computational overhead. This paper introduces SeHGNN (Simple and Efficient Heterogeneous Graph Neural Network), a streamlined model that challenges these conventions. By decoupling neighbor aggregation into a parameter-free pre-processing step and utilizing a single-layer Transformer-based fusion of long metapaths, SeHGNN achieves state-of-the-art performance across multiple benchmarks while being up to 500x faster than existing complex models.

Introduction

Heterogeneous graphs, characterized by diverse node and edge types, are ubiquitous in real-world applications such as citation networks and recommendation systems. To model these graphs, researchers have developed HGNNs that typically incorporate two core features from homogeneous GNNs: neighbor-level attention and deep multi-layer structures. While these features aim to capture fine-grained relationships and long-range dependencies, they often lead to a "speed bottleneck." For instance, in models like HAN or HGB, neighbor aggregation with attention can account for over 85% of total training time. This research investigates whether such complexity is truly necessary for heterogeneous data or if it represents redundant architectural "baggage."

Methodology

SeHGNN is built on the insight that while semantic attention (weighting different types of relationships) is crucial, neighbor-level attention (weighting individual nodes within a relationship) is often redundant. Furthermore, the authors argue that single-layer models using long metapaths can outperform deep models that stack multiple layers of short metapaths.

The SeHGNN architecture consists of three primary stages:

  1. Simplified Neighbor Aggregation (Pre-processing): Instead of dynamic attention, SeHGNN uses a simple mean aggregator. Since this step is linear and parameter-free, it is computed once during pre-processing, drastically reducing the per-epoch training load.
  2. Multi-layer Feature Projection: The pre-computed semantic vectors are projected into a shared hidden space using a Multi-Layer Perceptron (MLP).
  3. Transformer-based Semantic Fusion: A Transformer module learns the relative importance of various metapaths (e.g., Author-Paper-Author vs. Author-Paper-Subject) for each node, allowing for effective semantic integration.
The SeHGNN architecture overview, highlighting the pre-processing step and the semantic fusion module.

Additionally, the model incorporates Label Propagation, treating training labels as auxiliary features to enhance performance, particularly in large-scale settings.

Experiments and Results

The model was evaluated on five benchmarks, including the medium-sized HGB datasets (DBLP, ACM, IMDB, Freebase) and the large-scale ogbn-mag dataset from the OGB Challenge. SeHGNN consistently matched or exceeded the accuracy of state-of-the-art models like HGT, HAN, and MAGNN across all datasets. Notably, on the ogbn-mag dataset, SeHGNN achieved top-tier performance even without expensive pre-trained embeddings.

The most striking advantage of SeHGNN is its efficiency. By moving the heavy lifting of neighbor aggregation to a one-time pre-processing phase, training complexity becomes independent of the number of edges. On the DBLP dataset, SeHGNN demonstrated massive speedups: it was 25x faster than HAN, 38x faster than HGT, and approximately 500x faster than MAGNN.

Comparison of micro-f1 score versus training time per epoch across various HGNN models on the DBLP dataset.

Discussion and Conclusion

The success of SeHGNN highlights several key insights for the GNN community. First, neighbor attention within a single relation type often results in similar weights, making simple averaging a viable and efficient alternative. Second, deep stacking in HGNNs can lead to "semantic mixing," where distinct relationship meanings become blurred; using a single layer with longer metapaths preserves these semantic distinctions more effectively.

While SeHGNN relies on predefined metapaths, which may require domain expertise, its scalability and performance make it a powerful tool for large-scale industrial graphs. Future work may focus on automated metapath discovery to further reduce the need for manual selection. In conclusion, SeHGNN demonstrates that for heterogeneous graphs, a "simple is better" approach can lead to both superior accuracy and unprecedented efficiency.

Summary updated

BibTeX
@inproceedings{yang2023simple,
  author = {Xiaocheng Yang and Mingyu Yan and Shirui Pan and Xiaochun Ye and Dongrui Fan},
  title = {{Simple and Efficient Heterogeneous Graph Neural Network}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i9.26283},
}
Figure