Contrastive Learning with Negative Sampling Correction

Lu Wang, Chao Du, Pu Zhao, Chuan Luo, Zhangchi Zhu +6 more
1/13/2024
cs.LG

No confident code implementation found for this paper.

Abstract

As one of the most effective self-supervised representation learning methods, contrastive learning (CL) relies on multiple negative pairs to contrast against each positive pair. In the standard practice of contrastive learning, data augmentation methods are utilized to generate both positive and negative pairs. While existing works have been focusing on improving the positive sampling, the negative sampling process is often overlooked. In fact, the generated negative samples are often polluted by positive samples, which leads to a biased loss and performance degradation. To correct the negative sampling bias, we propose a novel contrastive learning method named Positive-Unlabeled Contrastive Learning (PUCL). PUCL treats the generated negative samples as unlabeled samples and uses information from positive samples to correct bias in contrastive loss. We prove that the corrected loss used in PUCL only incurs a negligible bias compared to the unbiased contrastive loss. PUCL can be applied to general contrastive learning problems and outperforms state-of-the-art methods on various image and graph classification tasks. The code of PUCL is in the supplementary file.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2024contrastive,
  title  = {Contrastive Learning with Negative Sampling Correction},
  author = {Lu Wang and Chao Du and Pu Zhao and Chuan Luo and Zhangchi Zhu and Bo Qiao and Wei Zhang and Qingwei Lin and Saravan Rajmohan and Dongmei Zhang and Qi Zhang},
  year   = {2024},
  eprint = {2401.08690},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.08690v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.08690.svg)](https://codeofpaper.com/paper/2401.08690)

Discussion