NLP Lineage

26 February 2021 · Representation and retrieval

CLIP

Learning Transferable Visual Models From Natural Language Supervision

A. Radford, J. Kim, C. Hallacy, et al. (12 authors)

Date
26 February 2021
What the date marks
arXiv submission
Kind
Model
Organisation
OpenAI
Access
MIT
Other dates
ICML 2021
Threads
In the guided tour
Chapter 11. Seeing and hearing
Learning phases
4. Embeddings and RAG

A milestone: 2 later milestones descend directly from it, and its descendants reach 2 of the 10 threads. How levels are decided

Drafted with Claude from the paper on 15 October 2026; reviewed by Zeeshan Arif. Read from arxiv.org (arXiv version 1 (February 2021); the paper was later published at ICML 2021).

What it changed

It trained an image encoder and a text encoder together on 400 million image and caption pairs from the internet, so that images and text share one space, and an image can then be classified into any categories that are written as text, with no task-specific training.

The problem before it

The best computer vision systems of the time were trained to predict a fixed set of categories, such as the 1,000 classes of ImageNet. Every new kind of visual concept needed new labelled data.

In language, pretraining on raw web text had removed much of this need. GPT-2 and GPT-3 could do tasks with little or no task-specific data. Learning images from the text that comes with them had been tried, but results were weak. The best earlier zero-shot result on ImageNet, from Visual N-Grams in 2017, was 11.5% accuracy. Those studies also trained on at most a few hundred thousand images, while the strongest vision models trained on millions to billions.

The idea

The mechanism. The authors first tried to train a model to write each image’s caption, word by word. This learned slowly: 3 times slower, at recognising ImageNet classes, than a simpler model that predicts which words appear in the caption. So they changed the task. CLIP (Contrastive Language-Image Pre-training) only has to pick which caption in a batch belongs to which image. That is 4 times more efficient again.

Training works like this. Take a batch of N images and their N captions. Turn each image into a vector with an image encoder, and each caption into a vector with a text encoder. Train both encoders so that the N real pairs have similar vectors, and the N² - N wrong pairs have different vectors. The batch had 32,768 pairs.

To classify an image with no training on the task, write each category as a sentence, such as “A photo of a dog.”, and turn each sentence into a vector. The category whose vector is closest to the image’s vector wins. In effect, the text encoder writes a new classifier from the category names.

The other parts:

The largest ResNet took 18 days to train on 592 V100 GPUs. The largest Vision Transformer took 12 days on 256 V100 GPUs.

The notation. For a batch, I_e and T_e are the normalised image and text vectors. The scores are logits = I_e T_eᵀ · exp(t), an N × N table of similarities, where t is a learned temperature. The loss is the average of two cross-entropy losses: one picks the right caption for each image (along the rows), and the other picks the right image for each caption (along the columns).

What it showed

Reported in the paper. We read version 1 of the arXiv paper, a preprint. The paper was later published at ICML 2021. Unless the paper says otherwise, “CLIP” means the best model, ViT-L/14 at 336-pixel resolution.

Limits, and what came later

The limits come from the paper:

Later work built on it directly. Flamingo used a contrastively trained vision encoder. LLaVA used a CLIP vision encoder to connect images to a language model.

What to know first

How to read it

The paper is 48 pages, but the main text is 27, and the rest is references and appendices.

  1. Read section 1, then sections 2.2 and 2.3 with Figures 2 and 3. Figure 3 is the whole training method in 12 lines of code.
  2. Read section 3.1.2 for zero-shot classification, and 3.1.4 for prompts.
  3. Look at Figures 5 and 13 for the main results.
  4. Read section 6 for the authors’ own limits, and section 7.1 on bias.

Expect about 2 hours for the parts above (an estimate). Skim the rest of section 3 if time is short.

In brief, from the research data

Before it

Vision models were trained on fixed label sets like ImageNet's thousand classes.

The problem

A fixed vocabulary of labels cannot describe an open world, and collecting labels does not scale.

What it introduced

Train image and text encoders contrastively on 400M web pairs so that matching pairs land together in one space.

Why it matters

It created a shared image-text space, the bridge every vision-language model crosses.

What modern models inherit

The joint embedding space that lets a language model see.

What came next

Flamingo, LLaVA and GPT-4V all use CLIP-style encoders.

To understand it

Learn

  • Contrastive learning
  • A shared image-text embedding space
  • Zero-shot classification by text prompt

Helpful first

The Vision Transformer.

Before and after

The milestones it descends from, and the milestones that descend from it. Work developed alongside it is not counted. Weak links are left out unless you include them.

Before: where it came from

CLIP has 24 documented ancestors across 5 chapters, reaching back to Recurrent networks in 1990. Showing its direct parents and the 7 turning points among them.

CLIP has 24 documented ancestors across 5 chapters, reaching back to Recurrent networks in 1990. Showing all of them.

CLIP has 25 recorded ancestors, including indirect ones, across 5 chapters, reaching back to Recurrent networks in 1990. Showing its direct parents and the 7 turning points among them.

CLIP has 25 recorded ancestors, including indirect ones, across 5 chapters, reaching back to Recurrent networks in 1990. Showing all of them.

  1. 2021CLIPThis milestone.
  2. 2020Vision TransformerCLIP built directly on thisChapter 11. Seeing and hearing
  3. 2019GPT-2 Turning pointCLIP built directly on thisChapter 4. Pretrain once, use everywhere
  4. 2019WebTextGPT-2 was influenced by thisChapter 4. Pretrain once, use everywhere
  5. 2018BERT Turning pointVision Transformer was influenced by thisChapter 4. Pretrain once, use everywhere
  6. 2018GPT-1GPT-2 built directly on thisChapter 4. Pretrain once, use everywhere
  7. 2018ELMoBERT was influenced by thisChapter 4. Pretrain once, use everywhere
  8. 2018ULMFiTBERT was influenced by thisChapter 4. Pretrain once, use everywhere
  9. 2017CoVeELMo was influenced by thisChapter 3. Attention, then only attention
  10. 2017Transformer Turning pointGPT-2 built directly on this
    Vision Transformer built directly on this
    Chapter 3. Attention, then only attention
  11. 2016Layer normGPT-2 built directly on thisChapter 3. Attention, then only attention
  12. 2015Residual connectionsTransformer was influenced by thisChapter 3. Attention, then only attention
  13. 2015LM pretraining Turning pointBERT was influenced by this
    GPT-1 was influenced by this
    Chapter 2. Words become vectors
  14. 2015BPE tokenizationGPT-2 built directly on thisChapter 2. Words become vectors
  15. 2015Luong attentionTransformer was influenced by thisChapter 3. Attention, then only attention
  16. 2014AdamTransformer was influenced by thisChapter 2. Words become vectors
  17. 2014GloVeELMo built directly on thisChapter 2. Words become vectors
  18. 2014Seq2seq Turning pointTransformer built directly on thisChapter 2. Words become vectors
  19. 2014Attention Turning pointTransformer built directly on thisChapter 3. Attention, then only attention
  20. 2014GRU / encoder-decoderAttention built directly on thisChapter 2. Words become vectors
  21. 2013word2vecELMo was influenced by thisChapter 2. Words become vectors
  22. 2011NLP from scratchELMo was influenced by thisChapter 1. Language as probability
  23. 2003Neural LMNLP from scratch was influenced by this
    word2vec was influenced by this
    Chapter 1. Language as probability
  24. 1997LSTM Turning pointSeq2seq built directly on this
    ELMo built directly on this
    Chapter 1. Language as probability
  25. 1990Recurrent networksLSTM was influenced by thisChapter 1. Language as probability
  1. 2021CLIPThis milestone.
  2. 2020Vision TransformerCLIP built directly on thisChapter 11. Seeing and hearing
  3. 2019GPT-2 Turning pointCLIP built directly on thisChapter 4. Pretrain once, use everywhere
  4. 2019WebTextGPT-2 was influenced by thisChapter 4. Pretrain once, use everywhere
  5. 2018BERT Turning pointVision Transformer was influenced by thisChapter 4. Pretrain once, use everywhere
  6. 2018GPT-1GPT-2 built directly on thisChapter 4. Pretrain once, use everywhere
  7. 2018ELMoBERT was influenced by this
    GPT-1 was influenced by this (indirect influence)
    Chapter 4. Pretrain once, use everywhere
  8. 2018ULMFiTBERT was influenced by this
    GPT-1 was influenced by this (indirect influence)
    Chapter 4. Pretrain once, use everywhere
  9. 2017CoVeELMo was influenced by thisChapter 3. Attention, then only attention
  10. 2017Transformer Turning pointGPT-2 built directly on this
    Vision Transformer built directly on this
    Chapter 3. Attention, then only attention
  11. 2017ConvS2STransformer was influenced by this (indirect influence)Chapter 3. Attention, then only attention
  12. 2016Layer normGPT-2 built directly on thisChapter 3. Attention, then only attention
  13. 2015Residual connectionsTransformer was influenced by thisChapter 3. Attention, then only attention
  14. 2015LM pretraining Turning pointBERT was influenced by this
    GPT-1 was influenced by this
    Chapter 2. Words become vectors
  15. 2015BPE tokenizationGPT-2 built directly on thisChapter 2. Words become vectors
  16. 2015Luong attentionTransformer was influenced by thisChapter 3. Attention, then only attention
  17. 2014AdamTransformer was influenced by thisChapter 2. Words become vectors
  18. 2014GloVeELMo built directly on thisChapter 2. Words become vectors
  19. 2014Seq2seq Turning pointTransformer built directly on thisChapter 2. Words become vectors
  20. 2014Attention Turning pointTransformer built directly on thisChapter 3. Attention, then only attention
  21. 2014GRU / encoder-decoderAttention built directly on thisChapter 2. Words become vectors
  22. 2013word2vecELMo was influenced by thisChapter 2. Words become vectors
  23. 2011NLP from scratchELMo was influenced by thisChapter 1. Language as probability
  24. 2003Neural LMNLP from scratch was influenced by this
    word2vec was influenced by this
    Chapter 1. Language as probability
  25. 1997LSTM Turning pointSeq2seq built directly on this
    ELMo built directly on this
    Chapter 1. Language as probability
  26. 1990Recurrent networksLSTM was influenced by thisChapter 1. Language as probability

After: what it led to

CLIP has 2 documented descendants across 1 chapter, reaching forward to LLaVA in 2023. Showing all of them.

CLIP has 2 documented descendants across 1 chapter, reaching forward to LLaVA in 2023. Showing all of them.

CLIP has 35 recorded descendants, including indirect ones, across 6 chapters, reaching forward to Qwen3.8 in 2026. Showing its direct descendants.

CLIP has 35 recorded descendants, including indirect ones, across 6 chapters, reaching forward to Qwen3.8 in 2026. Showing all of them.

  1. 2021CLIPThis milestone.
  2. 2022Flamingobuilt directly on CLIPChapter 11. Seeing and hearing
  3. 2023LLaVAbuilt directly on CLIPChapter 11. Seeing and hearing
  1. 2021CLIPThis milestone.
  2. 2022Flamingobuilt directly on CLIPChapter 11. Seeing and hearing
  3. 2023LLaVAbuilt directly on CLIPChapter 11. Seeing and hearing
  4. 2023GPT-4Vwas influenced by CLIP (indirect influence)Chapter 11. Seeing and hearing
  5. 2024GPT-4obuilt directly on GPT-4VChapter 11. Seeing and hearing
  6. 2024Computer usewas influenced by GPT-4VChapter 13. Models that act
  7. 2024Gemini 2.0was influenced by Computer use (indirect influence)Chapter 14. Where the threads meet now
  8. 2024DeepSeek-V3was influenced by GPT-4oChapter 8. The weights get out
  9. 2025DeepSeek-R1built directly on DeepSeek-V3Chapter 12. Thinking longer
  10. 2025Claude Codewas influenced by Computer useChapter 13. Models that act
  11. 2025GPT-4.5built directly on GPT-4oChapter 14. Where the threads meet now
  12. 2025Gemini 2.5built directly on Gemini 2.0Chapter 12. Thinking longer
  13. 2025Qwen3was influenced by DeepSeek-R1Chapter 8. The weights get out
  14. 2025Kimi K2was influenced by DeepSeek-V3 (indirect influence)Chapter 8. The weights get out
  15. 2025IMO goldbuilt directly on Gemini 2.5Chapter 12. Thinking longer
  16. 2025gpt-osswas influenced by DeepSeek-R1 (indirect influence)Chapter 8. The weights get out
  17. 2025GPT-5succeeded GPT-4oChapter 14. Where the threads meet now
  18. 2025GLM-4.5was influenced by DeepSeek-R1 (indirect influence)Chapter 8. The weights get out
  19. 2025DeepSeek-V3.2built directly on DeepSeek-V3Chapter 10. Reading more than you remember
  20. 2025IMO-ProofBenchwas influenced by IMO goldChapter 12. Thinking longer
  21. 2025GPT-5.1built directly on GPT-5Chapter 14. Where the threads meet now
  22. 2025Gemini 3built directly on Gemini 2.5Chapter 14. Where the threads meet now
  23. 2025GPT-5.2built directly on GPT-5.1Chapter 14. Where the threads meet now
  24. 2026GPT-5.3-Codexwas influenced by Computer use (indirect influence)Chapter 13. Models that act
  25. 2026Gemini 3 Deep Thinkbuilt directly on Gemini 3
    was influenced by IMO gold
    Chapter 12. Thinking longer
  26. 2026Qwen3.5built directly on Qwen3Chapter 8. The weights get out
  27. 2026Gemini 3.1built directly on Gemini 3Chapter 14. Where the threads meet now
  28. 2026GPT-5.4built directly on GPT-5.3-CodexChapter 14. Where the threads meet now
  29. 2026Project Glasswingwas influenced by Computer use (indirect influence)Chapter 14. Where the threads meet now
  30. 2026GPT-5.5built directly on GPT-5.4Chapter 14. Where the threads meet now
  31. 2026DeepSeek-V4was influenced by DeepSeek-V3Chapter 8. The weights get out
  32. 2026Fable 5 / Mythos 5was influenced by Project GlasswingChapter 14. Where the threads meet now
  33. 2026GLM-5.2built directly on GLM-4.5Chapter 8. The weights get out
  34. 2026GPT-5.6 Solbuilt directly on GPT-5.5Chapter 14. Where the threads meet now
  35. 2026Kimi K3built directly on Kimi K2Chapter 8. The weights get out
  36. 2026Qwen3.8built directly on Qwen3.5Chapter 8. The weights get out

Direct links and their sources

Where it came from

Built directly on

What it led to

Built on directly by

Influenced

Terms