Prototypical Contrastive Learning of Unsupervised Representations

Junnan Li, Pan Zhou, Caiming Xiong, Steven C. H. Hoi
5/11/2020
1,264 citations
cs.CVcs.LG
contrastive-ssl

Official code: salesforce/PCL (604 stars, Python, MIT, last commit 2025-05-01).

Abstract

This paper presents Prototypical Contrastive Learning (PCL), an unsupervised representation learning method that addresses the fundamental limitations of instance-wise contrastive learning. PCL not only learns low-level features for the task of instance discrimination, but more importantly, it implicitly encodes semantic structures of the data into the learned embedding space.

Show full abstract

Specifically, we introduce prototypes as latent variables to help find the maximum-likelihood estimation of the network parameters in an Expectation-Maximization framework. We iteratively perform E-step as finding the distribution of prototypes via clustering and M-step as optimizing the network via contrastive learning. We propose ProtoNCE loss, a generalized version of the InfoNCE loss for contrastive learning, which encourages representations to be closer to their assigned prototypes. PCL outperforms state-of-the-art instance-wise contrastive learning methods on multiple benchmarks with substantial improvement in low-resource transfer learning. Code and pretrained models are available at https://github.com/salesforce/PCL.

View on arXivView PDF

Code Implementations(1)

salesforce/PCLOfficial100%
MIT

PyTorch code for "Prototypical Contrastive Learning of Unsupervised Representations"

60481PythonJul 28, 20201 years agoMIT
contrastive-learningpre-trained-modelrepresentation-learningself-supervised-learningunsupervsied-learning

Similar Papers

Cite this paper

@article{li2020prototypical,
  title  = {Prototypical Contrastive Learning of Unsupervised Representations},
  author = {Junnan Li and Pan Zhou and Caiming Xiong and Steven C. H. Hoi},
  year   = {2020},
  eprint = {2005.04966},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2005.04966}
}

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

Discussion