SUPERVISION EXISTS EVERYWHERE: A DATA EFFICIENT CONTRASTIVE LANGUAGE-IMAGE PRE-TRAINING PARADIGM
Year: 2021

Abstract:
Recently, large-scale Contrastive Language-Image Pre-training (CLIP) (Radford et al., 2021) has attracted unprecedented attention for its impressive zero-shot recognition ability and excellent transferability to downstream tasks. However, CLIP is quite data-hungry and requires 400M image-text pairs for pre-training, thereby restricting its adoption. This work proposes a novel training paradigm, Data efficient CLIP (DeCLIP), to alleviate this limitation. We demonstrate that by carefully utilizing the widespread supervision among the image-text pairs, our DeCLIP can learn generic visual features more efficiently. Instead of using the single image-text contrastive supervision, we fully exploit data potential through the use of (1) self-supervision within each modality; (2) multi-view supervision across modalities; (3) nearest-neighbor supervision from other similar pairs. Benefiting from these intrinsic supervision, our DeCLIP-ResNet50 can achieve 60.4% zero-shot top1 accuracy on ImageNet, which is 0.8% above the CLIP-ResNet50 while using 7.1× fewer data. Our DeCLIP-ResNet50 outperforms its counterpart in 8 out of 11 visual datasets when transferred to downstream tasks. Moreover, Scaling up the model and computing also works well in our framework.

text: Recently, large-scale Contrastive Language-Image Pre-training (CLIP) (Radford et al., 2021) has attracted unprecedented attention for its impressive zero-shot recognition ability and excellent transferability to downstream tasks. However, CLIP is quite data-hungry and requires 400M image-text pairs for pre-training, thereby restricting its adoption. This work proposes a novel training paradigm, Data efficient CLIP (DeCLIP), to alleviate this limitation. We demonstrate that by carefully utilizing the widespread supervision among the image-text pairs, our DeCLIP can learn generic visual features more efficiently. Instead of using the single image-text contrastive supervision, we fully exploit data potential through the use of (1) self-supervision within each modality; (2) multi-view supervision across modalities; (3) nearest-neighbor supervision from other similar pairs. Benefiting from these intrinsic supervision, our DeCLIP-ResNet50 can achieve 60.4% zero-shot top1 accuracy on ImageNet, which is 0.8% above the CLIP-ResNet50 while using 7.1× fewer data. Our DeCLIP-ResNet50 outperforms its counterpart in 8 out of 11 visual datasets when transferred to downstream tasks. Moreover, Scaling up the model and computing also works well in our framework.

heading: 1 INTRODUCTION
text: Over the last few years, pre-trained models have greatly revolutionized computer vision (CV) and natural language processing (NLP). The first wave of exploring pre-trained models took place in the field of CV. Deep convolutional neural nets (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014; He et al., 2016) are pre-trained on well-labeled ImageNet (Deng et al., 2009) and then transferred to downstream CV tasks (Girshick et al., 2014; Long et al., 2015; Vinyals et al., 2015). Standardly, CV models are pre-trained to predict a fixed set of pre-defined object categories, e.g., 1000 classes in ImageNet. However, this supervised pre-training is hard to scale since we need arduous human labeling to specify new visual concepts.
When pre-training meets NLP, the intrinsic supervision within the natural language makes the pretraining more scalable (Devlin et al., 2018; Radford et al., 2019; Brown et al., 2020). Witnessing the progress in NLP, researchers use natural language supervision to learn visual features. The language-image pre-training can scale up to a very large size, benefiting from abundant image-text pairs on the Internet. For instance, CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021) adopt the contrastive loss to push the embedding of matched image-text pairs together while pushing those of non-matched pairs apart. They achieve prestigious performance by learning from an enormous dataset that contains 400M/1B image-text pairs. However, these methods also require huge storage and computing resources, which is not affordable for most laboratories and companies. We argue that these prior arts only use the single image-text contrastive supervision while overlooking the widespread supervision within the pairs, thus is inefficient.
Firstly, there underlies rich structural information within each modality itself (LeCun & Misra, 2021). We can tweak some words/pixels in a sentence/image while retaining a similar semantic meaning. This sort of self-supervision can be exploited to learn a more common-sense representation for each modality (Devlin et al., 2018; He et al., 2020; Chen et al., 2020a). Moreover, inspired
C DeC 71
72
73
74
75
73.3 73.8
ImageNet1k
C DeC 68
69
70
71
72
70.3
71.2
CIFAR100
C DeC 94
96
98
100
96.1
99.2 FLOWERS
C DeC 86
87
88
89
90
88.2 88.7
PETS
C DeC 87
88
89
90
91
88.7
89.8
CIFAR10
C DeC 70
71
72
73
74 73.3
72.8
SUN
C DeC
82
84
86 86.4
82.7
FOOD101 C DeC
78
80
82
78.3
81.7
CARS
C DeC
90
92
94
89.6
93.9
CALTECH
C DeC 46
47
48
49
50 49.1
48.4
AIRCRAFT C DeC
74
75
76
77
78
76.4 76.8
DTD
C DeC 77
78
79
80
81
79.1
79.9
Average
Figure 2: Transfer the DeCLIP-ResNet50 (abbr. as DeC) and CLIP-ResNet50 (abbr. as C) to 11 downstream visual datasets using linear probe verification. Our DeCLIP achieves better results in 8 out of 11 datasets.
by contrasting multi-crops in an image (Caron et al., 2020), we further extend the multi-view 1 supervision into our multi-modality setting. Specifically, each image is paired with multiple textual descriptions obtained via stochastic augmentations, vice versa. The benefit is intuitive: this auxiliary multi-view supervision brings more invariant and robust information.
Besides these overlooked supervision, we propose a novel nearest-neighbor (NN) supervision from other similar pairs. This NN supervision is mainly based on the intuition that one image is likely to have other similar text descriptions among the dataset. As shown in right figure, the image with the text ’going to see a lot of vintage tractors this week’ can also be described by ’vintage at tractors a gathering’. For this reason, we sample the NN in the embedding space and utilize them as additional supervisory signals. Aggregating these supervision leads to our novel training paradigm DeCLIP, which stands for Data efficient Contrastive Language-Image Pretraining.
Extensive experiments show the effectiveness and efficiency of our DeCLIP. As shown in Fig. 1, with a ResNet50 image encoder and a Transformer text encoder, our model can achieve 60.4% zero-shot top1 accuracy on ImageNet, which is 0.8% above the CLIPResNet50 while using 7.1× fewer data. Using only 88M image-text pairs, our best ResNet50/ViTB32 models boost the zero-shot performance to 62.5% and 66.2%, nearly 3.0% higher than the best number reported for these two architectures. We further verify the transferability of our models on downstream tasks. As indicated in Fig. 2, our DeCLIP-ResNet50 outperforms its counterpart in 8 out of 11 visual datasets. Moreover, Scaling up the model and computing also works well in our framework. Using 4.5× fewer data, our DeCLIP-RegNetY-64GF achieves 73.7% zero-shot ImageNet top1 accuracy, which is on-pair with CLIP-R50×64. Pre-trained models, code, and datasets shall be released to the community. The contributions are summarized as follows:
• To the best of our knowledge, this is the first work to study self-supervision and cross-modal multi-view supervision in the million-scale image-text pre-training task. Our work opens a new direction to fully exploit the intrinsic supervision within the multi-modal data instead of scaling up data naively.
• We propose novel cross-modal Nearest-Neighbor Supervision (NNS) to harness information from other similar pairs. The NNS can also be regarded as a semantic-level augmentation.
1View is originally a visual concept. For simplicity, we use the same term for language.

heading: 2 RELATED WORK

heading: 2.1 PRE-TRAINED MODELS
text: The critical idea of pre-training is to first extract general knowledge implicitly from the massive amount of data and then transfer the knowledge to versatile downstream tasks (Han et al., 2021). With the transformer architecture (Vaswani et al., 2017), big pre-trained NLP models, such as BERTseries (Devlin et al., 2018; Liu et al., 2019) and GPT-series (Radford et al., 2019; Brown et al., 2020), have dominated this area (Han et al., 2021). Besides the exquisite architecture, the great success comes from the tremendous language data over the Internet and labor-free supervision (Yang et al., 2019; Radford et al., 2019; Devlin et al., 2018) within the language itself. In the field of CV, supervised pre-training on ImageNet is still the standard practice. While achieving great success on downstream CV tasks (Girshick et al., 2014; Long et al., 2015; Vinyals et al., 2015) , this supervised manner is hard to scale. To address this challenge, our DeCLIP learns directly from image-text pairs that are abundant across the Internet. More importantly, by exploiting the widespread supervision within the pairs, our DeCLIP is more data-efficient than the prior art.

heading: 2.2 SUPERVISION WITHIN DATA
text: Language supervision Joulin et al. (2016); Gomez et al. (2017); Zhang et al. (2020); Sariyildiz et al. (2020); Desai & Johnson (2021) demonstrate the effectiveness of learning transferable visual features from language supervision. However, these works are limited to a small dataset such as Flickr (Young et al., 2014) or COCO (Lin et al., 2014). Pioneering work CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021) achieve prestigious performance via learning from 400M/1B image-text pairs. We are following these two works to improve their data efficiency.
Visual self-supervision Our work is also highly related to self-supervised learning (SSL) (LeCun & Misra, 2021). Contrastive learning, as a pretext task of SSL, has achieved remarkable success in visual representation learning (He et al., 2020; Chen et al., 2020a; Caron et al., 2020; Grill et al., 2020; Chen et al., 2020a). Researchers also extend contrastive learning into multi-modal settings (Yuan et al., 2021). However, it is only limited to a small COCO dataset (Yuan et al., 2021).
Nearest-neighbor supervision Recently, researchers have exploited nearest-neighbor supervision to learn visual features (Dwibedi et al., 2021; Van Gansbeke et al., 2021). They find that using nearest-neighbor as positive samples in the contrastive loss improves the performances on multiple downstream tasks. However, they mainly focus on the single visual modality pretraining on relatively small datasets, such as ImageNet. We propose novel nearest-neighbor supervision for multi-modal learning to harness information from other similar pairs.

heading: 2.3 MULTI-MODAL LEARNING
text: Multi-modal learning aims to build models that can process and relate information from multiple modalities (Baltrušaitis et al., 2018). Vision-language tasks, such as VQA (Antol et al., 2015; Gao et al., 2019), image captioning (Xu et al., 2015), require an understanding of both textual and visual semantics. Most vision-language models use a bunch of cross-modal transformers to fuse and align the information between text and image, such as LXMERT (Tan & Bansal, 2019), UNITER (Chen et al., 2020b), ViLBERT (Lu et al., 2019), VisualBERT (Li et al., 2019), OSCAR (Li et al., 2020), Pixel-BERT (Huang et al., 2020). These methods either need an off-the-shelf object detector to extract region features or dedicated cross-modal transformer layers, significantly hindering their scalability. Our DeCLIP, by contrast, uses a simple yet effective two-tower framework with multimodal interaction only at the top. Moreover, this series of models (Radford et al., 2021; Jia et al., 2021; Huo et al., 2021) can perform zero-shot recognition, adapting to new categories with no seen labeled data. Shen et al. (2021) also shows that the pre-trained CLIP model can significantly benefit the downstream VQA and image caption tasks. Our DeCLIP is supposed to be compatible with more modalities, e.g., acoustic signals (Akbari et al., 2021). More modalities included, more correlated supervision are expected to be exploited. We hope our DeCLIP can inspire and advance the future study of multi-modal learning.
correct pairings of a batch of (image, text) training examples. (b) Our DeCLIP overview. 1 means Self-Supervision(SS). For image SS, we maximize the similarity between two augmented views of the same instance. For text SS, we leverage Masked Language Modeling(MLM) within a text sentence. 2 represents cross-modal Multi-View Supervision(MVS). We first have two augmented views of both image and text, then contrast the 2 × 2 image-text pairs. 3 indicates NearestNeighbor Supervision(NNS). We sample text NN in the embedding space to serve as additional supervision. The combination of the three supervision leads to efficient multi-modal learning.

heading: 3 APPROACH
text: In this section, we first revisit CLIP and denote some basic concepts, such as image-text contrastive supervision (i.e., the InfoNCE loss). Next, we present the overview of our DeCLIP framework. Then we introduce every auxiliary supervision: Self-Supervision(SS), Multi-View Supervision(MVS), and Nearest-Neighbor Supervision(NNS).

heading: 3.1 REVISITING CLIP
text: Contrastive Language-Image Pre-training (CLIP) (Radford et al., 2021) aims to learn directly from the raw text about images. They use a dual-encoder architecture as in Fig. 4(a). The model consists of an image encoder (e.g., CNN (He et al., 2016) or ViT (Dosovitskiy et al., 2020)) and a text encoder(e.g., Transformer (Vaswani et al., 2017) or its variants (Radford et al., 2019)), with a multimodal interaction at the top. The image and text features are projected to the same dimension and followed by L2 normalization before interaction. At the training phase, a contrastive objective pushes the embeddings of matched image-text pairs together while pushing those of non-matched pairs apart. In a batch of N image-text pairs {(xIi ,xTi )}, we denote xIi and xTi as image and text of the ith pair. Let zIi and z T j be the normalized embedding of the ith image and jth text, respectively. CLIP uses InfoNCE loss (Oord et al., 2018). The loss for the image encoder can be denoted as Eq. 1.
LI = − 1
N N∑ i=1 log exp(sim(zIi , z T i )/τ)∑N j=1 exp(sim(z I i , z T j )/τ)
(1)
Here, the similarity function sim(, ) is measured by dot product, and τ is a learnable temperature variable to scale the logits. We have a symmetrical loss for image and text encoder, thus the overall loss function LCLIP is the average of LI and LT .
At the test phase, the learned text encoder synthesizes a zero-shot linear classifier by embedding the arbitrary categories of the test dataset. Because it is rare in the dataset that image caption is just
a single word, CLIP uses prompts to make up the context of the category {label}, such as "a photo of a {label}". Unless otherwise specified, we use the same prompt engineering and ensembling techniques as CLIP. Details can be found in Appendix E.

heading: 3.2 OVERVIEW OF DECLIP
text: As shown in Fig. 4(b), our DeCLIP has three additional supervisory signals.
1 We first use existing methods to exploit image and text Self-Supervision (SS) within its modality. For image SS, we adopt the simple yet effective SimSiam (Chen & He, 2021). The objective is to maximize the similarity between two augmented image features. For text SS, we adopt the most widely used Masked Language Modeling (MLM) (Devlin et al., 2018) as the pre-text task. We believe other kinds of self-supervised learning algorithms (e.g. MoCo (He et al., 2020), SimCSE (Gao et al., 2021) are orthogonal with our framework.
2 While SS only focuses on a single modality, we further propose cross-modal Multi-View Supervision (MVS). We apply stochastic data augmentations for both images and texts, resulting in two correlated views1 of each example. Then, the image-text contrastive loss is calculated for all the 2 × 2 pairs. Worth mentioning, the original CLIP does not use text augmentations and only uses random square crop image augmentations, thereby is data-hungry. The extension is instinctive and straightforward. Specifically, we contrast the 2 × 2 pairs and resulting in 3× more additional supervision.
3 We also propose novel Nearest-Neighbor Supervision (NNS) mined in embedding space to make better use of similar text descriptions among the dataset. In detail, we maintain a first-in-first-out feature queue that is representative of the whole data distribution. We use the nearest-neighbor search in embedding space to get the semantically similar text descriptions. Then we use the imagetext contrastive loss to get additional supervision.
3.3 SUPERVISION EXISTS EVERYWHERE
Self-Supervision within each modality Following SimSiam (Chen & He, 2021) (depicted in Fig 5(a)), we first have two augmented views (xI , x̃I ) for each image. These two views are sent to the image encoder (weights are shared between views). We also use the popularized nonlinear predictor module, which is typically a 2-layer MLP, to improve the representation quality in the encoder (Chen et al., 2020a). The objective is to maximize the similarity between z̃I and pI , which is a negative cosine similarity in this paper. To avoid the trivial “collapsing” solution, we follow (Chen & He, 2021) to adopt a stop-grad technique.
As shown in Fig. 5(b), we follow the method in BERT (Devlin et al., 2018) for our text self-supervision. In detail, we first randomly choose 15% of all tokens in each sequence. Then the token is replaced with (1) the [mask] token 80% of the time (2) a random token 10% of the time (3) the unchanged token 10% of the time. Then, the output of the language module for the corresponding token is used to predict the original token with cross-entropy loss.
Multi-View Supervision The authors only contrast the original text (w/o augmentation) with a single ‘global view’ of the image in the original CLIP. However, the text annotation of the image might not describe the whole picture, instead depicts a small local view of this image. For instance, as shown in the image with the text "a cute white cat" in Fig. 4, the central concept (cat) only occupies a small part of the picture. To mitigate this discrepancy, we get a closer look at the local region and utilize it as our auxiliary supervision, as shown in the augmented view in Fig. 4(b). This intuitive idea is akin to the successful Multi-crop transformation (Caron et al., 2020; Van Gansbeke et al., 2021) in image SSL. We further extend it into the multi-modal
setting. More specifically, we reuse the two image views introduced in SS, which contains the RandomResizedCrop policy to obtain a small local view. For text, as our goal is to understand the overall semantic meaning of a sentence, we adopt text classification augmentation EDA (Wei & Zou, 2019) to generate two text views. Besides the original contrastive loss between (zI , zT ), we can contrast (zI , z̃T ), (z̃I , zT ) and (z̃I , z̃T ), leading to 3× diverse and high-quality additional supervision. More conveniently, they are naturally compatible with the image-text contrastive loss as denoted in Eq. 1.
Nearest-Neighbor Supervision As shown in Fig 3, one image is likely to have other similar text descriptions among the dataset. To harness the information from other pairs and go beyond single pairs, we propose using nearest-neighbor (NN) to obtain more diverse supervision. More formally, we aim to find the NN feature zT ′ of text feature zT in the embedding space. The distance between two features could be measured by a simple cosine similarity. It is infeasible to search NN in the whole million-scale dataset. Thus, we maintain a FIFO queue Q to simulate the whole data distribution. The size of Q is 64K in our implementation. As shown in Fig. 6, we further get the contrastive loss between (zI , zT ′ ). Since there are two augmented image features, we also calculate the contrastive loss between (z̃I , zT ′ ). Fortunately, NNS is also compatible with Eq. 1.
In summary, we denote LISS and LTSS as the loss function of image SS and text SS, respectively. LMV S is multi-view loss, and LNNS is nearest-neighbor loss. We have the overall loss function of our DeCLIP as in Eq. 2.
LDeCLIP = (1− α− β − γ)LCLIP + α(LISS + LTSS) + βLMV S + γLNNS (2)
4 EXPERIMENTS
4.1 DATASETS
Pre-training datasets We summarize our pre-training dataset as in Tab. 1. Our DeCLIP full data consists of two parts: open-source data and web-crawled data. The open-source data comes from three different datasets: Conceptual Captions (CC3M) (Sharma et al., 2018), Conceptual 12M (CC12M) (Changpinyo et al., 2021), and YFCC (Thomee et al., 2016). Worth mentioning, due to the download failure or nonEnglish caption, we do not obtain the complete data for these datasets. We further use the YFCC15M query to crawl about 59M filtered
web data on the Internet, together with open-source data to form the 88M DeCLIP full pre-training dataset. More details can be seen in Appendix C.
Downstream datasets We assess our model performances in a wider variety of distributions and tasks. Following the CLIP (Radford et al., 2021), we evaluate the image encoder transferability on 11 widely used downstream datasets, such as Food-101, CIFAR-10, etc. To conduct a fair comparison, the metric and division for each dataset that can be collected are consistent with those of CLIP. More details of downstream datasets can be found in Tabel 6 of Appendix D.

heading: 4.2 EXPERIMENTS SETUP
text: Network architectures Following CLIP, we first consider two different architectures for the image encoder: a modified version of ResNet50 (Radford et al., 2021) and ViT-B/32 (Dosovitskiy et al., 2020). The text encoder is a Transformer (Vaswani et al., 2017) with the architecture modifications described in Radford et al. (2019). The image and text features are projected to the same 1024 dimension, followed by L2 normalization before interaction. Benefiting from the rapid progress of large CV models, we further scale up our model. Our largest model is a RegNetY-64GF (Radosavovic et al., 2020; Goyal et al., 2021) image encoder with a BERT (Devlin et al., 2018) text encoder, which is on-pair with the largest CLIP-R50×64 model.
Pre-training setup For a fair comparison with CLIP, we train our DeCLIP-ResNet50 and DeCLIP-ViT-B/32 from scratch for 32 epochs. Unless otherwise specified, we use full data, i.e., 88M image-text pairs, to obtain the best performance. The input resolution of the image encoder is 224 × 224, and the maximum context length of the text encoder is 76. The learnable temperature parameter τ is initialized to 0.07. The loss weights of additional supervision α, β and γ are all set to 0.2. More details can be found in Appendix C.
Downstream evaluation setup We evaluate our model transferability by performing linear classification on frozen features, i.e., the pre-trained image encoder is fixed and serves as a feature extractor. After feature extraction, we train the linear classifier with the L-BFGS optimizer as the same in Radford et al. (2021).

heading: 4.3 MAIN RESULTS
text: Zero-shot recognition on ImageNet After pre-training, we use natural language to refer to visual concepts enabling the zero-shot ability of our model. As shown in Fig. 1, our DeCLIP-ResNet50 consistently outperforms the CLIP-ResNet50 across all dataset sizes. When the data amount reaches 56M (29M open-source + 27M web-crawled), our model can achieve 60.4% accuracy, 0.8% above the CLIP-ResNet50, while using 7.1× fewer data. As described in Tab. 2, with our full data, our best ResNet50/ViT-B32 models boost the zero-shot performance to 62.5% and 66.2%, nearly 3.0% higher than the best number reported for these two architectures. Moreover, our DeCLIP-ResNet50 is even 0.3% better than CLIP-ResNet101, revealing the effectiveness and efficiency of our framework. Scaling up model capacity works in our framework as well. Our biggest DeCLIP-RegNetY64GF achieves 73.7% accuracy, which is 0.1% above CLIP ResNet50×64 with fewer parameters.
Downstream evaluation results We report our linear probe performance on 11 downstream datasets in Tab. 3. Our DeCLIP-ResNet50 outperforms its CLIP counterpart in 8 out of 11 datasets, with a 0.8% average improvement. There are some datasets that our models perform worse than CLIP models, such as SUN and Food101. We conjecture that this is caused by the different distribution of the pre-trained dataset. Interestingly, our ResNet50 and ViT-B/32 models might have distinct performance on several datasets, such as Pets and Aircraft. We infer that these two types
Table 3: Linear probe performance on 11 downstream datasets. There are some abbreviations. C10/100 is CIFAR10/100. F101 is Food101. Flow is Flowers. Cal is Caltech. Air is Aircraft. IN is ImageNet. Our DeCLIP models achieve higher average accuracy over 11 datasets.
MODEL P E
T S
C 10
C 10
0
SU N
F 10
1
F L
O W
.
C A
R S
C A
L .
A IR
.
D T
D
IN AV G
.
CLIP-RESNET50† 85.1 87.3 65.0 71.3 80.8 98.2 77.2 89.6 44.8 71.0 70.8 76.5 CLIP-RESNET50 88.2 88.7 70.3 73.3 86.4 96.1 78.3 89.6 49.1 76.4 73.3 79.1
DECLIP-RESNET50 88.7 89.8 71.2 72.8 82.7 99.2 81.7 93.9 48.4 76.8 74.0 79.9(↑ +0.8)
CLIP-VIT-B/32† 85.3 91.6 74.2 72.3 80.8 97.9 77.6 93.2 47.0 72.5 70.3 78.4 CLIP-VIT-B/32 90.0 95.1 80.5 76.6 88.8 96.9 81.8 93.0 52.0 76.5 76.1 82.5
DECLIP-VIT-B/32 89.2 96.5 84.7 75.0 85.0 99.1 81.6 94.8 53.5 78.5 75.3 83.0 (↑ +0.5) † OUR REIMPLEMENTATED CLIP MODEL TRAINED ON 88M DATA.
of neural networks might have different data preferences, i.e., different feature extraction capacities when they meet the same data.

heading: 4.4 ABLATION STUDY
text: Ablation on additional supervision In order to understand the effectiveness of each additional supervision, we conduct an ablation study as indicated in Tab. 4. We follow the DeCLIP-ResNet50 protocol in the pre-training setup except for a smaller 1024 batch size on a smaller CC3M dataset. The single image-text contrastive supervision (CLIP) results in 20.6% zero-shot top1 accuracy on ImageNet. We can observe that MVS boost amazing 4.2% improvement over the original CLIP. As discussed in Sec. 3.3, the benefits might come from two sides: 1). the MVS can look at a small local view of an image which might be a better fit with the text description. 2). 2 × 2 augmented views can provide 3× diverse and high-quality additional supervision, thus leading to more robust representations. SS can further contribute an additional 0.6% improvement on the basis of MVS. We believe SS could bring more improvements with proper dedicated SSL methods. NNS further brings 1.8% improvement on the high basis of SS. We will discuss more about NNS at Sec. 4.5. On the YFCC15M dataset, our DeCLIP using full additional supervision gets significant effect improvement, Appendix F shows the details.
Ablation on training cost Since we need to encode twice for each image-text pair, we admit our DeCLIP needs a higher training cost than CLIP. Regarding the training time, one DeCLIP iteration equals 1.5× CLIP iteration. In this ablation, we train the original CLIP-ResNet50 longer than our DeCLIP-ResNet50. As shown in Fig. 7, longer 64 epochs training can bring about 1.1% improvement. However, our model has 27.2% top1 accuracy, which is still 5.3% higher than the time-equivalent CLIP. It reveals that our framework can extract richer and more representative features through our proposed supervision. We also include memory usage ablation in Appendix F.

heading: 4.5 ANALYSIS
text: Class activation maps We try to understand what renders our DeCLIP effective. As shown in Fig. 8, we visualize the class activation maps (CAM) (Zhou et al., 2016) of different models trained

heading: GT label CLIP pred Our pred GT label CLIP pred Our pred
text: on the YFCC dataset. The results validate that the proposed method learns more representative features with the aid of multiple supervision.
Nearest neighbor samples In Fig 9, we show some nearest neighbor (NN) samples from different datasets. The first row is the original image-text pair, while the second row is the NN pair. In general, we can see that the texts have similar intellectual meanings. Therefore, the NN pair can provide high-quality supervision. When taking datasets into consideration, the matching performs very well in well-filtered datasets, such as CC3M and CC12M. This matching might be a little worse in more noisy datasets, such as YFCC and web-crawled, but it can still provide some beneficial guidance.

heading: 5 CONCLUSION
text: This paper introduces DeCLIP, a Data efficient Contrastive Language-Image Pre-training paradigm. Our goal is to learn visual representations through the use of broader and scalable supervision. Specifically, instead of using the single image-text contrastive supervision, we fully exploit data potential through the use of (1) self-supervision within each modality; (2) multi-view supervision across modalities; (3) nearest-neighbor supervision from other similar pairs. Experimentally, DeCLIP shows superior effectiveness and efficiency with different types of neural nets(CNN and ViT) and different amounts of data. We hope our work could bring insights about exploiting the multimodal data.

heading: A PSEUDO CODE OF DECLIP
text: The training pseudo code of DeCLIP is as follows:
Algorithm 1 DeCLIP
Input: I , Ĩ , T , T̃ , image encoder, text encoder, Feature Queue 1: function BATCH-UPDATING(I , Ĩ , T , T̃ ) 2: # Get The Features of The Current Batch. 3: If , Ĩf ← image encoder(I), image encoder(Ĩ) 4: Tf , T̃f ← text encoder(T ), text encoder(T̃ ) 5: TNN ← NEAREST-NEIGHBOR(Feature Queue, Tf ) 6: 7: # Calculate The losses. 8: LCLIP ← INFONCE-LOSS(If , Tf ) 9: LSS ← IMAGE-SS-LOSS(If , Ĩf ) + TEXT-SS-LOSS(Tf ) 10: LMV S ← INFONCE-LOSS(If , T̃f ) + INFONCE-LOSS(Ĩf , Tf ) + INFONCE-LOSS(Ĩf , T̃f ) 11: LNNS ← INFONCE-LOSS(Ĩf , T̃NN ) 12: LDeCLIP ← (1− α− β − γ)LCLIP + αLSS + βLMV S + γLNNS 13: 14: # Update The Network. 15: image encoder ← BACKWARD-UPDATE(image encoder, LDeCLIP ) 16: text encoder ← BACKWARD-UPDATE(text encoder, LDeCLIP ) 17: Feature Queue← FIFO-UPDATE(Feature Queue, Tf ) 18: end function 19: 20: function IMAGE-SS-LOSS(If , Ĩf ) 21: z, z̃ ← image encoder.proj(If ), image encoder.proj(Ĩf ) 22: p, p̃← image encoder.pred(z), image encoder.pred(z̃) 23: z, z̃ ← z.detach(), z̃.detach() 24: # Calculate the Negative Cosine Similarity loss. 25: LImage−SS ← NCS(p, z̃)/2 +NCS(p̃, z)/2 26: return LImage−SS 27: end function 28: 29: function TEXT-SS-LOSS(Tf ) 30: # Get The Masking GT when performing the text-encoder. 31: Wf ,Wgt ← Tf .word feat, Tf .mask id 32: Wpred ← text encoder.pred(Wf ) 33: # Calculate the Cross-Entropy loss. 34: LText−SS ← CE(Wgt,Wpred) 35: return LText−SS 36: end function

heading: B DATA AUGMENTATION
text: Details of SS The image SS uses SimSiam (Chen & He, 2021) method as the image selfsupervision. The prediction module is a 2-layer MLP, in which the hidden dimensions are 512 and output dimensions are 1024, the projection module is a 3-layer MLP, in which the hidden and output dimensions are both 1024. The text SS uses the Masked Language Model (Devlin et al., 2018) as the pretext task. In detail, we first randomly choose 15% of all tokens in each sequence. Then the token is replaced with (1) the [mask] token 80% of the time (2) a random token 10% of the time (3) the unchanged token 10% of the time.
Image augmentations The augmentation policy includes: RandomResizedCrop with scale in [0.2,1.0] (Wu et al., 2018), ColorJitter containing {brightness, contrast, saturation, hue}
strength of {0.4, 0.4, 0.4, 0.1} with an applying probability of 0.8, RandomGrayscale with an applying probability of 0.2. Blurring augmentation (Chen et al., 2020a) has a Gaussian kernel with std in [0.1, 2.0], and RandomHorizontalFlip.
Text augmentations We use the EDA (Wei & Zou, 2019) method as our text augmentation strategy, which contains three types of text augmentation strategies: synonym replacement, random swap, and random deletion. Each text will randomly select one of these three types for text augmentation.

heading: C PRE-TRAINING DATASETS & IMPLEMENTATION DETAILS
text: Open-source data. Conceptual Captions (Sharma et al., 2018) is a 3.3 M image caption opensource data. Due to the failure of the download link, we only download about 3M data(CC3M). Conceptual 12M (Sharma et al., 2018) contains approximately 12M of image-text pairs(CC12M), which is larger than the CC3M and covers a more diverse set of visual concepts. Also, due to the failure of the download link, we only download about 11M data. YFCC (Thomee et al., 2016), the Yahoo Flickr Creative Commons 100M data, is a dataset for vision language tasks. We download about 86.5M data from the YFCC website and use four filtering rules to filter the DeCLIP YFCC15M dataset to benchmark against CLIP YFCC15M. The four rules are: filtering data with damaged images, filtering data without the caption, filtering data with a caption English word ratio less than 0.8, filtering data with a caption only including one part of speech.
Web-crawled data. We use the user tags and machine tags of YFCC15M to form a tag list, and use WordNet (Miller, 1995) to find synonyms for each tag in the tag list to form a synonym tag list. The tag list and synonym tag list form a query list. Then we use the query list to crawl images from the Internet, after filtering data with smaller images, filtering data with damaged images, filtering data without the caption, and filtering data with Chinese in the caption, we collect 59M web crawled data. Tabel 5 shows the source link of pre-training datasets, and Figure 10 shows some cases random sampled from each dataset.
Implementation details We train DeCLIP-ResNet50 (abbr. as R50) and DeCLIP-ViT-B/32 (abbr. as V-B32) from scratch for 32 epochs. For R50, we use the FP16-SGD optimizer with the batch size of 10,240 (128×80). Starting with an 0.01 learning rate (lr), we first linearly increasing the lr to 0.2 (a.k.a warm-up) in one epoch. Then we use cosine anneal lr decay to decrease the lr. The weight decay is set to 0.0001. For V-B32, we use a hybrid FP16-AdamW-SGD optimizer with bacth size 10,240(128×80). For the ViT image encoder, we use AdamW optimizer with the lr warming up from 1e-4 to 1e-3 in one epoch. The weight decay is set to 0.05. For the text encoder, we use the SGD optimizer with the lr warming up from 1e-3 to 0.02 in one epoch. The weight decay is set to 1e-4.
Pre-training cost Our R50 and V-B32 took 8/10 days to train on 80 V100 GPUs, respectively. Our largest DeCLIP-RegNetY-64GF took 21 days on 160 V100 GPUs, while the largest CLIP-R50×64 from (Radford et al., 2021) spent 18 days on 592 V100 GPUs.

heading: D DOWNSTREAM DATASETS & IMPLEMENTATION DETAILS
text: Downstream data. We begin with the 12 datasets from the well-studied evaluation suite introduced by Kornblith et al. (2019). Within these 12 datasets, Birdsnap can not be downloaded, and PASCAL VOC 2007 classification is replaced by more challenging ImageNet-1K, resulting in our 11 datasets. They are: Food-101, CIFAR-10, CIFAR-100, SUN397, Stanford Cars, FGVC Aircraft, Describable Textures, Oxford-IIIT Pets, Caltech-101, Oxford Flowers 102. Tab. 6 is the detailed information of these datasets.
Implementation details We follow CLIP (Radford et al., 2021) to train a logistic regression classifier using L-BFGS, with maximum 1,000 iterations, and report the corresponding metric for each dataset. We determine the L2 regularization strength λ using a hyperparameter sweep on the validation sets over the range between 10−6 and 106, with 96 logarithmically spaced steps. To save compute required for the sweeps, we perform a parametric binary search that starts with λ = [10−6, 10−4, 10−2, 1, 102, 104, 106] and iteratively halves the interval around the peak until it reaches a resolution of 8 steps per decade. The hyperparameter sweeps are performed on a validation split of each dataset. For the datasets that contains a validation split in addition to from the test split, we use the provided validation set to perform the hyperparameter search, and for the datasets that do not provide a validation split or have not published labels for the test data, we split the training dataset to perform the hyperparameter search and report the performance on the validation data.

heading: E PROMPT ENGINEERING
text: Due to the reason that it’s relatively rare in the dataset for the text to be a single word, we use prompts such as "a photo of a {label}" for zero-shot classification. For a fair comparison, we use the same prompts as proposed in Radford et al. (2021) for the ImageNet dataset. As shown in Fig 11, the prompts reduce the domain gap between the training dataset and testset, and fully consider the different situations for the picture.

heading: F ADDITIONAL STUDY
text: Different Pre-training Datasets Data is critical for language-image pre-training task. As shown in Tab. 7, we evaluate our DeCLIP on different sources of datasets. Combining Tab.7 and Fig.1, we can see that when the amount of training data continues to scale up, the zero-shot recognition ability continues to improve as well. In addition, we can see that the open source data has high quality. The 29M open source data can achieve 49.3% zero-shot top1 accuracy on ImageNet through the DeCLIP training paradigm. Our open-source data is an affordable benchmark, which would be beneficial for explorations.
Our YFCC re-implementation Although we use the same number of image-text pairs as the CLIP YFCC-15M, our YFCC data is different from CLIP. We also reproduce the naive CLIP on our YFCC-15M data, which results in 35.9% zero-shot top1 accuracy on ImageNet-1K (see Fig. 8). It is relatively higher than the number in CLIP paper (31.1%). We conjecture the improvements might be caused by the different data cleaning strategies. However, our DeCLIP can achieve 41.9% zero-shot accuracy which is also 6.0% higher than our CLIP re-implementation.
Memory usage Because of the additional views, our DeCLIP is more memory-consuming. Thanks to the ICLR anonymous review comments: a fairer comparison might be doubling the batch size of CLIP. Flowing the ablation study in Fig. 7, we double the batch size and train CLIP-ResNet50 for 64 epochs. The final result is 22.3% which is still 4.9% lower than our DeCLIP model. We summarize the memory usage, training cost, and the final accuracy as below. All experiments are conducted on CC-3M with 16 V100 GPUs.

Review summaries:
The paper proposes DeCLIP to further utilize the data potential by adding three training objectives to CLIP pre-training: 1) inspired by SimSiam and BERT, self-supervised objectives are added to both image and text; 2) they generate different views for both images and text, and apply contrastive objectives; 3) they sample neighbor text as additional positive examples.  DeCLIP improves data efficiency. With web-crawled data, DeCLIP outperforms CLIP counterparts with 4.5x smaller amount of data. In addition, while introducing addition objectives and especially different views increases per-batch compute time by 1.5x, the authors show that DeCLIP still outperforms CLIP when given the same compute time budget.  

In this paper, the authors mitigate the data-hungriness of the CLIP model. The authors propose three directions: single-modality self-supervision; multi-view multi-modality contrastive learning, and nearest-neighbor supervision. With the proposed three components, the authors can achieve better or comparable results with CLIP with more than 4x fewer data.