WHAT MAKES INSTANCE DISCRIMINATION GOOD FOR TRANSFER LEARNING?

Abstract

Contrastive visual pretraining based on the instance discrimination pretext task has made significant progress. Notably, recent work on unsupervised pretraining has shown to surpass the supervised counterpart for finetuning downstream applications such as object detection and segmentation. It comes as a surprise that image annotations would be better left unused for transfer learning. In this work, we investigate the following problems: What makes instance discrimination pretraining good for transfer learning? What knowledge is actually learned and transferred from these models? From this understanding of instance discrimination, how can we better exploit human annotation labels for pretraining? Our findings are threefold. First, what truly matters for the transfer is low-level and mid-level representations, not high-level representations. Second, the intra-category invariance enforced by the traditional supervised model weakens transferability by increasing task misalignment. Finally, supervised pretraining can be strengthened by following an exemplar-based approach without explicit constraints among the instances within the same category.

1. INTRODUCTION

Recently, a remarkable transfer learning result with unsupervised pretraining was reported on visual recognition. The pretraining method MoCo (He et al., 2020) established a milestone by outperforming the supervised counterpart, with an AP of 46.6compared to 42.4 on PASCAL VOC object detection. Supervised pretraining has been the de facto standard for finetuning downstream applications, and it is surprising that labels of one million images, which took years to collect (Deng et al., 2009) , appear to be unhelpful and perhaps even harmful for transfer learning. This raises the question of why contrastive pretraining provides better transfer performance and supervised pretraining falls short. The leading contrastive pretraining methods follow an instance discrimination pretext task (Dosovitskiy et al., 2015; Wu et al., 2018; He et al., 2020; Chen et al., 2020a) , where the features of each instance are pulled away from those of all other instances in the training set. Invariances are encoded from low-level image transformations such as cropping, scaling and color jittering. With such low-level induced invariances (Wu et al., 2018; Chen et al., 2020a) , strong generalization has been achieved to high-level visual concepts such as object categories on ImageNet. On the other hand, the widely adopted supervised pretraining method optimizes the cross-entropy loss over the predictions and the labels. As a result, training instances within the same category are drawn closer while the training instances of different categories are pulled apart. Toward a deeper understanding of why contrastive pretraining by instance discrimination performs so well, we dissect the performance of both contrastive and supervised methods on a few downstream tasks. Our study begins by studying the effects of pretraining image augmentations, which are shown to be crucial for contrastive learning. We find that both contrastive and supervised pretraining benefit from image augmentations for transfer performance, while contrastive models rely on these low-level augmentations significantly. With proper augmentations, supervised pretraining may still prevail on the downstream task of object detection on COCO and semantic segmentation on Cityscapes. Contributed equally to this work. 1

