TALK — CLIP (Contrastive Language–Image Pre-training)

Press & Blog Coverage

  1. CLIP: Connecting Text and Images, OpenAI blog, January 2021. OpenAI’s announcement of the model, its zero-shot results and the release of the code and weights.

  2. This avocado armchair could be the future of AI, MIT Technology Review, 5 January 2021. Covers DALL·E and CLIP, OpenAI’s two models that combine language and images, released together.

  3. openai/CLIP, GitHub. OpenAI’s code and trained models.

  4. CLIP in Hugging Face Transformers, Hugging Face documentation for using the released CLIP models.

  5. CLIP on Hugging Face Papers, the paper’s page on Hugging Face.

Q&A (answers from the paper)

Q1: Why did the authors use a contrastive objective instead of generating captions? A: Their first approach, like VirTex, trained an image CNN and a text transformer to predict the caption of each image, but it was hard to scale. In Figure 2 a 63-million-parameter transformer language model learned to recognise ImageNet classes 3 times slower than a simpler model that predicts a bag of words (just which words appear) of the same text.

Predicting the exact words is hard because the text next to images varies so much. So they trained CLIP on an easier task: predict only which text as a whole goes with which image. Swapping the bag-of-words prediction for this contrastive objective made zero-shot transfer to ImageNet another 4 times more efficient (Section 2.3, Figure 2).

Q2: Why build a new 400-million-pair dataset? A: Existing datasets were too small or too noisy. MS-COCO and Visual Genome have about 100,000 training photos each, and YFCC100M shrank to about 15 million photos after keeping only those with English natural-language titles or descriptions. The authors built WIT (WebImageText): 400 million (image, text) pairs collected from public internet sources, searched with 500,000 queries and with up to 20,000 pairs per query (Section 2.2).

Q3: How does zero-shot classification work? A: CLIP encodes the image and the names of all classes in the dataset, written as text. It computes the cosine similarities, scales them by the temperature and turns them into probabilities with a softmax. The authors describe the text encoder as a hypernetwork that produces the weights of a linear classifier from the class descriptions (Section 3.1.2).

Q4: How well does zero-shot CLIP do on ImageNet? A: The best CLIP model reaches 76.2% top-1 accuracy, up from 11.5% for Visual N-Grams, and matches the original ResNet-50 without using any of ImageNet’s 1.28 million labeled training examples. Its top-5 accuracy is 95% (Section 3.1.3, Table 1).

Q5: What does “zero-shot” mean in this paper? A: Usually zero-shot learning means recognising object categories never seen in training. The paper uses the term more broadly, for generalising to datasets it was not trained on, as a way to measure how well a model has learned tasks (Section 3.1.1).

Q6: What are CLIP’s main limitations? A: Zero-shot CLIP is on average only competitive with a linear classifier on ResNet-50 features, and the authors estimate it would need about 1000× more compute to reach the overall state of the art. It is weak at fine-grained classification (car models, flower species, aircraft variants), at abstract tasks such as counting objects, and on data unlike its training data: it gets only 88% on handwritten MNIST digits, where logistic regression on raw pixels does better. It can also only choose among the concepts given to it, unlike a captioning model (Section 6).

Common Misconceptions

  1. “CLIP generates images from text.” CLIP only scores how well a text matches an image; it cannot generate images. Text-to-image models use it as one part: DALL-E 2 generates images from CLIP image embeddings, and Stable Diffusion v1 uses a frozen CLIP ViT-L/14 text encoder.

  2. “CLIP is trained as a classifier.” CLIP is trained only to match images with their texts (Section 2.3). Zero-shot classification is a way of using that ability afterwards (Section 3.1.2).

  3. “CLIP was the first vision-language model.” Vision-language pre-training existed before, for example VisualBERT and UNITER (2019). The paper itself traces zero-shot transfer to existing image classification datasets back to Visual N-Grams (Li et al., 2017) (Section 3.1.1).

  4. “Zero-shot CLIP works well on any image.” It generalises poorly to data that is truly unlike its training data. On handwritten MNIST digits it reaches only 88% (Section 6).

  5. “100% zero-shot accuracy in this repo’s notebook means it generalises like CLIP.” In the notebook the 18 test prompts (“a red circle”, …) are the same captions the model saw in training, so the test is closer to classification on the training classes than to the paper’s transfer to new datasets. See its Summary.

Real Citations

  1. Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., Krueger, G., & Sutskever, I. (2021). Learning Transferable Visual Models From Natural Language Supervision. ICML 2021. arXiv:2103.00020

  2. Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., & Chen, M. (2022). Hierarchical Text-Conditional Image Generation with CLIP Latents (DALL-E 2). arXiv:2204.06125

  3. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., & Ommer, B. (2022). High-Resolution Image Synthesis with Latent Diffusion Models. CVPR 2022. arXiv:2112.10752 Stable Diffusion v1 is based on this work and uses a CLIP ViT-L/14 text encoder (CompVis/stable-diffusion).

  4. Li, L. H., Yatskar, M., Yin, D., Hsieh, C.-J., & Chang, K.-W. (2019). VisualBERT: A Simple and Performant Baseline for Vision and Language. arXiv:1908.03557

  5. Chen, Y.-C., Li, L., Yu, L., El Kholy, A., Ahmed, F., Gan, Z., Cheng, Y., & Liu, J. (2020). UNITER: UNiversal Image-TExt Representation Learning. ECCV 2020. arXiv:1909.11740

Citation count: about 65,500 (OpenAlex, 65,539 when checked on 2 December 2026).