arXiv:2011.00362Computer ScienceOct 2020

Manuscript Offprint

arXiv:2011.00362

A Survey on Contrastive Self-supervised Learning

Ashish Jaiswal, Ashwin Ramesh Babu, Mohammad Zaki Zadeh, Debapriya Banerjee, F. Makedon

Abstract

Self-supervised learning has gained popularity because of its ability to avoid the cost of annotating large-scale datasets. It is capable of adopting self-defined pseudo labels as supervision and use the learned representations for several downstream tasks. Specifically, contrastive learning has recently become a dominant component in self-supervised learning methods for computer vision, natural language processing (NLP), and other domains. It aims at embedding augmented versions of the same sample close to each other while trying to push away embeddings from different samples. This paper provides an extensive review of self-supervised methods that follow the contrastive approach. The work explains commonly used pretext tasks in a contrastive learning setup, followed by different architectures that have been proposed so far. Next, we have a performance comparison of different methods for multiple downstream tasks such as image classification, object detection, and action recognition. Finally, we conclude with the limitations of the current methods and the need for further techniques and future directions to make substantial progress.

Keywords contrastive learning ⋅\cdot self-supervised learning ⋅\cdot discriminative learning ⋅\cdot image/video classification ⋅\cdot object detection ⋅\cdot unsupervised learning ⋅\cdot transfer learning

1 Introduction

The advancements in deep learning have elevated it to become one of the core components in most intelligent systems in existence. The ability to learn rich patterns from the abundance of data available today has made deep neural networks (DNNs) a compelling approach in the majority of computer vision (CV) tasks such as image classification, object detection, image segmentation, activity recognition as well as natural language processing (NLP) tasks such as sentence classification, language models, machine translation, etc. However, the supervised approach to learning features from labeled data has almost reached its saturation due to intense labor required in manually annotating millions of data samples. This is because most of the modern computer vision systems (that are supervised) try to learn some form of image representations by finding a pattern between the data points and their respective annotations in large datasets. Works such as GRAD-CAM [1] have proposed techniques that provide visual explanations for decisions made by a model to make them more transparent and explainable.

Traditional supervised learning approaches heavily rely on the amount of annotated training data available. Even though there’s a plethora of data available out there, the lack of annotations has pushed researchers to find alternative approaches that can leverage them. This is where self-supervised methods plays a vital role in fueling the progress of deep learning without the need for expensive annotations and learn feature representations where data itself provides supervision.

Figure

Figure 1: Basic intuition behind contrastive learning paradigm: push original and augmented images closer and push original and negative images away

Supervised learning not only depends on expensive annotations but also suffers from issues such as generalization error, spurious correlations, and adversarial attacks [2]. Recently, self-supervised learning methods have integrated both generative and contrastive approaches that have been able to utilize unlabeled data to learn the underlying representations. A popular approach has been to propose various pretext tasks that help in learning features using pseudo-labels. Tasks such as image-inpainting, colorizing greyscale images, jigsaw puzzles, super-resolution, video frame prediction, audio-visual correspondence, etc have proven to be effective for learning good representations.

Figure

Figure 2: Contrastive learning pipeline for self-supervised training

Generative models gained its popularity after the introduction of Generative Adversarial Networks (GANs) [3] in 2014. The work later became the foundation for many successful architectures such as CycleGAN [4], StyleGAN [5], PixelRNN [6], Text2Image [7], DiscoGAN [8], etc. These methods inspired more researchers to switch to training deep learning models with unlabeled data in an self-supervised setup. Despite their success, researchers started realizing some of the complications in GAN-based approaches. They are harder to train because of two main reasons: (a) non-convergence–the model parameters oscillate a lot and rarely converge, and (b) the discriminator gets too successful that the generator network fails to create real-like fakes due to which the learning cannot be continued. Also, proper synchronization is required between the generator and the discriminator that prevents the discriminator to converge and the generator to diverge.

Figure

Figure 3: Top-1 classification accuracy of different contrastive learning methods against baseline supervised method on ImageNet

Unlike generative models, contrastive learning (CL) is a discriminative approach that aims at grouping similar samples closer and diverse samples far from each other as shown in figure 1. To achieve this, a similarity metric is used to measure how close two embeddings are. Especially, for computer vision tasks, a contrastive loss is evaluated based on the feature representations of the images extracted from an encoder network. For instance, one sample from the training dataset is taken and a transformed version of the sample is retrieved by applying appropriate data augmentation techniques. During training referring to figure 2, the augmented version of the original sample is considered as a positive sample, and the rest of the samples in the batch/dataset (depends on the method being used) are considered negative samples. Next, the model is trained in a way that it learns to differentiate positive samples from the negative ones. The differentiation is achieved with the help of some pretext task (explained in section 2). In doing so, the model learns quality representations of the samples and is used later for transferring knowledge to downstream tasks. This idea is advocated by an interesting experiment conducted by Epstein [9] in 2016, where he asked his students to draw a dollar bill with and without looking at the bill. The results from the experiment show that the brain does not require complete information of a visual piece to differentiate one object from the other. Instead, only a rough representation of an image is enough to do so.

Most of the earlier works in this area combined some form of instance-level classification approach[10][11][12] with contrastive learning and were successful to some extent. However, recent methods such as SwAV [13], MoCo [14], and SimCLR [15] with modified approaches have produced results comparable to the state-of-the-art supervised method on ImageNet [16] dataset as shown in figure 3. Similarly, PIRL [17], Selfie [18], and [19] are some papers that reflect the effectiveness of the pretext tasks being used and how they boost the performance of their models.

References (85)