Generative-Contrastive Heterogeneous Graph Neural Network

Yu Wang, Lei Sang, Yi Zhang, Wu, Xindong

TL;DR

This paper introduces GC-HGNN, a novel framework that combines generative and contrastive learning to improve representation learning on heterogeneous graphs. By using a masked autoencoder for data augmentation and a hierarchical contrastive learning strategy with advanced sampling, GC-HGNN effectively captures both local and global information, outperforming existing methods on node classification and link prediction tasks.

What Problem Does This Paper Address?

Heterogeneous Graphs (HGs) are powerful for modeling complex real-world relationships with diverse node and edge types. While Heterogeneous Graph Neural Networks (HGNNs) have shown promise, existing contrastive learning (CL)-based HGNNs face challenges: 1) Data augmentation is limited by the need to preserve graph integrity. 2) Contrastive discriminators suffer from sampling bias and lack local heterogeneous information. 3) Capturing both local (one-hop neighbors) and global (higher-order structures) information remains difficult. This paper aims to address these limitations by proposing a generative-contrastive approach that enhances representation learning on HGs.

Methods

The proposed GC-HGNN framework integrates generative and contrastive learning in a novel way:

  • Generative Masked Autoencoder (MAE) for View Augmentation: Instead of altering the original graph structure, GC-HGNN uses a masked autoencoder to reconstruct node embeddings. This approach enhances contrastive views without compromising graph integrity. The masking strategy is designed to provide balanced supervised signals to each node.
  • Hierarchical Contrastive Learning (HCL): This module captures both one-hop neighbors (network schema view) and higher-order neighbors (meta-path view). It employs:
  • Intra-contrast: Contrasting different meta-path views to capture local and global information.
  • Inter-contrast: Contrasting between the network schema view and meta-path views to capture diverse semantic relationships.
  • Advanced Sampling Strategies: To mitigate sampling bias and improve the contrastive discriminator, GC-HGNN introduces:
  • Location-aware Pos: Uses meta-path2vec embeddings to identify similar nodes based on their position within the graph.
  • Semantic-aware Pos: Identifies positive samples by considering multiple meta-path connections between nodes, indicating semantic similarity.
  • Hard Negative Sampling: The inter-contrast sampling strategy is designed to generate more effective hard negative samples.

Datasets

The paper evaluates GC-HGNN on six real-world datasets:

  • Node Classification: ACM, DBLP, Aminer, Freebase.
  • Link Prediction: Last.fm, Yelp, Douban Movie, Douban Book.

These datasets are standard benchmarks for evaluating graph representation learning models.

Key Insights and Ideas

  • Generative Augmentation Preserves Integrity: Using a masked autoencoder to reconstruct embeddings, rather than directly augmenting the graph structure, is a more robust way to create contrastive views for HGs.
  • Hierarchy is Key: Combining network schema (local) and meta-path (global) views through hierarchical contrastive learning is crucial for capturing rich semantic information.
  • Smarter Sampling Matters: Moving beyond random sampling to location-aware and semantic-aware strategies significantly improves the quality of positive and negative samples in contrastive learning for HGs.
  • Inter-contrast Dominance: The study suggests that aligning high-order and first-order semantic representations (inter-contrast) is particularly effective for improving prediction accuracy.

Key Results

  • Node Classification: GC-HGNN outperforms seventeen baseline methods, including state-of-the-art models like HGMAE and HeCo, achieving superior Macro-F1 and Micro-F1 scores on all tested datasets. For example, on ACM, GC-HGNN achieved 90.54±0.28 (Macro-F1) and 90.36±0.31 (Micro-F1).
  • Link Prediction: GC-HGNN also demonstrates significant improvements over baselines, achieving over 3% improvement on average across four datasets. For instance, on Douban-Book, it achieved 0.1890 (Recall@20) and 0.1717 (NDCG@20).
  • Efficiency: GC-HGNN shows faster training time per epoch compared to baselines like HeCo and HGMAE, indicating lower complexity and better scalability.
  • Ablation Studies: Removing key components like HCL, SAM, or MAE led to performance degradation, validating the effectiveness of each module.

Limitations and Future Work

  • Parameter Sensitivity: While the paper explores parameter sensitivity, further research could delve deeper into optimal parameter settings for diverse HG structures.
  • Generative Coefficient: The study found that a smaller generative coefficient (LGen) generally leads to better performance, suggesting that generative learning plays an auxiliary role in the GC-HGNN framework. This could be a direction for future exploration.
  • Computational Cost: While efficient, complex heterogeneous graphs can still pose computational challenges. Future work might focus on further optimizing the model for extremely large-scale graphs.
  • Generalizability of MAE: The paper suggests that the MAE effectively mitigates noise, but exploring different types of GNN encoders within the MAE could yield further improvements.

Summary updated

BibTeX
@article{wang2024generative,
  author = {Yu Wang and Lei Sang and Yi Zhang and Yiwen Zhang and Wu, Xindong},
  title = {{Generative-Contrastive Heterogeneous Graph Neural Network}},
  journal = {IEEE Trans. big Data},
  year = {2024},
}
Figure