A Negative Sample-Free Graph Contrastive Learning Algorithm
<p>Masking node features.</p> "> Figure 2
<p>Shuffled features.</p> "> Figure 3
<p>Sampling-based augmentation.</p> "> Figure 4
<p>The overall framework of WNS-GCL model.</p> "> Figure 5
<p>Micro-F1 of node classification experiment.</p> "> Figure 6
<p>Influence of different output dimensions on node classification performance.</p> "> Figure 7
<p>Influence of different learning rates on node classification performance.</p> "> Figure 8
<p>Influence of <math display="inline"><semantics> <mi>α</mi> </semantics></math> on node classification performance.</p> "> Figure 9
<p>Influence of different hyperparameters on node classification performance.</p> ">
Abstract
:1. Introduction
- Converting the adjacency matrix into a diffusion matrix as a perspective for graph augmentation. Unlike other graph augmentation methods that disturb the graph structure, this approach aggregates neighbors from another perspective, enabling the model to learn rich graph information.
- Since graph augmentation operates in the input space and the embedding distribution is often difficult to predict or control after GNN influence, this paper performs feature augmentation in the implicit space. By using covariance, the data distribution after feature augmentation in the implicit space can be better controlled.
- A target function [2] is used in this work, which starts from the embedding data themselves rather than the samples. It also incorporates the idea of reducing redundancy. For the same input, the features obtained from the upper and lower branches should have a similarity-cross-correlation matrix with a main diagonal close to the identity matrix (i.e., the feature correlation matrix is close to the identity matrix), while the off-diagonal elements should be close to zero. The idea of the target function avoids the collapse problem in negative sample-free self-supervised models. Furthermore, it does not require weight sharing, the same architecture for the upper and lower branches, or inputs with the same properties, nor does it require a repository, etc.
2. Related Work
2.1. Feature-Based Augmentation
2.2. Structure-Based Augmentations
2.3. Sampling-Based Augmentation
2.4. Evaluation Indicators
3. A Graph Contrastive Learning Algorithm without Negative Samples
3.1. Definition of Symbols
3.2. Algorithm Design and Implementation
3.2.1. Graph Data Augmentation
3.2.2. Graph Encoder
3.2.3. Projection Head
3.2.4. Loss Function
4. Experimentation and Analysis
4.1. Experimental Dataset
4.2. Experimental Environment
4.3. Evaluation Metrics
4.4. Experimental Setup
4.5. Experimental Results and Analysis
4.5.1. Node Classification Task
4.5.2. Ablation Experiments
4.5.3. Parameter Sensitivity Analysis
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhang, Y.; Zhu, H.; Song, Z.; Koniusz, P.; King, I. COSTA: Covariance-preserving feature augmentation for graph contrastive learning. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, 14–18 August 2022; pp. 2524–2534. [Google Scholar]
- Bielak, P.; Kajdanowicz, T.; Chawla, N.V. Graph barlow twins: A self-supervised representation learning framework for graphs. Knowl.-Based Syst. 2022, 256, 109631. [Google Scholar] [CrossRef]
- Hu, W.; Liu, B.; Gomes, J.; Zitnik, M.; Liang, P.; Pande, V.; Leskovec, J. Strategies for pre-training graph neural networks. arXiv 2019, arXiv:1905.12265. [Google Scholar]
- Zhu, Y.; Xu, Y.; Yu, F.; Liu, Q.; Wu, S.; Wang, L. Deep graph contrastive representation learning. arXiv 2020, arXiv:2006.04131. [Google Scholar]
- You, Y.; Chen, T.; Sui, Y.; Chen, T.; Wang, Z.; Shen, Y. Graph contrastive learning with augmentations. Adv. Neural Inf. Process. Syst. 2020, 33, 5812–5823. [Google Scholar]
- Ren, Y.; Liu, B.; Huang, C.; Dai, P.; Bo, L.; Zhang, J. Heterogeneous deep graph infomax. arXiv 2019, arXiv:1911.08538. [Google Scholar]
- Zeng, J.; Xie, P. Contrastive self-supervised learning for graph classification. Proc. AAAI Conf. Artif. Intell. 2021, 35, 10824–10832. [Google Scholar] [CrossRef]
- Qiu, J.; Chen, Q.; Dong, Y.; Zhang, J.; Yang, H.; Ding, M.; Wang, K.; Tang, J. Gcc: Graph contrastive coding for graph neural network pre-training. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual, 23–27 August 2020; pp. 1150–1160. [Google Scholar]
- Jiao, Y.; Xiong, Y.; Zhang, J.; Zhang, Y.; Zhang, T.; Zhu, Y. Sub-graph contrast for scalable self-supervised graph representation learning. In Proceedings of the 2020 IEEE International Conference on Data Mining (ICDM), Sorrento, Italy, 17–20 November 2020; pp. 222–231. [Google Scholar]
- Zhang, M.; Hu, L.; Shi, C.; Wang, X. Adversarial label-flipping attack and defense for graph neural networks. In Proceedings of the 2020 IEEE International Conference on Data Mining (ICDM), Sorrento, Italy, 17–20 November 2020; pp. 791–800. [Google Scholar]
- Liberty, E. Simple and deterministic matrix sketching. In Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Chicago, IL, USA, 11–14 August 2013; pp. 581–588. [Google Scholar]
- Rozemberczki, B.; Kiss, O.; Sarkar, R. Karate Club: An API oriented open-source python framework for unsupervised learning on graphs. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management, Virtual, 19–23 October 2020; pp. 3125–3132. [Google Scholar]
- Wu, F.; Souza, A.; Zhang, T.; Fifty, C.; Yu, T.; Weinberger, K. Simplifying graph convolutional networks. In Proceedings of the International Conference on Machine Learning. PMLR, Long Beach, CA, USA, 9–15 June 2019; pp. 6861–6871. [Google Scholar]
- Kipf, T.N.; Welling, M. Variational graph auto-encoders. arXiv 2016, arXiv:1611.07308. [Google Scholar]
- Veličković, P.; Fedus, W.; Hamilton, W.L.; Liò, P.; Bengio, Y.; Hjelm, R.D. Deep graph infomax. arXiv 2018, arXiv:1809.10341. [Google Scholar]
- Zhu, Y.; Xu, Y.; Yu, F.; Liu, Q.; Wu, S.; Wang, L. Graph contrastive learning with adaptive augmentation. In Proceedings of the Web Conference 2021, Ljubljana, Slovenia, 19–23 April 2021; pp. 2069–2080. [Google Scholar]
Symbolic | Define |
---|---|
G | given graph |
V | nodes set of the graph |
E | edge set of a graph |
X | eigenmatrix of the graph |
A | adjacency matrix of the graph |
d | degree of nodes |
S | graph diffusion matrix |
diffusion coefficient | |
W | weighting matrix |
H | node representation |
Z | output node representation |
C | Intercorrelation matrix |
objective function hyperparameters | |
b | batch size |
P | affine transformation |
F | dimension |
Dataset | Nodes | Edges | Classes | Features |
---|---|---|---|---|
Cora | 2708 | 5429 | 7 | 1433 |
Citeseer | 3327 | 4732 | 6 | 3703 |
Pubmed | 19,717 | 44,338 | 3 | 500 |
DBLP | 17,716 | 105,734 | 4 | 1639 |
Hardware Environment | Parameters |
---|---|
OS | Ubuntu18.04 |
RAM | 8 GB, 50 GB |
CPU | Intel(R) Core(TM)i7-6700 CPU @3.40 GHz (Intel Corporation, Santa Clara, CA, USA) |
GPU | NVIDIA RTX A2000 display memory 12G (NVIDIA Corporation, Santa Clara, CA, USA) |
Development Tool | PyCharm |
Development Language | Python 3.8 |
Dataset | Learning Rate | Drop Feature Rate | Edge Removing Rate | Training Epochs | Hidden Dimension | |
---|---|---|---|---|---|---|
Cora | 0.0001 | 0.3 | 0.4 | 700 | 256 | 0.2 |
Citeseer | 0.001 | 0.4 | 0.2 | 1500 | 256 | 0.2 |
Pubmed | 0.001 | 0.3 | 0.4 | 1500 | 256 | 0.2 |
DBLP | 0.001 | 0.3 | 0.4 | 1000 | 256 | 0.2 |
Method | Training Data | Cora | Citeseer | Pubmed | DBLP |
---|---|---|---|---|---|
Rawfeatures | X | 64.8 | 64.6 | 84.8 | 71.6 |
Node2vec | A | 74.8 | 52.3 | 80.3 | 78.8 |
DeepWalk | X,A | 73.1 | 47.6 | 83.7 | 78.1 |
GCN | X,A,Y | 82.8 | 72.0 | 84.9 | 82.7 |
SGC | X,A,Y | 80.6 | 69.1 | 84.8 | 81.7 |
GAE | X,A | 76.9 | 60.6 | 82.9 | 81.2 |
VGAE | X,A | 78.9 | 61.2 | 83.0 | 81.7 |
DGI | X,A | 82.6 | 68.8 | 86.0 | 83.2 |
GCA | X,A | 82.8 | 71.5 | 86.0 | 83.1 |
COSTAMV | X,A | 84.3 | 72.7 | 85.9 | 84.4 |
WNS-GCL | X,A | 87.1 | 72.8 | 86.0 | 85.3 |
Other Aug. | Feature Aug. | Cora | Citeseer | Pubmed | DBLP |
---|---|---|---|---|---|
× | × | 0.6912 | 0.6527 | 0.8424 | 0.7800 |
× | ✓ | 0.7757 | 0.6916 | 0.8474 | 0.8049 |
✓ | × | 0.8162 | 0.7186 | 0.8525 | 0.8291 |
✓ | ✓ | 0.8710 | 0.8710 | 0.8710 | 0.8710 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, D.; Nie, M.; Wang, Z.; Chen, H.; Wang, D. A Negative Sample-Free Graph Contrastive Learning Algorithm. Mathematics 2024, 12, 1581. https://doi.org/10.3390/math12101581
Chen D, Nie M, Wang Z, Chen H, Wang D. A Negative Sample-Free Graph Contrastive Learning Algorithm. Mathematics. 2024; 12(10):1581. https://doi.org/10.3390/math12101581
Chicago/Turabian StyleChen, Dongming, Mingshuo Nie, Zhen Wang, Huilin Chen, and Dongqi Wang. 2024. "A Negative Sample-Free Graph Contrastive Learning Algorithm" Mathematics 12, no. 10: 1581. https://doi.org/10.3390/math12101581