NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Heterogeneous Graph Contrastive Multi-view Learning

Zehong Wang, Qi Li, Donghua Yu, Xiaolong Han, Xiao-Zhi Gao, Shigen Shen

TL;DR

HGCML (Heterogeneous Graph Contrastive Multi-view Learning) is a novel self-supervised framework designed to learn high-quality node representations in complex networks with multiple types of nodes and edges. By using metapaths as a semantic-preserving data augmentation and a "smart" positive sampling strategy that combines topology and attributes, it consistently outperforms state-of-the-art methods on node classification and clustering tasks.

What Problem Does This Paper Address?

Most real-world data—like academic citation networks or movie databases—are Heterogeneous Information Networks (HINs), meaning they contain different types of entities (authors, papers, venues) and relations (writes, cites, publishes). While Graph Neural Networks (GNNs) are great at analyzing these, they usually require massive amounts of labeled data, which is expensive to collect.

Graph Contrastive Learning (GCL) is a self-supervised alternative that learns by comparing different "views" of the same data. However, applying GCL to HINs faces three major hurdles:

  1. Semantic Preservation: Standard augmentations (like randomly dropping edges) can destroy the specific meaning of a heterogeneous link.
  2. View Design: It is difficult to capture the rich, multi-faceted semantics of an HIN in a simple contrastive objective.
  3. Sampling Bias: Most GCL methods assume any randomly chosen node is a "negative" example. In reality, many "negatives" might actually be semantically similar to the target node (false negatives), which confuses the model.

Methods

The authors propose HGCML, which introduces three key innovations:

  • Metapaths as Augmentation: Instead of random edge dropping, HGCML uses metapaths (predefined sequences of relations, like Author-Paper-Author) to generate multiple subgraphs. These subgraphs act as "multi-views" that preserve high-order semantic relationships without corrupting the underlying logic of the network.
  • Collaborative Contrastive Objective: The model doesn't just compare a node to itself. It performs intra-metapath contrast (learning invariant features within one view) and inter-metapath contrast (aligning features across different views, like comparing an author's "co-author" profile with their "conference" profile). It also uses a Node-Graph contrast to ensure local node features align with global graph summaries.
  • Positive Sampling Strategy: To solve the sampling bias problem, the authors don't just use the same node in a different view as a positive. They explicitly select "hard positives" by looking for nodes that are:
  • Topologically similar: Using Personalized PageRank (PPR) to find nodes with high structural connectivity.
  • Semantically similar: Using L2 distance to find nodes with similar raw attributes.

Datasets

The model was evaluated on five widely used HIN benchmark datasets:

  • ACM & DBLP: Academic citation networks (Nodes: Authors, Papers, Subjects/Conferences).
  • IMDB: Movie database (Nodes: Movies, Directors, Actors).
  • Aminer: Large-scale citation network.
  • FreeBase: A general-purpose knowledge graph.

The authors compared HGCML against a range of baselines, including shallow embeddings (DeepWalk), specialized HIN models (HAN, MAGNN), and recent contrastive methods (HeCo, STENCIL).

Key Insights and Ideas

  • Metapaths are Natural Augmentations: The paper argues that in heterogeneous graphs, the "view" provided by a metapath is a more robust way to augment data than random noise, as it captures specific semantic facets (e.g., "who you work with" vs. "where you publish").
  • Inter-Metapath Alignment is Crucial: By forcing the model to find consistency between different metapaths, it learns a more holistic representation that isn't biased toward just one type of relationship.
  • The Power of "Hard Positives": The results show that explicitly telling the model "these two different nodes are actually similar" (based on PPR and attributes) is far more effective than the standard GCL approach of treating all other nodes as negatives.
  • Complementary Similarity: Topology (PPR) and semantics (attributes) provide different signals. The ablation studies show that using both leads to the best performance, as they capture different reasons why two nodes might be related.

Key Results

  • State-of-the-Art Performance: HGCML (specifically the version with positive sampling, HGCML-P) outperformed all self-supervised baselines across all five datasets.
  • Beating Supervised Models: In several cases (like the IMDB and DBLP datasets), HGCML-P actually outperformed supervised GNNs like HAN and GAT, despite not using any labels during training.
  • Significant Gains on IMDB: On the IMDB dataset—which is often challenging due to its complex structure—HGCML achieved a Micro-F1 score of 61.02, a significant jump over the previous best self-supervised method, STENCIL (57.83).
  • Clearer Clusters: t-SNE visualizations (Figure 7) show that HGCML produces much tighter, more distinct clusters of node types compared to competing methods like HeCo or DMGI.

Limitations and Future Work

  • Computational Overhead: While the positive sampling is done in a pre-processing step, calculating Personalized PageRank (PPR) for every node pair can be computationally expensive for extremely large graphs (millions of nodes).
  • Metapath Selection: The model still relies on manually defined metapaths. Future work could involve automatically discovering relevant metapaths or using "metapath-free" approaches that still preserve HIN semantics.
  • Hyperparameter Tuning: The performance is sensitive to the number of positive samples ($k$) and the temperature ($\tau$), requiring careful grid searching for new datasets.

Summary updated

BibTeX
@inproceedings{wang2023heterogeneous,
  author = {Zehong Wang and Qi Li and Donghua Yu and Xiaolong Han and Xiao-Zhi Gao and Shigen Shen},
  title = {{Heterogeneous Graph Contrastive Multi-view Learning}},
  booktitle = {SDM},
  year = {2023},
  doi = {10.1137/1.9781611977653.ch16},
}
Figure