{"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/simple-and-asymmetric-graph-contrastive-1","title":"Simple and Asymmetric Graph Contrastive Learning without Augmentations","arxiv_id":"2310.18884","date":"2023-10-29","proceeding":"NeurIPS 2023 11","authors":["Teng Xiao","Huaisheng Zhu","Zhengyu Chen","Suhang Wang"],"abstract":"Graph Contrastive Learning (GCL) has shown superior performance in representation learning in graph-structured data. Despite their success, most existing GCL methods rely on prefabricated graph augmentation and homophily assumptions. Thus, they fail to generalize well to heterophilic graphs where connected nodes may have different class labels and dissimilar features. In this paper, we study the problem of conducting contrastive learning on homophilic and heterophilic graphs. We find that we can achieve promising performance simply by considering an asymmetric view of the neighboring nodes. The resulting simple algorithm, Asymmetric Contrastive Learning for Graphs (GraphACL), is easy to implement and does not rely on graph augmentations and homophily assumptions. We provide theoretical and empirical evidence that GraphACL can capture one-hop local neighborhood information and two-hop monophily similarity, which are both important for modeling heterophilic graphs. Experimental results show that the simple GraphACL significantly outperforms state-of-the-art graph contrastive learning and self-supervised learning methods on homophilic and heterophilic graphs. The code of GraphACL is available at https://github.com/tengxiao1/GraphACL.","url_abs":"https://arxiv.org/abs/2310.18884v3","url_pdf":"https://arxiv.org/pdf/2310.18884v3.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":"simple-and-asymmetric-graph-contrastive-1","repo_url":"https://github.com/tengxiao1/graphacl","is_official":1,"mentioned_in_paper":1,"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"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.18884","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.18884"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/CUAI/Non-Homophily-Large-Scale","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/tengxiao1/GraphACL","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/graphdml-uiuc-jlu/geom-gcn","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/yandex-research/heterophilous-graphs","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tengxiao1/graphacl","reach":null}],"summary":{"ran_fixture":1,"ran":2,"ran_draft_wrong":1,"ran_honours":1,"ran_violates":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"found_in_text":{"samples":5,"ran":5,"repositories":2}},"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":4,"samples":[{"code_sha256_prefix":"bd248e252b9ee711","entry":"contrastive_loss","repo":"tengxiao1/graphacl","repo_kind":"official","path":"hete/model.py","file_url":"https://github.com/tengxiao1/graphacl/blob/HEAD/hete/model.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":"bd248e252b9ee711"}},{"code_sha256_prefix":"2fd8ad8e4c9d0c3a","entry":"get_lr_scheduler_with_warmup","repo":"yandex-research/heterophilous-graphs","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/yandex-research/heterophilous-graphs/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2fd8ad8e4c9d0c3a"}},{"code_sha256_prefix":"f94ccb33e6c97913","entry":"get_parameter_groups","repo":"yandex-research/heterophilous-graphs","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/yandex-research/heterophilous-graphs/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f94ccb33e6c97913"}},{"code_sha256_prefix":"32302e598b1afb70","entry":"load_data","repo":"graphdml-uiuc-jlu/geom-gcn","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/graphdml-uiuc-jlu/geom-gcn/blob/HEAD/utils.py","link_basis":"plan_row","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":"32302e598b1afb70"}},{"code_sha256_prefix":"c1d6392f89c5e495","entry":"parse_index_file","repo":"graphdml-uiuc-jlu/geom-gcn","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/graphdml-uiuc-jlu/geom-gcn/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c1d6392f89c5e495"}},{"code_sha256_prefix":"b32fd748b4bbe3bf","entry":"sample_mask","repo":"graphdml-uiuc-jlu/geom-gcn","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/graphdml-uiuc-jlu/geom-gcn/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b32fd748b4bbe3bf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}