Graph Contrastive Learning Automated
Abstract
Self-supervised learning on graph-structured data has drawn recent interest for learning generalizable, transferable and robust representations from unlabeled graphs. Among many, graph contrastive learning (GraphCL) has emerged with promising representation learning performance. Unfortunately, unlike its counterpart on image data, the effectiveness of GraphCL hinges on ad-hoc data augmentations, which have to be manually picked per dataset, by either rules of thumb or trial-and-errors, owing to the diverse nature of graph data. That significantly limits the more general applicability of GraphCL. Aiming to fill in this crucial gap, this paper proposes a unified bi-level optimization framework to automatically, adaptively and dynamically select data augmentations when performing GraphCL on specific graph data. The general framework, dubbed JOint Augmentation Optimization (JOAO), is instantiated as min-max optimization. The selections of augmentations made by JOAO are shown to be in general aligned with previous"best practices"observed from handcrafted tuning: yet now being automated, more flexible and versatile. Moreover, we propose a new augmentation-aware projection head mechanism, which will route output features through different projection heads corresponding to different augmentations chosen at each training step. Extensive experiments demonstrate that JOAO performs on par with or sometimes better than the state-of-the-art competitors including GraphCL, on multiple graph datasets of various scales and types, yet without resorting to any laborious dataset-specific tuning on augmentation selection. We release the code at https://github.com/Shen-Lab/GraphCL_Automated.
Benchmark Results
Tested on 4 datasets 5 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
TU Dortmund
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | MSH-GNN | 0.9910
±0.0030 | |
| 2 | ID-GNN+BEC | 0.9830
±0.0360 | |
| 3 | SupCosine | 0.9830
±0.0250 | |
| 39 | GIN | 0.9330
±0.0290 | |
| 199 | MVGRL | 0.8993
±0.0616 best reported | best at pub: Graph Self-Supervised Learning: A Survey (2021) best today: Improving Expressivity of GNNs with Subgraph-specific Factor Embedded Normalization (KDD 2023) |
| 222 | JOAOv2 | 0.8967
±0.0524 best reported | best today: Unifying Graph Contrastive Learning via Graph Message Augmentation (2024) Difference within reported uncertainty; not counted as underperformance. |
| 257 | InfoGraph | 0.8901
±0.0113 | prev best: Contrastive Multi-View Representation Learning on Graphs (ICML 2020) Improvement within reported uncertainty; not highlighted. |
| 351 | JOAO | 0.8770
±0.0080 best reported | best at pub: Graph Self-Supervised Learning: A Survey (2021) best today: Learning Graph Augmentations to Learn Graph Representations (2022) Difference within reported uncertainty; not counted as underperformance. |
| 354 | GraphCL | 0.8766
±0.0103 best reported | best today: Graph Masked Autoencoders with Transformers (2022) Difference within reported uncertainty; not counted as underperformance. |
| 403 | MLP | 0.8660
±0.0495 | |
| 407 | graph2vec | 0.8644
±0.0125 best reported | best at pub: CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2021) best today: Graph Masked Autoencoders with Transformers (2022) Difference within reported uncertainty; not counted as underperformance. |
| 444 | GL | 0.8520
±0.0090 best reported | best at pub: On Valid Optimal Assignment Kernels and Applications to Graph Classification (NeurIPS 2016) |
| 472 | Sub2Vec | 0.8447
±0.0037 best reported | best at pub: Learning Graph Representation by Aggregating Subgraphs via Mutual Information Maximization (2021) best today: Graph Masked Autoencoders with Transformers (2022) Difference within reported uncertainty; not counted as underperformance. |
| 746 | Node2Vec | 0.7263
±0.1020 | prev best: Contrastive Multi-View Representation Learning on Graphs (ICML 2020) Improvement within reported uncertainty; not highlighted. |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | WL-MLP | 0.9954 | |
| 2 | GIN | 0.9934 | |
| 3 | GCN | 0.9727 | |
| 12 | WL | 0.8590
±0.0010 best reported | best at pub: Propagation Kernels (2014) |
| 104 | GraphCL | 0.8250
±0.0013 best reported | best at pub: Adversarial Graph Augmentation to Improve Graph Contrastive Learning (NeurIPS 2021) best today: Label-invariant Augmentation for Semi-Supervised Graph Classification (NeurIPS 2022) |
| 131 | GraphSAGE | 0.8200
±0.0100 | |
| 146 | JOAOv2 | 0.8170
±0.0026 best reported | best today: Label-invariant Augmentation for Semi-Supervised Graph Classification (NeurIPS 2022) |
| 301 | JOAO | 0.7840
±0.0050 best reported | best today: Omni-Granular Ego-Semantic Propagation for Self-Supervised Graph Representation Learning (ICML 2022) Difference within reported uncertainty; not counted as underperformance. |
| 338 | InfoGraph | 0.7750
±0.0074 best reported | best at pub: CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2021) best today: Graph Masked Autoencoders with Transformers (2022) Difference within reported uncertainty; not counted as underperformance. |
| 406 | graph2vec | 0.7322
±0.0181 | prev best: CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2021) Improvement within reported uncertainty; not highlighted. |
| 557 | Sub2Vec | 0.5976
±0.0035 best reported | best today: Graph Masked Autoencoders with Transformers (2022) |
| 571 | Node2Vec | 0.5490
±0.0160 best reported | best today: GPS: graph contrastive learning via multi-scale augmented views from adversarial pooling (2024) Difference within reported uncertainty; not counted as underperformance. |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | WL-MLP | 0.9792 | |
| 2 | MSH-GNN | 0.9640
±0.0070 | |
| 3 | CoCN | 0.8722
±0.0013 | |
| 23 | GCN | 0.8260
±0.0220 | |
| 146 | InfoGraph | 0.7940 best reported | best at pub: CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2021) |
| 151 | MLP | 0.7920
±0.0240 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | OEPG | 0.9630
±0.0090 | |
| 2 | MSH-GNN | 0.9580
±0.0090 | |
| 3 | GNN-AK+ | 0.9480
±0.0080 | |
| 13 | GIN | 0.9240
±0.0250 | |
| 23 | GraphCL | 0.9169
±0.0070 best reported | best at pub: Adversarial Graph Augmentation to Improve Graph Contrastive Learning (NeurIPS 2021) best today: Graph Contrastive Learning with Cohesive Subgraph Awareness (WWW 2024) |
| 46 | InfoGraph | 0.8939
±0.0181 best reported | best at pub: Graph Self-Supervised Learning: A Survey (2021) best today: Graph Contrastive Learning with Cohesive Subgraph Awareness (WWW 2024) |
| 65 | MVGRL | 0.8450
±0.0060 best reported | best at pub: Graph Self-Supervised Learning: A Survey (2021) |
| 73 | DGK | 0.7804
±0.0039 | This paper |
| 75 | GL | 0.7734
±0.0018 | This paper |
| 80 | graph2vec | 0.7580
±0.0100 best reported | best today: Self-Supervised Representation Learning via Latent Graph Prediction (ICML 2022) Difference within reported uncertainty; not counted as underperformance. |
| 83 | Sub2Vec | 0.7150
±0.0040 best reported | best today: Self-Supervised Representation Learning via Latent Graph Prediction (ICML 2022) Difference within reported uncertainty; not counted as underperformance. |
| 85 | WL | 0.6882
±0.0041 | This paper |
