Augmentations in Graph Contrastive Learning: Current Methodological Flaws & Towards Better Practices
Abstract
Unsupervised graph representation learning is critical to a wide range of applications where labels may be scarce or expensive to procure. Contrastive learning (CL) is an increasingly popular paradigm for such settings and the state-of-the-art in unsupervised visual representation learning. Recent work attributes the success of visual CL to use of task-relevant augmentations and large, diverse datasets. Interestingly, graph CL frameworks report strong performance despite using orders of magnitude smaller datasets and employing domain-agnostic graph augmentations (DAGAs). Motivated by this discrepancy, we probe the quality of representations learnt by popular graph CL frameworks using DAGAs. We find that DAGAs can destroy task-relevant information and harm the model's ability to learn discriminative representations. On small benchmark datasets, we show the inductive bias of graph neural networks can significantly compensate for this weak discriminability. Based on our findings, we propose several sanity checks that enable practitioners to quickly assess the quality of their model's learned representations. We further propose a broad strategy for designing task-aware augmentations that are amenable to graph CL and demonstrate its efficacy on two large-scale, complex graph applications. For example, in graph-based document classification, we show task-relevant augmentations improve accuracy up to 20$\
Benchmark Results
Tested on 3 datasets 1 baseline value 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 | |
| 399 | Random Init (5 layers) | 0.8673
±0.1033 | This paper |
| 403 | MLP | 0.8660
±0.0495 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | WL-MLP | 0.9954 | |
| 2 | GIN | 0.9934 | |
| 3 | GCN | 0.9727 | |
| 104 | GraphCL | 0.7816
±0.0051 | prev best: Prototypical Graph Contrastive Learning (2021) best today: Label-invariant Augmentation for Semi-Supervised Graph Classification (NeurIPS 2022) Improvement within reported uncertainty; not highlighted. |
| 131 | GraphSAGE | 0.8200
±0.0100 | |
| 263 | GraphSAGE InfoGraph | 0.7900
±0.0020 | This paper |
| 319 | GraphSAGE GraphCL | 0.7800
±0.0080 | This paper |
| 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) |
| 411 | GraphSAGE 4 Layer | 0.7500
±0.0060 | This paper |
| 439 | GraphSAGE 3 Layer | 0.7400
±0.0030 | This paper |
| 451 | GraphSAGE 5 Layer | 0.7300
±0.0110 | This paper |
| 476 | RAND | 0.7065
±0.0199 | This paper |
| 511 | PNA 3 Layer | 0.6700
±0.0080 | This paper |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | ID-GNN+BEC | 0.8150
±0.0240 | |
| 2 | GIN+BEC | 0.8080
±0.0330 | |
| 3 | GCN+BEC | 0.7990
±0.0340 | |
| 4 | GCN | 0.7980
±0.0230 | |
| 82 | InfoGraph | 0.7303
±0.0087 | prev best: Contrastive Multi-View Representation Learning on Graphs (ICML 2020) Improvement within reported uncertainty; not highlighted. |
| 124 | GraphCL | 0.7114
±0.0044 | This paper |
| 139 | Random Init (3 layers) | 0.6722
±0.0777 | This paper |
