HAGNN: Hybrid Aggregation for Heterogeneous Graph Neural Networks

Guanghui Zhu, Zhennan Zhu, Hongyang Chen, Chunfeng Yuan, Yihua Huang

TL;DR

This paper introduces HAGNN, a novel hybrid aggregation framework for heterogeneous graph neural networks (GNNs). HAGNN effectively combines meta-path-based (intra-type) and direct neighbor-based (inter-type) information, addressing redundancy issues in existing meta-path approaches and outperforming them in various downstream tasks.

What Problem Does This Paper Address?

Heterogeneous graphs, which contain multiple types of nodes and edges, are prevalent in real-world data (e.g., knowledge graphs, social networks). Heterogeneous Graph Neural Networks (GNNs) aim to learn representations from these complex structures. A key component in many existing heterogeneous GNNs is the "meta-path," a sequence of edge types that captures specific semantic relationships between nodes. However, recent research has questioned the necessity of meta-paths, showing that simpler models can achieve comparable results. This raises a fundamental question: how can we best leverage the rich semantic information in heterogeneous graphs, considering both meta-path-based relationships and direct connections? Existing methods often struggle with information redundancy from multiple meta-paths or fail to effectively integrate direct neighbor information.

Methods

HAGNN proposes a two-phase hybrid aggregation mechanism:

  1. Meta-path-based Intra-type Aggregation:
    • Fused Meta-path Graph: To combat redundancy from multiple meta-paths, HAGNN constructs a "fused meta-path graph" for each node type. This graph consolidates neighbors from various meta-paths into a single structure, reducing computational overhead and duplicate information.
  2. Structural Semantic Aware Aggregation: This phase incorporates a novel attention mechanism that leverages "structural semantic weights." These weights are derived from the number of meta-path instances connecting nodes, providing a richer signal for attention learning than just raw connectivity.
  3. Meta-path-free Inter-type Aggregation:
    • This phase directly aggregates information from immediate neighbors in the original heterogeneous graph, capturing attribute information across different node types. It uses a standard multi-head attention mechanism.

Finally, the embeddings from both phases are combined (concatenated) to form the final node representations.

Datasets

The paper evaluates HAGNN on several standard heterogeneous graph datasets:

  • Node Classification: DBLP, IMDB, Freebase, LastFM, PubMed.
  • Link Prediction: PubMed.
  • New Benchmarks: RCDD (Risk Commodity Detection Dataset) and TRD (Takeout Recommendation Dataset) are also used to demonstrate HAGNN's effectiveness on large-scale, real-world domains.

Key Insights and Ideas

  • Meta-paths are still valuable, but redundancy is a problem: The paper confirms that meta-paths offer crucial semantic information but highlights how naive aggregation of multiple meta-path-based graphs leads to significant redundancy and inefficiency.
  • A unified view of meta-path neighbors is better: The "fused meta-path graph" is a clever way to consolidate information from different meta-paths, reducing redundancy and improving efficiency.
  • Structural semantics matter for attention: Simply using connectivity isn't enough. Incorporating the "number of path instances" as a structural semantic weight helps the attention mechanism learn more effectively, guiding it to focus on more meaningful connections.
  • Hybrid aggregation is key: Neither meta-path-based nor meta-path-free approaches alone are sufficient. HAGNN's strength lies in its ability to synergistically combine the high-order, type-specific information from intra-type aggregation with the direct, cross-type information from inter-type aggregation.

Key Results

  • Superior Performance: HAGNN consistently outperforms existing state-of-the-art heterogeneous GNN models (both meta-path-based and meta-path-free) across node classification, node clustering, and link prediction tasks on multiple datasets. For instance, on DBLP node classification, HAGNN achieved a Macro-F1 score of 95.06±0.31, outperforming other models.
  • Efficiency Gains: HAGNN demonstrates improved efficiency in terms of parameter size, FLOPs, memory overhead, and runtime per training epoch compared to models like SimpleHGN and HAN-HAGNN.
  • Robustness: The model shows robustness to hyperparameter choices, particularly the structural semantic weight parameter $\beta$.
  • Effectiveness of Components: Ablation studies confirm that both the intra-type and inter-type aggregation phases, as well as the structural semantic aware aggregation, are crucial for HAGNN's performance.

Limitations and Future Work

  • Manual Meta-path Selection: The paper acknowledges that manually selecting meta-paths can still require expert experience, which is a limitation.
  • Automated Meta-path Search: The authors propose future work on designing automated meta-path search methods to address this manual selection challenge.
  • Robustness to Noise: Future research will also focus on developing robust heterogeneous GNNs for better generalization on noisy graph datasets.

Summary updated

Abstract

Heterogeneous graph neural networks (GNNs) have been successful in handling heterogeneous graphs. In existing heterogeneous GNNs, meta-path plays an essential role. However, recent work pointed out that a simple homogeneous graph model without a meta-path can also achieve comparable results, which calls into question the necessity of a meta-path. In this article, we first present the intrinsic difference between meta-path-based and meta-path-free models, i.e., how to select neighbors for node aggregation. Then, we propose a novel framework to utilize the rich type of semantic information in heterogeneous graphs comprehensively, namely, hybrid aggregation for heterogeneous GNNs (HAGNNs). The core of HAGNN is to leverage the meta-path neighbors and the directly connected neighbors simultaneously for node aggregations. HAGNN divides the overall aggregation process into two phases: meta-path-based intratype aggregation and meta-path-free intertype aggregation. During the intratype aggregation phase, we propose a new data structure called a fused meta-path graph and perform structural semantic aware aggregation on it. Finally, we combine the embeddings generated by each phase. Compared with existing heterogeneous GNN models, HAGNN can take full advantage of the heterogeneity in heterogeneous graphs. Extensive experimental results on node classification, node clustering, and link prediction tasks show that HAGNN outperforms the existing modes, demonstrating the effectiveness and efficiency of HAGNN.
BibTeX
@article{zhu2025hagnn,
  author = {Guanghui Zhu and Zhennan Zhu and Hongyang Chen and Chunfeng Yuan and Yihua Huang},
  title = {{HAGNN: Hybrid Aggregation for Heterogeneous Graph Neural Networks}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2025},
  doi = {10.1109/tnnls.2024.3519427},
}
Figure