CaCo: Both Positive and Negative Samples are Directly Learnable via Cooperative-adversarial Contrastive Learning

Xiao Wang, Yuhang Huang, Dan Zeng, Guo-Jun Qi
3/27/2022
cs.CVcs.AI
contrastive-ssl

Official code: maple-research-lab/CaCo (24 stars, Python, MIT, last commit 2024-03-10).

Abstract

As a representative self-supervised method, contrastive learning has achieved great successes in unsupervised training of representations. It trains an encoder by distinguishing positive samples from negative ones given query anchors.

Show full abstract

These positive and negative samples play critical roles in defining the objective to learn the discriminative encoder, avoiding it from learning trivial features. While existing methods heuristically choose these samples, we present a principled method where both positive and negative samples are directly learnable end-to-end with the encoder. We show that the positive and negative samples can be cooperatively and adversarially learned by minimizing and maximizing the contrastive loss, respectively. This yields cooperative positives and adversarial negatives with respect to the encoder, which are updated to continuously track the learned representation of the query anchors over mini-batches. The proposed method achieves 71.3% and 75.3% in top-1 accuracy respectively over 200 and 800 epochs of pre-training ResNet-50 backbone on ImageNet1K without tricks such as multi-crop or stronger augmentations. With Multi-Crop, it can be further boosted into 75.7%. The source code and pre-trained model are released in https://github.com/maple-research-lab/caco.

View on arXivView PDF

Code Implementations(1)

MIT

CaCo: Both Positive and Negative Samples are Directly Learnable via Cooperative-adversarial Contrastive Learning

244PythonMar 27, 20222 years agoMIT
cacocomputer-visioncontrastive-learningrepresentation-learningself-supervised-learning+1 more

Similar Papers

Cite this paper

@article{wang2022caco,
  title  = {CaCo: Both Positive and Negative Samples are Directly Learnable via Cooperative-adversarial Contrastive Learning},
  author = {Xiao Wang and Yuhang Huang and Dan Zeng and Guo-Jun Qi},
  year   = {2022},
  eprint = {2203.14370},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.14370}
}

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/2203.14370.svg)](https://codeofpaper.com/paper/2203.14370)

Discussion