{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/graph-contrastive-learning-with-augmentations","title":"Graph Contrastive Learning with Augmentations","arxiv_id":"2010.13902","date":"2020-10-22","proceeding":"NeurIPS 2020 12","authors":["Yuning You","Tianlong Chen","Yongduo Sui","Ting Chen","Zhangyang Wang","Yang shen"],"abstract":"Generalizable, transferrable, and robust representation learning on graph-structured data remains a challenge for current graph neural networks (GNNs). Unlike what has been developed for convolutional neural networks (CNNs) for image data, self-supervised learning and pre-training are less explored for GNNs. In this paper, we propose a graph contrastive learning (GraphCL) framework for learning unsupervised representations of graph data. We first design four types of graph augmentations to incorporate various priors. We then systematically study the impact of various combinations of graph augmentations on multiple datasets, in four different settings: semi-supervised, unsupervised, and transfer learning as well as adversarial attacks. The results show that, even without tuning augmentation extents nor using sophisticated GNN architectures, our GraphCL framework can produce graph representations of similar or better generalizability, transferrability, and robustness compared to state-of-the-art methods. We also investigate the impact of parameterized graph augmentation extents and patterns, and observe further performance gains in preliminary experiments. Our codes are available at https://github.com/Shen-Lab/GraphCL.","url_abs":"https://arxiv.org/abs/2010.13902v3","url_pdf":"https://arxiv.org/pdf/2010.13902v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"graph-contrastive-learning-with-augmentations","repo_url":"https://github.com/Shen-Lab/GraphCL","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"graph-contrastive-learning-with-augmentations","repo_url":"https://github.com/Shen-Lab/GraphCL_Automated","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"graph-contrastive-learning-with-augmentations","repo_url":"https://github.com/ycremar/DIG-SSL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"graph-contrastive-learning-with-augmentations","repo_url":"https://github.com/yuwvandy/g2gnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"graphcl","method_name":"GraphCL"}],"datasets_introduced":[],"methods_introduced":[{"slug":"graphcl","name":"GraphCL","full_name":"Graph contrastive learning with augmentations"}],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2010.13902","atlas_url":"https://app.syntology.ai/?focus=2010.13902","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.13902"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/Shen-Lab/GraphCL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Shen-Lab/GraphCL_Automated","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yuwvandy/g2gnn","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ycremar/DIG-SSL","reach":null}],"summary":{"ran":2,"ran_fixture":4,"ran_draft_wrong":10,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":17,"ran":15,"repositories":3}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":18,"samples":[{"code_sha256_prefix":"7359e4334ef6272b","entry":"Contrastive","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7359e4334ef6272b"}},{"code_sha256_prefix":"9f253c62c8e84cf5","entry":"NCE_loss","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9f253c62c8e84cf5"}},{"code_sha256_prefix":"b5812fc5a667e0d5","entry":"NT_Xent","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5812fc5a667e0d5"}},{"code_sha256_prefix":"a28760ba97472616","entry":"RW_sample","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a28760ba97472616"}},{"code_sha256_prefix":"b822dd00427403bf","entry":"cycle_index","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"b822dd00427403bf"}},{"code_sha256_prefix":"9d6cd266e78dc80f","entry":"drop_nodes","repo":"Shen-Lab/GraphCL_Automated","repo_kind":"listed","path":"unsupervised_TU/aug.py","file_url":"https://github.com/Shen-Lab/GraphCL_Automated/blob/HEAD/unsupervised_TU/aug.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d6cd266e78dc80f"}},{"code_sha256_prefix":"40eabff12d968735","entry":"edge_perturbation","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40eabff12d968735"}},{"code_sha256_prefix":"80ece471102b74f3","entry":"graphcl","repo":"Shen-Lab/GraphCL","repo_kind":"official","path":"transferLearning_MoleculeNet_PPI/chem/pretrain_graphcl.py","file_url":"https://github.com/Shen-Lab/GraphCL/blob/HEAD/transferLearning_MoleculeNet_PPI/chem/pretrain_graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"80ece471102b74f3"}},{"code_sha256_prefix":"1045b0a0a750926e","entry":"infoNCE_local_intra_node","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1045b0a0a750926e"}},{"code_sha256_prefix":"122a8f8967440f5a","entry":"mask_nodes","repo":"Shen-Lab/GraphCL_Automated","repo_kind":"listed","path":"unsupervised_TU/aug.py","file_url":"https://github.com/Shen-Lab/GraphCL_Automated/blob/HEAD/unsupervised_TU/aug.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"122a8f8967440f5a"}},{"code_sha256_prefix":"565cd376d19d16fe","entry":"node_attr_mask","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"565cd376d19d16fe"}},{"code_sha256_prefix":"4e5d7db5f75c30b6","entry":"permute_edges","repo":"Shen-Lab/GraphCL_Automated","repo_kind":"listed","path":"unsupervised_TU/aug.py","file_url":"https://github.com/Shen-Lab/GraphCL_Automated/blob/HEAD/unsupervised_TU/aug.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4e5d7db5f75c30b6"}},{"code_sha256_prefix":"6a784308a8c084d2","entry":"random_view","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a784308a8c084d2"}},{"code_sha256_prefix":"2ac6b4ffab6287ac","entry":"remove_edge","repo":"yuwvandy/g2gnn","repo_kind":"listed","path":"aug.py","file_url":"https://github.com/yuwvandy/g2gnn/blob/HEAD/aug.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ac6b4ffab6287ac"}},{"code_sha256_prefix":"f679d89508183977","entry":"subgraph","repo":"Shen-Lab/GraphCL_Automated","repo_kind":"listed","path":"unsupervised_TU/aug.py","file_url":"https://github.com/Shen-Lab/GraphCL_Automated/blob/HEAD/unsupervised_TU/aug.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f679d89508183977"}},{"code_sha256_prefix":"84567ef3dc4cb159","entry":"train","repo":"Shen-Lab/GraphCL_Automated","repo_kind":"listed","path":"transferLearning_MoleculeNet_PPI_LP/bio/pretrain_generative_infobn.py","file_url":"https://github.com/Shen-Lab/GraphCL_Automated/blob/HEAD/transferLearning_MoleculeNet_PPI_LP/bio/pretrain_generative_infobn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"84567ef3dc4cb159"}},{"code_sha256_prefix":"5d7733a471ca27b8","entry":"uniform_sample","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5d7733a471ca27b8"}},{"code_sha256_prefix":"8130b63d6ab585fa","entry":"GraphCL","repo":"ycremar/DIG-SSL","repo_kind":"listed","path":"sslgraph/contrastive/model/graphcl.py","file_url":"https://github.com/ycremar/DIG-SSL/blob/HEAD/sslgraph/contrastive/model/graphcl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8130b63d6ab585fa"}},{"code_sha256_prefix":"a74955e8b458fc65","entry":"TUDataset_aug","repo":"Shen-Lab/GraphCL_Automated","repo_kind":"listed","path":"unsupervised_TU/aug.py","file_url":"https://github.com/Shen-Lab/GraphCL_Automated/blob/HEAD/unsupervised_TU/aug.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a74955e8b458fc65"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}