GraphCoCo: Graph Complementary Contrastive Learning

Jiawei Sun, Junchi Yan, Chentao Wu, Yue Ding, Ruoxin Chen, Xiang Yu, Xinyu Lu, Jie LiarXiv 2022

Abstract

Graph Contrastive Learning (GCL) has shown promising performance in graph representation learning (GRL) without the supervision of manual annotations. GCL can generate graph-level embeddings by maximizing the Mutual Information (MI) between different augmented views of the same graph (positive pairs). However, the GCL is limited by dimensional collapse, i.e., embedding vectors only occupy a low-dimensional subspace. In this paper, we show that the smoothing effect of the graph pooling and the implicit regularization of the graph convolution are two causes of the dimensional collapse in GCL. To mitigate the above issue, we propose a non-maximum removal graph contrastive learning approach (nmrGCL), which removes "prominent" dimensions (i.e., contribute most in similarity measurement) for positive pair in the pre-text task. Comprehensive experiments on various benchmark datasets are conducted to demonstrate the effectiveness of nmrGCL, and the results show that our model outperforms the state-of-the-art methods.

Introduction

Graph Contrastive Learning (GCL) is a powerful self-supervised technique where a model learns to represent graphs by ensuring that two different "views" of the same graph—such as a graph with dropped nodes versus one with masked edges—share similar embeddings. Despite its success, GCL often suffers from dimensional collapse. Instead of utilizing the full capacity of the embedding space, the model tends to concentrate information into a few "prominent" dimensions, leaving the rest of the vector space underutilized.

Illustration of dimensional collapse in GCL and the general contrastive learning framework.

The authors identify two primary drivers of this phenomenon:

  1. Smoothing Effect of Pooling: Graph pooling operations (e.g., global average pooling) naturally increase the similarity between embeddings of different views, providing a "shortcut" for the model to minimize contrastive loss without learning complex features.
  2. Implicit Regularization of Convolutions: Multi-layer graph convolutions often produce low-rank weight matrices, which mathematically restricts the dimensionality of the resulting output space.

Methodology: Non-Maximum Removal (nmrGCL)

To address dimensional collapse, the authors propose nmrGCL (Non-Maximum Removal Graph Contrastive Learning). Inspired by Non-Maximum Suppression (NMS) in computer vision, nmrGCL forces the model to learn diverse features by identifying and "erasing" the most prominent dimensions during training.

The process involves an Erasing Operation:

  • Identification: The model identifies "prominent dimensions" in the first embedding ($z_1$)—those with values exceeding a threshold $\delta$.
  • Erasure: A binary mask is created to set these specific dimensions to zero in the second embedding ($z_2$).
  • Contrastive Objective: The model is then trained to maximize similarity between the original $z_1$ and the erased version of $z_2$.

By hiding the most obvious similarities, nmrGCL acts as an adversarial mechanism, compelling the network to discover and utilize "inconspicuous" dimensions. This ensures that information is spread more uniformly across the entire embedding space.

Experimental Evaluation

The effectiveness of nmrGCL was evaluated across diverse benchmarks, including bioinformatics (PTC-MR, PROTEINS, NCI1, DD), social networks (COLLAB, IMDB, REDDIT), and node classification tasks. Additionally, transfer learning capabilities were tested by pre-training on the ZINC 2M dataset.

Key Results

  • Performance Gains: nmrGCL outperformed state-of-the-art (SOTA) methods like GraphCL, CuCo, and AD-GCL on 8 out of 9 graph classification datasets. Notable improvements were seen in sparse datasets like IMDB-B (+2.69% over GraphCL) and DD (+1.99%).
  • Transferability: In molecular property prediction tasks, nmrGCL demonstrated superior generalization, achieving top performance on three out of four tasks after pre-training on ZINC 2M.
  • Uniformity of Information: Visualization confirms that nmrGCL successfully mitigates dimensional collapse by distributing features more broadly.
Heatmap comparison of embedding dimension distributions between standard GCL (left) and nmrGCL (right).

Conclusion

This work highlights the "shortcut" problem in standard GCL, where models amplify a few similar dimensions while ignoring others. By employing an adversarial complementarity approach, nmrGCL prevents "lazy" learning. While the method shows sensitivity to the threshold parameter $\delta$, it consistently produces more informative and uniform embeddings. Future work may explore adaptive augmentation strategies to further stabilize performance across varying graph structures.

Summary updated

BibTeX
@misc{sun2022graphcoco,
  author = {Jiawei Sun and Junchi Yan and Chentao Wu and Yue Ding and Ruoxin Chen and Xiang Yu and Xinyu Lu and Jie Li},
  title = {{GraphCoCo: Graph Complementary Contrastive Learning}},
  year = {2022},
  eprint = {2203.12821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.12821},
}
Figure