Geometry Contrastive Learning on Heterogeneous Graphs

Shichao Zhu, Chuan Zhou, Anfeng Cheng, Shirui Pan, Shuaiqiang Wang, Dawei Yin, Bin WangarXiv 2022 · DOI

Introduction

Heterogeneous graphs, which contain multiple types of nodes and edges (e.g., academic networks with authors, papers, and venues), are ubiquitous in real-world applications. However, learning effective representations for these graphs faces two significant challenges: the high cost of manual labeling and "geometric myopia." Most existing methods embed graphs solely into Euclidean space, which is well-suited for grid-like structures but fails to capture the hierarchical or scale-free properties common in complex networks.

This paper introduces Geometry Contrastive Learning (GCL), a self-supervised framework that leverages both Euclidean and hyperbolic geometries. By treating geometry as a contrastive view, GCL captures a more comprehensive structural and semantic profile of heterogeneous graphs without requiring manual labels.

Methodology

The GCL framework is built on the premise that different geometric spaces provide complementary inductive biases. Euclidean space excels at representing community clusters, while hyperbolic space (specifically the Poincaré ball) is better suited for hierarchical structures and hubs.

The GCL architecture, featuring dual geometric encoders and multi-level contrastive learning.

Dual Geometric Encoders

The architecture consists of two parallel branches:

  1. Euclidean Branch: Uses a Graph Convolutional Network (GCN) to generate node and subgraph embeddings in Euclidean space ($\mathbb{R}^d$).
  2. Hyperbolic Branch: Uses a Hyperbolic Graph Convolutional Network (HGCN) to produce embeddings in the Poincaré ball ($\mathbb{D}^d$).

Multi-Level Contrastive Learning

GCL maximizes Mutual Information (MI) across these two views at multiple granularities:

  • Local-Local Contrast: Ensures that connected node pairs and their specific relations remain consistent across geometric views. This "relation-awareness" is critical for heterogeneous graphs.
  • Local-Global Contrast: Contrasts local node representations from one geometry with global graph (or meta-path-based subgraph) representations from the other. This allows the model to capture high-level semantics, such as the difference between "papers by the same author" and "papers in the same field."

Data Augmentation

To ensure robustness, GCL employs attribute masking and edge permutation. These augmentations force the encoders to learn invariant features that persist despite perturbations.

Experiments and Results

The authors evaluated GCL on four benchmark datasets: DBLP, IMDB, ACM, and Amazon. These datasets vary in their degree of hyperbolicity ($\delta$), justifying the need for a multi-geometry approach.

Performance Highlights

  • State-of-the-Art Results: GCL consistently outperformed unsupervised baselines like DMGI, HDGI, and HeCo. On the Amazon dataset, GCL achieved a 76.50% Macro-F1 score, significantly higher than DMGI's 74.69%.
  • Competitive with Supervised Learning: Remarkably, GCL often outperformed supervised models (e.g., HAN, R-GCN) despite having no access to labels during training.
  • Clustering Quality: Visualizations demonstrate that GCL produces more distinct and tighter clusters than competing methods, particularly on complex datasets like Amazon where other models show significant overlap between categories.

Conclusion

GCL demonstrates that geometry itself can serve as a powerful inductive bias for self-supervised learning. By bridging the gap between Euclidean and hyperbolic representations, the framework captures the diverse structural properties of heterogeneous graphs. While the dual-encoder approach introduces some computational overhead and requires hyperparameter tuning, its ability to outperform supervised models highlights the potential of multi-geometry contrastive learning. Future work may explore automated curvature estimation or additional non-Euclidean geometries like spherical space for cyclical data.

Summary updated

BibTeX
@misc{zhu2022geometry,
  author = {Shichao Zhu and Chuan Zhou and Anfeng Cheng and Shirui Pan and Shuaiqiang Wang and Dawei Yin and Bin Wang},
  title = {{Geometry Contrastive Learning on Heterogeneous Graphs}},
  year = {2022},
  eprint = {2206.12547},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.12547},
}
Figure