Enhancing Graph Contrastive Learning with Node Similarity
Abstract
Graph Neural Networks (GNNs) have achieved great success in learning graph representations and thus facilitating various graph-related tasks. However, most GNN methods adopt a supervised learning setting, which is not always feasible in real-world applications due to the difficulty to obtain labeled data. Hence, graph self-supervised learning has been attracting increasing attention. Graph contrastive learning (GCL) is a representative framework for self-supervised learning. In general, GCL learns node representations by contrasting semantically similar nodes (positive samples) and dissimilar nodes (negative samples) with anchor nodes. Without access to labels, positive samples are typically generated by data augmentation, and negative samples are uniformly sampled from the entire graph, which leads to a sub-optimal objective. Specifically, data augmentation naturally limits the number of positive samples that involve in the process (typically only one positive sample is adopted). On the other hand, the random sampling process would inevitably select false-negative samples (samples sharing the same semantics with the anchor). These issues limit the learning capability of GCL. In this work, we propose an enhanced objective that addresses the aforementioned issues. We first introduce an unachievable ideal objective that contains all positive samples and no false-negative samples. This ideal objective is then transformed into a probabilistic form based on the distributions for sampling positive and negative samples. We then model these distributions with node similarity and derive the enhanced objective. Comprehensive experiments on various datasets demonstrate the effectiveness of the proposed enhanced objective under different settings.
Benchmark Results
Tested on 4 datasets 3 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
Classic
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | GraphSAGE+CNA | 0.9418
±0.0033 | |
| 2 | GCN+CNA | 0.9366
±0.0048 | |
| 3 | TransformerConv | 0.9350
±0.0058 | |
| 21 | GCN | 0.9004 | |
| 134 | GRACE | 0.8362
±0.0113 | prev best: Rethinking the Promotion Brought by Contrastive Learning to Semi-Supervised Node Classification (IJCAI 2020) best today: Oversmoothing: A Nightmare for Graph Contrastive Learning? (2023) Improvement within reported uncertainty; not highlighted. |
| 143 | Graph-MLP | 0.8706
±0.0138 best reported | best at pub: Node Representation Learning in Graph via Node-to-Neighbourhood Mutual Information Maximization (2022) best today: Node Identifiers: Compact, Discrete Representations for Efficient Graph Learning (ICLR 2024) |
| 724 | MLP | 0.7768 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | CNA | 0.9575
±0.0058 | |
| 2 | IS-GIB | 0.9390
±0.0187 | |
| 3 | EERM | 0.9112
±0.0145 | |
| 44 | GCN | 0.8033
±0.0088 | |
| 69 | Graph-MLP | 0.7886
±0.0008 best reported | |
| 201 | GRACE | 0.7226
±0.0082 | prev best: Contrastive and Generative Graph Convolutional Networks for Graph-based Semi-Supervised Learning (AAAI 2020) best today: Oversmoothing: A Nightmare for Graph Contrastive Learning? (2023) Improvement within reported uncertainty; not highlighted. |
| 350 | MLP | 0.7289
±0.0010 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | LGTL | 0.9518
±0.0011 | |
| 2 | MixHop (LO) | 0.9513
±0.0038 | |
| 3 | GraphSAGE (LO) | 0.9511
±0.0036 | |
| 18 | GCN | 0.9296
±0.0015 | |
| 113 | Graph-MLP | 0.8893
±0.0063 best reported | best at pub: Node Representation Learning in Graph via Node-to-Neighbourhood Mutual Information Maximization (2022) best today: Node Identifiers: Compact, Discrete Representations for Efficient Graph Learning (ICLR 2024) |
| 194 | GRACE | 0.8645
±0.0029 | prev best: Augmentation-Free Graph Contrastive Learning with Performance Guarantee (2022) best today: Oversmoothing: A Nightmare for Graph Contrastive Learning? (2023) |
| 210 | MLP | 0.8690
±0.0074 |
Heterogeneous Graph Benchmarks
| # | Model | Micro-F1 ↑ | Paper |
|---|---|---|---|
| 1 | LMSPS | 0.9566
±0.0020 | |
| 2 | PSHGCN | 0.9561
±0.0012 | |
| 3 | RpHGNN | 0.9555
±0.0029 | |
| 21 | GCN | 0.9460
±0.0031 | |
| 105 | GRACE+(N) | 0.8489
±0.0026 | This paper |
| 176 | MLP | 0.6447
±0.0136 |
