Heterogeneous Graph Neural Network on Semantic Tree

Mingyu Guan, Jack W. Stokes, Qinlong Luo, Fuchen Liu, Purvanshi Mehta, Elnaz Nouri, Taesoo Kim

Abstract

Real-world data often manifests as heterogeneous graphs with diverse entity types and complex interactions. Traditional Heterogeneous Graph Neural Networks (HGNNs) frequently struggle with capturing the hierarchical nature of metapaths and scaling to massive datasets. This paper introduces HETTREE, a novel HGNN that organizes complex graph relationships into a "semantic tree" to capture the natural hierarchy of metapaths. By combining this hierarchical structure with a unique subtree attention mechanism and efficient offline pre-processing, HETTREE achieves state-of-the-art accuracy while remaining significantly faster and more memory-efficient than existing models.

Introduction

Most real-world networks, such as email systems or citation indices, are heterogeneous, consisting of various node and edge types. Researchers typically navigate these using metapaths (e.g., Author → Paper → Venue). However, current HGNN models face two primary hurdles. First, they often ignore the natural hierarchy of metapaths, treating them as a flat list rather than recognizing that many paths share common prefixes (e.g., Sender → Message is a parent of Sender → Message → IP). Second, traditional GNNs rely on expensive online message passing, which limits scalability for graphs containing millions of nodes.

Methodology

HETTREE addresses these challenges through a decoupled three-stage pipeline that leverages a semantic tree structure for efficient learning.

Semantic Tree and Aggregation

The model organizes all metapaths up to a specified length into a tree where the root is the target node type and each branch represents a relationship extension. This structure captures the "prefix" hierarchy inherent in the data. To ensure efficiency, HETTREE performs feature and label aggregation as an offline pre-processing step, transforming the graph learning task into a faster operation on tabular-style data.

Figure 4: The HETTREE framework illustrating (a) feature aggregation, (b) label aggregation, and (c) the resulting semantic tree structure used for hierarchical modeling.

Subtree Attention and Label Matching

Unlike previous models that use simple parent-child weighting, HETTREE employs a subtree attention mechanism. This approach encodes the relationship between a parent node and its entire set of children, allowing the network to distinguish which "branches" of logic are most relevant for a specific task. Furthermore, the model utilizes feature-label matching, where labels from the training set are propagated and matched with features aggregated along the exact same metapaths, providing a consistent and accurate training signal.

Experimental Evaluation

The authors evaluated HETTREE across several benchmarks, including the HGB medium-scale datasets (DBLP, IMDB, ACM, Freebase) and the large-scale Ogbn-Mag citation graph (2M nodes, 21M edges). Additionally, the model was tested on a massive Commercial Email Graph (7.8M nodes, 34.9M edges) for detecting compromised accounts.

Key Results

  • Superior Accuracy: HETTREE outperformed all baselines, including HAN, HGT, and SeHGNN, across all five open benchmarks. On Ogbn-Mag, it achieved a test accuracy of 55.54%, a significant improvement over the previous state-of-the-art.
  • Real-World Utility: In the commercial email detection task, HETTREE demonstrated a superior ROC curve compared to SeHGNN, proving more robust in noisy, imbalanced environments.
  • Efficiency: HETTREE maintained the lowest computational cost and memory footprint among top-tier models, making it highly suitable for production environments.
Figure 6: ROC curve comparison on the commercial email dataset, demonstrating HETTREE's superior performance in distinguishing legitimate users from compromised accounts.

Conclusion and Future Work

HETTREE demonstrates that modeling the hierarchical relationship between metapaths is as critical as the metapaths themselves. By decoupling graph traversal from the learning process, the model achieves high performance with remarkable efficiency. Future research may explore more complex aggregation functions or adapt the semantic tree structure for dynamic graphs where relationships evolve over time.

Summary updated

BibTeX
@inproceedings{guan2025heterogeneous,
  author = {Mingyu Guan and Jack W. Stokes and Qinlong Luo and Fuchen Liu and Purvanshi Mehta and Elnaz Nouri and Taesoo Kim},
  title = {{Heterogeneous Graph Neural Network on Semantic Tree}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i16.33860},
}
Figure