Dual Space Graph Contrastive Learning

Haoran Yang, Hongxu Chen, Shirui Pan, Lin Li, Philip S. Yu, Guandong Xu · DOI

Abstract

Dual Space Graph Contrastive Learning (DSGC) is a novel framework designed to enhance graph representation learning by bridging Euclidean and Hyperbolic geometries. By contrasting graph views across these distinct mathematical spaces, DSGC captures both the global relational "skeleton" and the intrinsic hierarchical structures prevalent in real-world data. Experimental results demonstrate that DSGC consistently outperforms state-of-the-art baselines in semi-supervised graph classification, particularly in low-dimensional settings and scenarios with limited labeled data.

Introduction

Graph Contrastive Learning (GCL) has emerged as a dominant paradigm for unsupervised and semi-supervised representation learning. The standard approach involves generating multiple "views" of a graph through stochastic perturbations—such as edge dropping or feature masking—and training a model to maximize agreement between views of the same object. However, current GCL methods face two significant challenges. First, random augmentations often introduce noise that can obscure critical structural information. Second, most methods rely exclusively on Euclidean space, which is ill-suited for representing the hierarchical, power-law distributions commonly found in social networks and biological systems. Hyperbolic space, characterized by its exponential expansion, offers a more natural geometry for embedding such tree-like structures with minimal distortion.

Methodology

The DSGC Framework

The proposed DSGC framework addresses these limitations by introducing a dual-space pipeline that leverages the complementary strengths of Euclidean and Hyperbolic geometries. Unlike traditional methods that use uniform perturbations, DSGC employs specialized samplers tailored to each space. A DiffusionSampler is used to capture the global skeleton for the Euclidean view, while a CommunityStructureExpansionSampler extracts topological and hierarchical information for the Hyperbolic view.

Figure 1: The DSGC architecture illustrating the dual-space pipeline, including space-specific sampling, heterogeneous encoders, and cross-space contrastive loss.

Cross-Space Contrasting and Encoders

One of the core innovations of DSGC is the use of heterogeneous encoders. The framework allows for different Graph Neural Network (GNN) architectures (e.g., GCN, GAT, or GIN) to be used for each space, enabling the model to specialize in the unique features of each geometry. To compare embeddings across spaces, DSGC utilizes exponential mapping to project Euclidean embeddings onto the Hyperbolic manifold. The contrastive objective (InfoNCE) is then calculated using hyperbolic distance metrics, aiming to maximize similarity between corresponding views while pushing apart views of different graphs.

Experimental Evaluation

Datasets and Baselines

The authors evaluated DSGC on three diverse benchmarks: MUTAG (biochemistry), REDDIT-BINARY (social networks), and COLLAB (scientific collaboration). Performance was compared against leading baselines such as GraphCL and GCC across various label ratios (10%, 30%, and 50%).

Performance and Stability

DSGC consistently achieved superior accuracy across all datasets. For instance, on the COLLAB dataset with a 50% label ratio, DSGC reached 52.00% accuracy, a significant improvement over GraphCL's 46.76%. Beyond raw accuracy, DSGC exhibited remarkable stability, showing lower standard deviations in performance compared to purely Euclidean models.

Figure 3: Classification accuracy across different hidden dimensions (8, 16, 32, 64). DSGC maintains high performance even at very low dimensions where baseline models often degrade.

Efficiency in Low Dimensions

A key finding of the study is the efficiency of hyperbolic embeddings. As shown in the experimental results, DSGC maintains stable and superior performance even with very small hidden dimensions (e.g., 8 or 16). This suggests that the hierarchical priors provided by the hyperbolic view allow the model to capture essential structural information more compactly than traditional Euclidean-only approaches.

Conclusion

Dual Space Graph Contrastive Learning represents a significant step forward in geometric deep learning. By integrating Hyperbolic and Euclidean views, the framework provides a more holistic representation of complex graph structures. While the current implementation requires empirical testing to select the optimal pair of GNN encoders, the synergy between different architectures and geometries offers a robust solution for semi-supervised graph classification. Future work may focus on automating encoder selection and extending the dual-space approach to node-level tasks such as link prediction.

Summary updated

BibTeX
@inproceedings{yang2022dual,
  author = {Haoran Yang and Hongxu Chen and Shirui Pan and Lin Li and Philip S. Yu and Guandong Xu},
  title = {{Dual Space Graph Contrastive Learning}},
  booktitle = {The Web Conference},
  year = {2022},
  doi = {10.1145/3485447.3512211},
}
Figure