Contrastive Graph Condensation: Advancing Data Versatility through Self-Supervised Learning

Xinyi Gao, Yayong Li, Tong Chen, Guanhua Ye, Wentao Zhang, Hongzhi Yin

Introduction

Graph Condensation (GC) has emerged as a vital technique for handling large-scale Graph Neural Network (GNN) training by synthesizing small "proxy" graphs that retain the essential information of massive datasets. However, traditional GC methods often suffer from task specificity, acting as "one-trick ponies" that overfit to node classification. This dependency on supervised labels leads to poor generalization on other tasks like link prediction or clustering and requires high-quality labels for the condensation process itself.

The CTGC Framework

To overcome these limitations, Contrastive Graph Condensation (CTGC) introduces a self-supervised, dual-branch framework. Instead of relying on class labels, CTGC disentangles graph structure from node attributes to produce versatile synthetic data.

The CTGC architecture consists of (1) Relay Model Training using a dual-branch approach and (2) Graph Generation via model inversion.

Dual-Branch Architecture

The framework operates through two distinct paths:

  1. Semantic Branch: Processes node attributes and graph structure using a standard GCN to capture feature-based information.
  2. Structural Branch: Operates in the spectral domain, utilizing eigenvalues and eigenvectors of the graph Laplacian. This branch uses an EigenMLP to explicitly model the graph's geometric and topological layout, ensuring the synthetic graph's structure is not merely a byproduct of its attributes.

Self-Supervised Optimization

CTGC employs a clustering-based contrastive loss. It identifies latent "centroids" representing node groups, training the model to pull nodes toward their respective centroids while pushing centroids apart. An alternating optimization scheme exchanges cluster assignments between the two branches to maintain alignment. Finally, model inversion reconstructs the synthetic adjacency matrix ($A'$) and attributes ($X'$) from these optimized latent representations.

Key Results and Versatility

The authors evaluated CTGC on benchmarks including Cora, Citeseer, and large-scale graphs like Ogbn-arxiv and Reddit. Unlike supervised methods, CTGC-condensed graphs excel across multiple downstream tasks: Node Classification (NC), Link Prediction (LP), and Clustering (CL).

Performance metrics (NC Accuracy and LP AUC) improve consistently with iterations, while the matching rate stabilizes during model updates.

Insights

  • Task Generalization: By removing label dependency, CTGC avoids discarding structural correlations vital for link prediction. On the Cora dataset, it improved node classification by nearly 15% over supervised baselines in label-scarce settings.
  • Spectral Blueprint: Using eigenvectors as positional embeddings efficiently captures both global community structures and local variations.
  • Denoising and Density: The condensation process acts as a feature distiller, sometimes allowing GNNs trained on synthetic data to outperform those trained on the noisy original graph. The resulting synthetic graphs are denser, which facilitates more effective message-passing.

Conclusion

CTGC represents a significant shift in graph condensation, moving from task-specific supervised learning to a versatile self-supervised paradigm. By disentangling structure and semantics through a dual-branch spectral-spatial approach, it produces robust synthetic graphs that serve as high-quality proxies for a wide range of graph-based applications. Future work aims to scale spectral computations for billion-node graphs and develop "Foundation GC" models for zero-shot condensation.

Summary updated

BibTeX
@inproceedings{gao2024contrastive,
  author = {Xinyi Gao and Yayong Li and Tong Chen and Guanhua Ye and Wentao Zhang and Hongzhi Yin},
  title = {{Contrastive Graph Condensation: Advancing Data Versatility through Self-Supervised Learning}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
}
Figure