Generating Counterfactual Hard Negative Samples for Graph Contrastive Learning
Haoran Yang, Hongxu Chen, Sixiao Zhang, Xiangguo Sun, Qian Li, Xiangyu Zhao, Guandong Xu
Abstract
Graph contrastive learning has emerged as a powerful unsupervised graph representation learning tool. The key to the success of graph contrastive learning is to acquire high-quality positive and negative samples as contrasting pairs to learn the underlying structural semantics of the input graph. Recent works usually sample negative samples from the same training batch with the positive samples or from an external irrelevant graph. However, a significant limitation lies in such strategies: the unavoidable problem of sampling false negative samples. In this paper, we propose a novel method to utilize Counterfactual mechanism to generate artificial hard negative samples for Graph Contrastive learning, namely CGC. We utilize a counterfactual mechanism to produce hard negative samples, ensuring that the generated samples are similar but have labels that differ from the positive sample. The proposed method achieves satisfying results on several datasets. It outperforms some traditional unsupervised graph learning methods and some SOTA graph contrastive learning methods. We also conducted some supplementary experiments to illustrate the proposed method, including the performances of CGC with different hard negative samples and evaluations for hard negative samples generated with different similarity measurements. The implementation code is available online to ease reproducibility 1 .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 76aaf4d6-2789-4210-bc6b-c725ef6cdb4fCited by top-tier papers5
- LinRec: Linear Attention Mechanism for Long-term Sequential Recommender SystemsLangming Liu, Liu Cai, Chi Zhang, Xiangyu Zhao et al.SIGIR 2023 · 86 citations
- Motif-Consistent Counterfactuals with Adversarial Refinement for Graph-level Anomaly DetectionChunjing Xiao, Shikang Pang, Wenxin Tai, Yanlong Huang et al.KDD 2024 · 5 citations
- CURE: Context-driven Diffusion with Progressive Expansion for Single Domain Generalization in Time Series ClassificationYuhang Pei, Fanchun Meng, Wenrui Wu, Tao Ren et al.ICML 2026
- ACL-GAD: Active Counterfactual Contrastive Learning for Graph Anomaly DetectionKamal Berahmand, Saman Forouzandeh, Mehrnoush Mohammadi, Parham Moradi et al.WWW 2026
- Deep Global-sense Hard-negative Discriminative Generation Hashing for Cross-modal RetrievalKun Cheng, Qibing Qin, Wenfeng Zhang, Lei Huang et al.ICLR 2026
Builds on11
- Graph Contrastive Learning with AugmentationsYuning You, Tianlong Chen, Yongduo Sui, Ting Chen et al.NeurIPS 2020 · 3,042 citations
- Contrastive Multi-View Representation Learning on GraphsKaveh Hassani, Amir Hosein Khas AhmadiICML 2020 · 1,663 citations
- Graph Contrastive Learning with Adaptive AugmentationYanqiao Zhu, Yichen Xu, Feng Yu, Qiang Liu et al.WWW 2021 · 1,415 citations
- InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information MaximizationFan-Yun Sun, Jordan Hoffmann, Vikas Verma, Jian TangICLR 2020 · 1,010 citations
- Contrastive Learning with Hard Negative SamplesJoshua David Robinson, Ching-Yao Chuang, Suvrit Sra, Stefanie JegelkaICLR 2021 · 999 citations
Related papers
- Graph Contrastive Learning with Balanced Hard Negatives and Fine-grained Semantic-aware PositivesHongshan Pu, Haoxu Zhang, Ye Liu, Hongmin CaiAAAI 2026
- ProGCL: Rethinking Hard Negative Mining in Graph Contrastive LearningJun Xia, Lirong Wu, Ge Wang, Jintao Chen et al.ICML 2022 · 174 citations
- Adversarial Contrastive Graph Augmentation with Counterfactual RegularizationTao Long, Lei Zhang, Liang Zhang, Laizhong CuiAAAI 2025 · 5 citations
- IsGCL: Informative Sample-Aware Progressive Graph Contrastive LearningJuxiang Zeng, Pinghui Wang, Linbo Ma, Jing Tao et al.ICDE 2025 · 1 citation
- Cluster-Guided Contrastive Graph Clustering NetworkXihong Yang, Yue Liu, Sihang Zhou, Siwei Wang et al.AAAI 2023 · 169 citations
