EqCo: Equivalent Rules for Self-supervised Contrastive Learning

Benjin Zhu, Junqiang Huang, Zeming Li, Xiangyu Zhang, Jian Sun
10/5/2020
cs.CV
contrastive-ssl

Official code: V2AI/SelfSup (60 stars, Python, Apache-2.0, last commit 2021-08-21).

Abstract

In this paper, we propose EqCo (Equivalent Rules for Contrastive Learning) to make self-supervised learning irrelevant to the number of negative samples in the contrastive learning framework. Inspired by the InfoMax principle, we point that the margin term in contrastive loss needs to be adaptively scaled according to the number of negative pairs in order to keep steady mutual information bound and gradient magnitude.

Show full abstract

EqCo bridges the performance gap among a wide range of negative sample sizes, so that for the first time, we can use only a few negative pairs (e.g., 16 per query) to perform self-supervised contrastive training on large-scale vision datasets like ImageNet, while with almost no accuracy drop. This is quite a contrast to the widely used large batch training or memory bank mechanism in current practices. Equipped with EqCo, our simplified MoCo (SiMo) achieves comparable accuracy with MoCov2 on ImageNet (linear evaluation protocol) while only involves 16 negative pairs per query instead of 65536, suggesting that large quantities of negative samples is not a critical factor in contrastive learning frameworks.

View on arXivView PDF

Code Implementations(1)

V2AI/SelfSupOfficial100%
Apache-2.0

Collections of self-supervised methods, based on cvpods.

609PythonDec 7, 20205 years agoApache-2.0
barlow-twinsbyolcifar-10classificationcontrastive-learning+13 more

Similar Papers

Cite this paper

@article{zhu2020eqco,
  title  = {EqCo: Equivalent Rules for Self-supervised Contrastive Learning},
  author = {Benjin Zhu and Junqiang Huang and Zeming Li and Xiangyu Zhang and Jian Sun},
  year   = {2020},
  eprint = {2010.01929},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.01929}
}

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

Discussion