Graph Contrastive Learning with Balanced Hard Negatives and Fine-grained Semantic-aware Positives
Hongshan Pu, Haoxu Zhang, Ye Liu, Hongmin Cai
Abstract
Graph contrastive learning (GCL) aims to learn representations by bringing semantically similar graphs closer and pushing dissimilar ones farther apart without label supervision. Hard negatives, which refer to graphs that have different labels but similar embeddings to the target graph, play a key role in improving representation discrimination. However, current methods that generate both high-quality positives and hard negatives face two challenges: (1) Hard negative sample generation often suffers from class imbalance, resulting in unequal attention across classes and reduced discriminative power in the learned representations.
(2) The typical binary positive sample generation approach, which divides the graph into important and unimportant semantic regions, overlooks regions that negatively impact semantics and mislead model predictions. To address these issues, we introduce a novel method named BalanceGCL, which enhance graph contrastive learning with balanced hard negatives and fine-grained semantic-aware positives. Bal-anceGCL comprises two modules: Balanced Hard Negative graphs generation (BHN) and Fine-grained Semantic-aware Positive graphs generation (FSP). Inspired by the counterfactual mechanism, BHN generates balanced hard negatives that remain structurally similar to the original graph while inducing a controlled semantic shift. To ensure class balance, BHN iteratively constructs one hard negative sample for each class, ensuring an even distribution of negative samples across all alternative categories. FSP leverages the semantic differences between original graphs and balanced hard negatives to identify positively contributing, negatively contributing, and unimportant regions. By enhancing the influence of positive contributors, suppressing negative ones, and perturbing unimportant areas, it generates more reliable and semantically complete positive samples. The proposed method outperforms state-of-the-art GCL techniques across 14 datasets in graph classification and transfer learning tasks, demonstrating its effectiveness in tackling class imbalance and identifying fine-grained semantic-aware regions.
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 d643c259-2121-466c-bfd7-3b80c77dfe67Builds on14
- 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
- What Makes for Good Views for Contrastive Learning?Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan et al.NeurIPS 2020 · 1,631 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
Related papers
- Generating Counterfactual Hard Negative Samples for Graph Contrastive LearningHaoran Yang, Hongxu Chen, Sixiao Zhang, Xiangguo Sun et al.WWW 2023 · 36 citations
- Adversarial Contrastive Graph Augmentation with Counterfactual RegularizationTao Long, Lei Zhang, Liang Zhang, Laizhong CuiAAAI 2025 · 5 citations
- AutoGCL: Automated Graph Contrastive Learning via Learnable View GeneratorsYihang Yin, Qingzhong Wang, Siyu Huang, Haoyi Xiong et al.AAAI 2022 · 203 citations
- ProGCL: Rethinking Hard Negative Mining in Graph Contrastive LearningJun Xia, Lirong Wu, Ge Wang, Jintao Chen et al.ICML 2022 · 174 citations
- IsGCL: Informative Sample-Aware Progressive Graph Contrastive LearningJuxiang Zeng, Pinghui Wang, Linbo Ma, Jing Tao et al.ICDE 2025 · 1 citation
