Heterogeneous Temporal Graph Neural Network

Yujie Fan, Mingxuan Ju, Chuxu Zhang, Yanfang Ye

TL;DR

This paper introduces HTGNN, a novel framework for learning representations on Heterogeneous Temporal Graphs (HTGs) that dynamically evolve in both structure and node/edge types. HTGNN uniquely integrates spatial and temporal dependencies through a hierarchical aggregation mechanism, outperforming existing methods on real-world datasets.

What Problem Does This Paper Address?

Many real-world datasets are represented as graphs, but these graphs are often not static or simple. They can be heterogeneous, meaning they have different types of nodes (e.g., authors, papers, institutions) and relationships (e.g., "writes," "cites"). Furthermore, these graphs can be temporal, meaning they change over time. Combining these aspects, we get Heterogeneous Temporal Graphs (HTGs), which are complex and challenging to model. Existing Graph Neural Networks (GNNs) typically focus on either static graphs or dynamic graphs with homogeneous structures. While some methods handle dynamic or heterogeneous graphs separately, few effectively capture the interplay between spatial heterogeneity and temporal evolution simultaneously. This gap makes it difficult to learn meaningful node representations for tasks like prediction or recommendation on these complex, evolving real-world networks.

Methods

The core contribution is the Heterogeneous Temporal Graph Neural Network (HTGNN). HTGNN operates in layers, with each layer employing a hierarchical aggregation mechanism to jointly model spatial and temporal dependencies. This mechanism consists of three key components:

  • Intra-relation Aggregation: Within a single graph slice (at a specific timestamp), this module aggregates information from neighbors connected by the same type of relation. It uses an attention mechanism to weigh the importance of different neighbors.
  • Inter-relation Aggregation: Still within a single graph slice, this module aggregates information from neighbors connected by different types of relations. It also employs an attention mechanism to learn the importance of each relation type for a given node.
  • Across-time Aggregation: This module captures temporal dependencies by aggregating information from the same node across different graph slices (timestamps). It leverages a Transformer-like self-attention mechanism to weigh the influence of temporal neighbors.

These three modules work together within each layer, allowing for iterative propagation of information across both spatial and temporal dimensions. This holistic approach aims to be agnostic to specific graph characteristics, unlike previous methods that might prioritize either spatial or temporal aspects.

Datasets

The authors construct and use two HTGs for evaluation:

  • OGBN-MAG: Derived from the original OGBN-MAG dataset, this HTG represents an academic network with dynamically evolving heterogeneous structures. It spans 10 years (2010-2019) and includes nodes like authors, papers, institutions, and fields of study, with relations such as "author-paper" and "paper-cites-paper." This dataset is used for link prediction.
  • COVID-19: This HTG is built from daily case reports and represents an epidemiological network with constantly changing node features. It comprises 304 graph slices over a period of about 10 months (May 2020 - Feb 2021) and includes state and county nodes with administrative and geospatial relations. This dataset is used for node regression.

Key Insights and Ideas

  • Joint Modeling is Crucial: The paper strongly advocates for simultaneously modeling spatial heterogeneity and temporal dynamics, rather than processing them sequentially. This joint approach leads to better performance across different types of HTGs.
  • Hierarchical Aggregation for Heterogeneity and Time: The proposed intra-relation, inter-relation, and across-time aggregation modules effectively capture the nuances of heterogeneous structures and temporal evolution, respectively.
  • Attention Mechanisms are Key: The use of attention at multiple levels (neighbor importance, relation importance, temporal importance) allows HTGNN to adaptively learn which information is most relevant for representation learning.
  • Graph-Agnostic Design: The holistic framework aims to be robust to different types of HTGs, whether they evolve primarily in structure or in node features, which is a significant advantage over specialized models.

Key Results

  • Superior Performance: HTGNN consistently outperforms state-of-the-art baselines, including sequence models, static graph models, and dynamic graph models, on both link prediction (OGBN-MAG) and node regression (COVID-19) tasks.
  • Link Prediction (OGBN-MAG): HTGNN achieves the highest AUC and AP scores, demonstrating its effectiveness in predicting new co-author links.
  • Node Regression (COVID-19): HTGNN achieves the lowest MAE and RMSE, indicating its accuracy in forecasting daily new cases.
  • Ablation Studies: The results from ablation studies confirm that each of the three aggregation modules (intra-relation, inter-relation, across-time) contributes significantly to HTGNN's overall performance. Removing any single component leads to a performance drop.

Limitations and Future Work

  • Model Depth Sensitivity: The paper notes that increasing model depth can lead to oversmoothing, causing performance to decrease after a certain point. This is a common challenge in GNNs.
  • Parameter Sensitivity: While HTGNN performs well, its performance is sensitive to hyperparameter choices like model depth, embedding dimension, and time window size, requiring careful tuning.
  • Future Work: The authors suggest that their framework can be extended to other downstream tasks and applied to more complex HTGs. The publicly available code and datasets encourage further research in this area.

Summary updated

BibTeX
@inproceedings{fan2022heterogeneous,
  author = {Yujie Fan and Mingxuan Ju and Chuxu Zhang and Yanfang Ye},
  title = {{Heterogeneous Temporal Graph Neural Network}},
  booktitle = {SDM},
  year = {2022},
  doi = {10.1137/1.9781611977172.74},
}

Loading related content...

Figure