CLIP (Contrastive Language-Image Pre-training) is a dual-encoder neural network architecture developed by OpenAI in which a vision encoder (Vision Transformer or CNN) and a text encoder (Transformer) are jointly trained on large-scale internet-sourced image-text pairs using an InfoNCE contrastive objective. The training maximises cosine similarity between embeddings of matched image-text pairs and minimises it for unmatched pairs within a batch, yielding a shared multimodal embedding space where semantically related images and text are geometrically proximate. This shared space enables zero-shot image classification by comparing image embeddings to natural language class descriptions without task-specific fine-tuning, and has become a foundational component in text-to-image diffusion models, open-vocabulary object detection, and cross-modal retrieval systems.

Semantic Classification

Content

Compositional Relationships (Components)

SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:VisionEncoder))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:TextEncoder))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:SharedEmbeddingSpace))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:InfoNCELoss))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:LearnedTemperatureParameter))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:LinearProjectionHead))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:hasPart ai:PromptTemplate))

Dependency Relationships

SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:requires ai:ContrastiveLearning))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:requires ai:SelfSupervisedLearning))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:requires ai:LargeScaleDataset))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:requires ai:EmbeddingSpace))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:dependsOn ai:TransferLearning))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:dependsOn ai:VisionTransformer))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:dependsOn ai:TransformerArchitecture))

Capability Relationships

SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:ZeroShotLearning))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:CrossModalRetrieval))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:ImageClassification))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:OpenVocabularyDetection))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:ImageTextRetrieval))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:MultimodalSearch))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:TextToImageGeneration))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:enables ai:DatasetCuration))

Implementation Relationships

SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:implements ai:ContrastiveLearning))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:implements ai:DualEncoderArchitecture))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:implements ai:NaturalLanguageSupervision))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:supports ai:StableDiffusion))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:supports ai:VisionLanguageModel))

Reduction Relationships

SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:reducesTo ai:EmbeddingModel))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:reducesTo ai:MultimodalEncoder))

Contrasting Relationships

SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:contrastsWith ai:ALIGN))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:contrastsWith ai:SigLIP))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:contrastsWith ai:ConvolutionalNeuralNetwork))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:contrastsWith ai:SupervisedLearning))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:relatedTo ai:VisionLanguageModel))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:relatedTo ai:PromptEngineering))
SubClassOf(ai:CLIP
  ObjectSomeValuesFrom(ai:relatedTo ai:AugmentedReality))

About

CLIP (Contrastive Language-Image Pre-training) was introduced by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever at OpenAI in a preprint released in January 2021 and published in ICML 2021. The central hypothesis was that the rich and diverse supervision signal provided by natural language — in the form of image captions, alt-text, and web descriptions — could substitute for hand-curated per-image labels and yield visual representations with far greater breadth of semantic coverage. Prior to CLIP, the dominant paradigm was to pre-train visual models on ImageNet-scale supervised datasets (1M to 14M labelled images) and then fine-tune for downstream tasks. This approach was bottlenecked both by annotation cost and by the fixed label vocabulary, which constrained the model’s conceptual range. CLIP broke both constraints simultaneously: by sourcing training data from the internet, the dataset scaled to 400 million pairs with essentially unlimited vocabulary coverage; by framing the training signal as natural language similarity rather than discrete labels, the learned representations were inherently generalisable to any concept expressible in text.

The significance of CLIP extends beyond its headline zero-shot numbers. By creating a shared semantic space for images and text, CLIP operationalised a new class of application: any task reducible to computing similarities between an image and a text description becomes solvable without labelled examples. This includes not only classification but also retrieval, filtering, reward shaping for generative models, and semantic segmentation. The architectural elegance of the dual-encoder design — independently encoding each modality and comparing in a shared space — made CLIP computationally tractable at inference: image and text embeddings can be pre-computed and indexed separately, enabling sub-millisecond similarity search over billion-scale image corpora using approximate nearest-neighbour algorithms.

Components and Architecture

  • Vision Encoder

    • Processes raw pixel grids into fixed-dimensional embedding vectors
    • Supported architectures include Vision Transformer variants: ViT-B/32, ViT-B/16, ViT-L/14, ViT-L/14@336 (higher resolution), and ViT-H/14 (used in EVA-CLIP); ResNet variants: RN50, RN101, RN50x4, RN50x16, RN50x64
    • Each variant projects to a shared latent dimension (typically 512 or 768) via a linear projection head with no activation function
    • ViT-based encoders generally outperform ResNet at equivalent compute in zero-shot transfer tasks
  • Text Encoder

    • A 12-layer, 512-wide GPT-2-style Transformer Architecture with causal attention masking
    • BPE tokenisation with a 49,408-token vocabulary; sequences truncated at 77 tokens
    • The hidden state at the [EOS] position is extracted and projected to the shared embedding dimension
    • No task-specific pre-training; the text encoder is trained purely within the CLIP contrastive objective
  • Shared Embedding Space

    • Both encoders project into a common L2-normalised Embedding Space where dot product equals cosine similarity
    • The shared space is the critical innovation: it makes semantic alignment across modalities measurable by a single scalar
    • Dimensionality typically 512 (ViT-B/32 and smaller) or 768 (ViT-L/14 and larger)
  • InfoNCE Contrastive Loss

    • For batch size N, forms an N×N matrix of pairwise cosine similarities
    • The diagonal represents N matched (positive) pairs; off-diagonal entries are N²-N negatives
    • Cross-entropy is applied row-wise (image-to-text) and column-wise (text-to-image); losses are averaged
    • A learned temperature scalar τ (initialised to 0.07) is applied before softmax
    • Large batch sizes are critical: 32,768 samples were used in the original training, exposing each example to over 32,000 in-batch negatives per step
  • Prompt Engineering Module

    • Zero-shot classification is performed by constructing text templates for each candidate class, e.g. “A photo of a {label}, a type of pet”

    • Template ensembling over 80 hand-crafted templates improves ImageNet top-1 by approximately 3.5 percentage points versus bare class names

    • Prompt Engineering is therefore a first-class architectural concern in CLIP-based systems

      Formal Training Protocol

      The CLIP training recipe used an Adam optimiser with decoupled weight decay (AdamW), a cosine learning rate schedule with linear warmup, and mixed-precision training. Models were trained for 32 epochs on WIT-400M. The temperature parameter τ was constrained to stay above 0.01 to prevent training instability. Data augmentation was minimal — random square crop from resized images — relying on the diversity of the 400M web-scraped pairs to provide the equivalent of heavy augmentation. The text encoder used the contrastive loss exclusively, with no auxiliary language modelling objective, which distinguished CLIP from concurrent work like ALIGN that used the same contrastive loss but a different data pipeline.

      Major Variants and Successors (2021-2026)

  • OpenCLIP (LAION / BAAI, 2022-2024): Open-source reproduction of CLIP trained on LAION-400M and LAION-5B; provides fully reproducible training code and scaling laws; open weights released under permissive licences. By 2024, OpenCLIP on LAION-5B matches or surpasses the original CLIP on multiple benchmarks at equivalent model scale.

  • ALIGN (Google, 2021): Concurrent dual-encoder model trained on 1.8 billion noisy image-alt-text pairs; demonstrated similar zero-shot capabilities with even more data and less filtering, suggesting that scale compensates for noise.

  • Florence (Microsoft, 2021): Extends CLIP with multi-task heads for detection, captioning, and retrieval in a unified model; targets production deployment in Azure Cognitive Services.

  • SigLIP (Google, 2023): Replaces the softmax-normalised InfoNCE loss with a pairwise sigmoid loss that removes the batch-size dependency of the softmax normalisation; enables effective training with batch sizes as small as 32,768 pairs without requiring full-batch normalisation, improving memory efficiency significantly.

  • SigLIP 2 (Google DeepMind, February 2025): Major update adding captioning-based pretraining (CoCa-style), self-distillation (DINO/DINOv2-style), and masked prediction (BEiT-style) to the training recipe; zero-shot ImageNet accuracy improved from 76.7% to 79.1% on ViT-B/16@256 and COCO image-to-text recall improved from 65.1 to 69.7; 36-language multilingual checkpoint added.

  • CoCa (Google, 2022): Contrastive Captioners — combines InfoNCE contrastive loss with a generative captioning loss in a single model, enabling both retrieval and generation without separate systems.

  • MetaCLIP (Meta, 2023): Curates training data by extracting metadata concepts from CommonCrawl and matching image-text pairs to those concepts, achieving more balanced concept coverage; demonstrates that data quality matters as much as scale.

  • EVA-CLIP (BAAI, 2023-2024): Billion-parameter CLIP family reaching up to 18B parameters (EVA-CLIP-18B); achieves 80.7% averaged zero-shot top-1 accuracy across 27 image classification benchmarks, the highest open-source figure as of 2024.

  • CLIP-MoE (2024): Mixture-of-Experts extension improving zero-shot retrieval recall by up to 12 percentage points for modest additional compute overhead.

  • Jina-CLIP (Jina AI, 2024): Jointly optimises image-text and text-text contrastive objectives, enabling state-of-the-art performance on both multimodal and text-only retrieval tasks from a single model.

  • CLIMP (2025): Contrastive Language-Image Mamba Pre-training — replaces the transformer encoders with Mamba (state-space model) backbone for improved long-sequence efficiency.

    Use Cases

  • Text-to-Image Generation: CLIP or CLIP-derived encoders condition the denoising process in Stable Diffusion, DALL-E 2, and Imagen by encoding the text prompt into the shared embedding space. The conditioning signal steers generation toward text-aligned outputs; CLIP similarity scores can also serve as a differentiable reward for RLHF-style fine-tuning of image generators.

  • Zero-Shot Image Classification: At inference, candidate class names are encoded as text using prompt templates; cosine similarities between the image embedding and all class text embeddings are computed; the argmax gives the predicted class. No labelled examples for those classes are needed, enabling deployment on novel taxonomies without annotation.

  • Cross-Modal Retrieval: Given a natural-language query, retrieve the top-K most similar images from a large corpus indexed by their CLIP embeddings. This underpins enterprise visual search platforms, stock photography services (Unsplash, Shutterstock), and multimodal knowledge base retrieval systems.

  • Open-Vocabulary Object Detection: Systems such as OWL-ViT, GLIP, and Grounding DINO use CLIP-derived features to localise and classify objects described in free-form text without being constrained to a fixed closed vocabulary. This is essential for open-world robotics and autonomous systems.

  • Vision-Language Models (VLMs): CLIP visual encoders act as the visual backbone in systems such as LLaVA, Flamingo (DeepMind), BLIP-2, and mPLUG-Owl. The pre-aligned multimodal embedding space dramatically reduces the data and compute required to connect visual features to language decoder representations.

  • Dataset Curation and Filtering: CLIP cosine similarity scores between image and associated text are used to filter large web-scraped datasets. LAION applied a threshold of 0.28 CLIP cosine similarity when constructing LAION-5B, discarding roughly 85% of raw crawl data. This CLIP-score filtering has become an industry standard for data pipeline quality control.

  • Spatial Computing and AR Grounding: Emerging spatial computing platforms — including head-mounted displays running open-vocabulary scene understanding — leverage CLIP-style text-image alignment for Augmented Reality scene annotation and Spatial Anchor labelling, bridging AI semantics with the physical environment in real-time.

  • Medical and Scientific Imaging: Domain-adapted CLIP variants (BioMedCLIP, RadBERT-CLIP) pre-trained or fine-tuned on medical image-report pairs enable zero-shot radiology report retrieval, pathology slide classification, and drug discovery compound visualisation.

    Academic Context

    CLIP emerged from a tradition of joint multimodal embedding research stretching back to DeViSE (Frome et al., 2013), which proposed projecting image features into a word-embedding space trained on ImageNet labels. The idea of learning from natural language supervision was explored in earlier works including Learning Visual Representations with Caption Supervision (Desai & Johnson, 2021) and ConVIRT (Zhang et al., 2020) for medical images, but CLIP was the first to scale the approach to 400M web-sourced pairs and demonstrate competitive zero-shot performance on general-purpose vision benchmarks.

    The InfoNCE loss used by CLIP was formalised by van den Oord et al. in Contrastive Predictive Coding (CPC, 2018) and refined in SimCLR (Chen et al., 2020) and MoCo (He et al., 2020) for visual self-supervised learning. CLIP’s key contribution was to apply the InfoNCE objective across modalities (image and text) rather than within a single modality, creating a cross-modal contrastive framework that inherently aligns the two representation spaces.

    Subsequent theoretical analysis by Radford et al. and independent groups showed that the quality of CLIP representations obeys scaling laws similar to those for language models: performance improves predictably with both model size and dataset size. This motivated the EVA-CLIP line, which pushed model scale to 18B parameters, and the LAION community’s construction of LAION-5B (5.85 billion image-text pairs), the largest openly available contrastive pre-training dataset.

    Key critical analyses include the ACES benchmark (Cabello et al., 2022) examining compositional reasoning failures in CLIP, and the WinoGround (Thrush et al., 2022) study demonstrating that CLIP struggles with relational reasoning tasks involving attribute binding, counting, and spatial relationships despite strong aggregate benchmark performance.

    Current Landscape (2026)

    By 2026, CLIP-family models are deeply embedded in production AI infrastructure across industries. Text-to-image generation at scale (Stable Diffusion XL, FLUX, DALL-E 3, Midjourney v6) universally uses CLIP or SigLIP encoders for text conditioning. Enterprise search and e-commerce recommendation systems from companies including Shopify, Pinterest, and Getty Images index product catalogues using CLIP embeddings for semantic visual retrieval. Google’s production image search integrates SigLIP-derived features.

    The open-source ecosystem has matured substantially: OpenCLIP provides reproducible training code and over 100 publicly available CLIP checkpoints spanning a wide range of architectures and training datasets. The Hugging Face transformers library provides standardised CLIP inference APIs. Apple’s Core ML CLIP deployment enables on-device CLIP inference on iPhone and Vision Pro hardware.

    Frontier research is moving in two directions: first, scaling CLIP encoders into the billion-parameter regime (EVA-CLIP-18B, InternVL) and studying the resulting scaling laws; second, enriching the training recipe beyond pure contrastive loss to add captioning (CoCa, SigLIP 2), masked image modelling (BEiT-style), and self-distillation (DINO-style), all of which improve the density and utility of the learned representations for downstream vision tasks beyond retrieval.

    Regulatory attention to foundation models in the EU AI Act (2024) and UK AI regulation framework (2025) has raised questions about the transparency of web-scraped training data, particularly the social biases embedded in WIT and LAION. This has prompted work on data attribution, bias measurement tools, and filtered dataset alternatives such as DataComp.

    UK Context

    UK academic institutions have engaged with CLIP across several research threads. The University of Edinburgh’s Institute for Language, Cognition and Computation (ILCC) — which houses one of the UK’s strongest NLP and multimodal AI groups — has published work on cross-lingual CLIP extensions and CLIP-based visual question answering. Imperial College London’s Visual Geometry Group and the Oxford Visual Geometry Group have contributed open-vocabulary detection research building on CLIP features. University College London (UCL) has contributed to explainability studies of CLIP’s embedding geometry.

    In industry, British AI companies including DeepMind (London) have built on CLIP-derived architectures in their vision-language modelling work. Stability AI (London-founded) used CLIP as the conditioning encoder in the original Stable Diffusion 1.x series before transitioning to OpenCLIP for Stable Diffusion XL. The Alan Turing Institute has published benchmark studies comparing CLIP-family models across socially important visual domains including healthcare and cultural heritage.

    Northern England’s growing AI sector has adopted CLIP in applied settings: Manchester-based retail analytics companies use CLIP embeddings for product visual search; NHS digital imaging initiatives in Leeds and Sheffield are piloting CLIP-based report-to-image retrieval for radiology workflows.

    Future Directions (2026-2030)

  • Efficiency at Scale: Mamba-based (state-space) CLIP variants (e.g., CLIMP) aim to reduce the O(N²) attention complexity of ViT encoders for long-sequence and high-resolution inputs, enabling deployment on edge devices without sacrificing representation quality.

  • Video and Temporal CLIP: Extensions such as VideoCLIP and InternVideo apply contrastive language-video pretraining to learn temporally coherent representations, enabling zero-shot video understanding and action recognition.

  • 3D and Spatial CLIP: CLIP3D and OpenShape extend the contrastive framework to point clouds and voxel representations, enabling zero-shot 3D object classification and retrieval — a key capability for robotics and Augmented Reality scene understanding.

  • Compositional Understanding: Addressing CLIP’s known weakness in relational and compositional reasoning (counting, spatial relations, attribute binding) through structured training data, harder negatives, and neuro-symbolic integration.

  • Data Transparency and Attribution: Responding to regulatory pressure, future CLIP training pipelines are expected to include provenance tracking, consent-respecting data collection, and demographic bias auditing aligned with the EU AI Act’s Article 10 data governance requirements.

  • Multilingual Parity: Current CLIP models are primarily English-centric; multilingual CLIP (mCLIP, mSigLIP, SigLIP 2’s multilingual checkpoint) aim to close the gap, with particular importance for low-resource languages in medical and governmental applications.

    Standards, Licensing and Governance

    CLIP does not correspond to a formal standards-body specification such as an ISO or IEEE standard. Instead, the de facto standards ecosystem has emerged through community practice, open-source tooling, and benchmark conventions:

  • MIT Licence (OpenAI CLIP): The original OpenAI CLIP model weights and inference code were released under the MIT licence, allowing commercial use, modification, and redistribution with attribution. This liberal licence was instrumental in CLIP’s rapid adoption as the backbone of commercial Text-to-Image Generation systems.

  • OpenCLIP Weights: The LAION community’s OpenCLIP checkpoints are released under a mixture of licences depending on the training dataset. Checkpoints trained on LAION-5B carry the LAION-5B dataset licence, which requires compliance with LAION’s terms regarding prohibited use cases (weapons, CSAM, biometric surveillance).

  • Hugging Face Hub Standards: The Hugging Face transformers library provides a standardised CLIP inference API (CLIPModel, CLIPProcessor) that has become the de facto programming interface for CLIP usage in Python. This standardisation reduces integration friction and ensures consistent preprocessing (image resizing, pixel normalisation, BPE tokenisation).

  • LAION CLIP-Score Threshold: LAION’s use of CLIP cosine similarity ≥ 0.28 as the data quality threshold for LAION-5B has become an informal industry standard for web-crawled dataset curation, adopted by DataComp, CC12M+, and other large image-text datasets.

  • EU AI Act Implications: The EU AI Act (2024) classifies large-scale image and text processing Foundation Model systems as General Purpose AI (GPAI) models with transparency, documentation, and risk assessment obligations. CLIP-family models used as components of higher-risk AI systems (medical diagnosis, biometric identification) may require conformity assessment under the AI Act’s tiered framework.

  • UK AI Regulation (2025): The UK’s AI Regulation framework (published 2025) takes a principles-based, sector-specific approach rather than prescriptive classification. CLIP deployments in regulated sectors (healthcare, financial services) are expected to demonstrate appropriate risk management and model cards disclosing training data sources, known biases, and performance limitations.

  • Benchmark Reporting Conventions: The community has converged on reporting zero-shot ImageNet top-1 accuracy, MSCOCO image-to-text R@1, and MSCOCO text-to-image R@1 as the canonical three-metric CLIP evaluation suite. All major papers and model releases report these three numbers, enabling fair comparison.

    Integration Patterns and Deployment Architecture

    CLIP is typically deployed in one of three patterns:

  • Static Embedding Index: Pre-compute and store image embeddings for a fixed corpus; at inference, encode the text query and run approximate nearest-neighbour search. This pattern is used in image search engines, e-commerce visual discovery, and stock photo retrieval. Tools: FAISS, HNSW (hnswlib), ScaNN. Typical latency: sub-millisecond for million-scale indices on CPU with quantisation.

  • Dynamic Scoring: Compute CLIP similarities on-the-fly for candidate image-text pairs; used in generative model conditioning (score each generated image against the prompt), dataset filtering (filter a batch of scraped pairs), and reward modelling (score images against reward descriptions). Requires GPU-accelerated batched inference.

  • Fine-Tuned Feature Extraction: Extract CLIP visual features (penultimate-layer activations rather than the final projected embedding) as input to a downstream task head; used in Vision-Language Model architectures (LLaVA, InstructBLIP), medical imaging classifiers, and remote sensing classifiers. Fine-tuning the CLIP backbone improves task-specific performance but risks degrading zero-shot generalisation.

    Production CLIP deployments at scale require:

  • Quantisation: FP16 or INT8 quantisation of encoder weights reduces memory from ~600MB (ViT-L/14) to ~150MB without significant accuracy loss on most benchmarks

  • TorchScript / ONNX Export: Converting CLIP to ONNX or TorchScript enables deployment on non-PyTorch runtimes (TensorRT, Core ML, OpenVINO)

  • Distributed Embedding Computation: For billion-scale image corpora, embedding computation is parallelised across multiple GPU nodes; results are sharded across distributed FAISS or Milvus vector database instances

  • Embedding Caching and Versioning: Because CLIP embeddings are not comparable across model versions, production systems must version embeddings alongside model checkpoints and re-index when upgrading models

    Research and Literature

    [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] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., & Houlsby, N. (2021). An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. ICLR 2021. arXiv:2010.11929.

    [3] van den Oord, A., Li, Y., & Vinyals, O. (2018). Representation Learning with Contrastive Predictive Coding. arXiv:1807.03748.

    [4] Chen, T., Kornblith, S., Norouzi, M., & Hinton, G. (2020). A Simple Framework for Contrastive Learning of Visual Representations (SimCLR). ICML 2020. arXiv:2002.05709.

    [5] Jia, C., Yang, Y., Xia, Y., Chen, Y.-T., Parekh, Z., Pham, H., Le, Q. V., Sung, Y., Li, Z., & Duerig, T. (2021). Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision (ALIGN). ICML 2021. arXiv:2102.05918.

    [6] Schuhmann, C., Beaumont, R., Vencu, R., Gordon, C. W., Wightman, R., Cherti, M., Coombes, T., Katta, A., Mullis, C., Wortsman, M., Schramowski, P., Kundurthy, S. R., Crowson, K., Schmidt, L., Beaumont, R., & Jitsev, J. (2022). LAION-5B: An open large-scale dataset for training next generation image-text models. NeurIPS 2022. arXiv:2210.08402.

    [7] Ilharco, G., Wortsman, M., Wightman, R., Gordon, C., Carlini, N., Taori, R., Dave, A., Shankar, V., Namkoong, H., Miller, J., Farhadi, A., Carlin, L., & Schmidt, L. (2021). OpenCLIP. Zenodo. https://doi.org/10.5281/zenodo.5143773.

    [8] Yu, J., Wang, Z., Vasudevan, V., Yeung, L., Seyedhosseini, M., & Wu, Y. (2022). CoCa: Contrastive Captioners are Image-Text Foundation Models. arXiv:2205.01917.

    [9] Zhai, X., Mustafa, B., Kolesnikov, A., & Beyer, L. (2023). Sigmoid Loss for Language Image Pre-Training (SigLIP). ICCV 2023. arXiv:2303.15343.

    [10] Sun, Q., Fang, Y., Wu, L., Wang, X., & Cao, Y. (2023). EVA-CLIP: Improved Training Techniques for CLIP at Scale. arXiv:2303.15389.

    [11] Sun, Q., Fang, Y., Wu, L., Wang, X., & Cao, Y. (2024). EVA-CLIP-18B: Scaling CLIP to 18 Billion Parameters. arXiv:2402.04252.

    [12] Xu, H., Xie, S., Tan, X. E., Huang, P.-Y., Howes, R., Sharma, V., Li, S.-W., Ghosh, G., Zettlemoyer, L., & Feichtenhofer, C. (2023). MetaCLIP: Demystifying CLIP Data. arXiv:2309.16671.

    [13] Li, J., Li, D., Savarese, S., & Hoi, S. (2023). BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models. ICML 2023. arXiv:2301.12597.

    [14] Alayrac, J.-B., Donahue, J., Luc, P., Miech, A., Barr, I., Hasson, Y., Lenc, K., Mensch, A., Millican, K., Reynolds, M., Ring, R., Rutherford, E., Cabi, S., Han, T., Gong, Z., Samangooei, S., Monteiro, M., Menick, J. L., Borgeaud, S., … Simonyan, K. (2022). Flamingo: a Visual Language Model for Few-Shot Learning. NeurIPS 2022. arXiv:2204.14198.

    [15] Rombach, R., Blattmann, A., Lorenz, D., Esser, P., & Ommer, B. (2022). High-Resolution Image Synthesis with Latent Diffusion Models. CVPR 2022. arXiv:2112.10752.

    [16] Minderer, M., Gritsenko, A., Stone, A., Neumann, M., Weissenborn, D., Dosovitskiy, A., Mahendran, A., Arnab, A., Dehghani, M., Shen, Z., Wang, X., Zhai, X., Kipf, T., & Houlsby, N. (2022). Simple Open-Vocabulary Object Detection (OWL-ViT). ECCV 2022. arXiv:2205.06230.

    [17] Li, L. H., Zhang, P., Zhang, H., Yang, J., Li, C., Zhong, Y., Wang, L., Yuan, L., Zhang, L., Hwang, J.-N., Chang, K.-W., & Gao, J. (2022). Grounded Language-Image Pre-training (GLIP). CVPR 2022. arXiv:2112.03857.

    [18] Frome, A., Corrado, G. S., Shlens, J., Bengio, S., Dean, J., Ranzato, M., & Mikolov, T. (2013). DeViSE: A Deep Visual-Semantic Embedding Model. NIPS 2013.

    [19] Thrush, T., Jiang, R., Bartolo, M., Singh, A., Williams, A., Kiela, D., & Ross, C. (2022). Winoground: Probing Vision and Language Models for Visuo-Linguistic Compositionality. CVPR 2022. arXiv:2204.03162.

    [20] Oquab, M., Darcet, T., Moutakanni, T., Vo, H. V., Szafraniec, M., Khalidov, V., Fernandez, P., Haziza, D., Massa, F., El-Nouby, A., Assran, M., Ballas, N., Galvez, W., Hannoun, B., Joulin, A., Misra, I., Synnaeve, G., Caron, M., Bojanowski, P., & Mairal, J. (2023). DINOv2: Learning Robust Visual Features without Supervision. arXiv:2304.07193.

    [21] Zhai, X., Kolesnikov, A., Houlsby, N., & Beyer, L. (2022). Scaling Vision Transformers. CVPR 2022. arXiv:2106.04560.

    [22] Gadre, S. Y., Ilharco, G., Fang, A., Hayase, J., Sheng, G., Boen, E., Smirnov, A., Robi, A. W., Maddox, E. H., Garg, N., Thrush, T., Nguyen, T., Nguyen, L., Jitsev, J., Yuksekgonul, M., Fang, R., Schmidt, L., & Wortsman, M. (2024). DataComp: In Search of the Next Generation of Multimodal Datasets. NeurIPS 2024. arXiv:2304.14108.

    [23] Tschannen, M., Gritsenko, A., Zhai, X., El Ouali, M., Gehrke, T., Mustafa, B., Pavetic, F., & Kolesnikov, A. (2025). SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding. arXiv:2502.14786.

    [24] Zhang, Y., Jiang, H., Miura, Y., Manning, C. D., & Langlotz, C. P. (2022). Contrastive Learning of Medical Visual Representations from Paired Images and Text (ConVIRT). MLHC 2022. arXiv:2010.00747.

    [25] Desai, K., & Johnson, J. (2021). VirTex: Learning Visual Representations from Textual Annotations. CVPR 2021. arXiv:2006.06666.

    [26] Li, J., Li, D., Xiong, C., & Hoi, S. (2022). BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation. ICML 2022. arXiv:2201.12086.

    [27] Cabello, L., Bugliarello, E., Brandl, S., & Elliott, D. (2023). ACES: Translation Accuracy Challenge Sets for Evaluating Machine Translation Metrics. EMNLP 2023. arXiv:2210.15615.

    [28] Wortsman, M., Ilharco, G., Gadre, S. Y., Rosenfeld, R., Garg, R., Ruder, S., Kornblith, S., Li, S., Hajishirzi, H., Farhadi, A., & Schmidt, L. (2022). Model Soups: Averaging Weights of Multiple Fine-tuned Models Improves Accuracy without Increasing Inference Time. ICML 2022. arXiv:2203.05482.

    Formal Algorithm: CLIP Contrastive Pre-training

    The CLIP training algorithm can be stated precisely as follows:

    Given:

  • A dataset D of N (image, text) pairs: D = {(I₁, T₁), (I₂, T₂), …, (Iₙ, Tₙ)}

  • A vision encoder f_v: image → ℝᵈ (ViT or ResNet with linear projection head)

  • A text encoder f_t: token sequence → ℝᵈ (GPT-2 transformer with linear projection head)

  • A learned temperature scalar τ ∈ ℝ₊, initialised to 0.07

    Mini-batch Processing (batch size B, typically 32,768):

  • Sample a mini-batch {(Iᵢ, Tᵢ)}ᵢ₌₁ᴮ from D

  • Compute image embeddings: vᵢ = L2_normalise(f_v(Iᵢ)) ∈ ℝᵈ for i = 1…B

  • Compute text embeddings: uᵢ = L2_normalise(f_t(Tᵢ)) ∈ ℝᵈ for i = 1…B

  • Compute the B×B cosine similarity matrix: S[i,j] = vᵢ · uⱼ / τ

    Loss Computation (InfoNCE / NT-Xent):

  • Image-to-text loss: L_i2t = -1/B Σᵢ log(exp(S[i,i]) / Σⱼ exp(S[i,j]))

  • Text-to-image loss: L_t2i = -1/B Σⱼ log(exp(S[j,j]) / Σᵢ exp(S[i,j]))

  • Total CLIP loss: L = (L_i2t + L_t2i) / 2

    Inference — Zero-Shot Classification:

  • For C candidate classes {c₁, c₂, …, cC}, construct text prompts {T(cₖ)} using templates

  • Compute text embeddings: uₖ = L2_normalise(f_t(T(cₖ))) for k = 1…C

  • For a query image I, compute: v = L2_normalise(f_v(I))

  • Predict class: argmax_k (v · uₖ)

    Inference — Cross-Modal Retrieval:

  • Pre-index a corpus of images by computing and storing all image embeddings {vᵢ}

  • For a text query T: compute u = L2_normalise(f_t(T)), retrieve top-K by cosine similarity

  • This reduces to approximate nearest-neighbour search in ℝᵈ, e.g. using FAISS or HNSW indices

    Benchmark Datasets and Evaluation

    CLIP is evaluated across a broad suite of transfer tasks that collectively measure the breadth of its learned representations. The primary benchmarks are:

  • ImageNet Zero-Shot: 1,000-class ImageNet ILSVRC 2012 validation set evaluated without any ImageNet training examples. CLIP ViT-L/14@336 achieves 76.2% top-1 accuracy, matching supervised ResNet-50. EVA-CLIP-18B raises this to 80.7% averaged across 27 benchmarks.

  • MSCOCO Retrieval: Image-text and text-image retrieval on 5,000 validation captions. Measured by recall at rank 1, 5, and 10 (R@1, R@5, R@10). SigLIP 2 achieves 69.7 image-to-text R@1 and 81.7 text-to-image R@1 on COCO.

  • Flickr30K Retrieval: Similar retrieval benchmark on 31,000 images; commonly reported alongside COCO.

  • EvalBench / ELEVATER: Suite of 20 image classification benchmarks assessing few-shot and zero-shot generalisation across diverse domains (satellite imagery, medical imaging, textures, fine-grained recognition).

  • WinoGround: Compositional reasoning benchmark probing whether CLIP correctly prefers matched over mismatched image-caption pairs for relationally complex descriptions; exposes significant CLIP weaknesses.

  • ARO (Attribution, Relation, Order): Tests CLIP’s sensitivity to attribute binding (“blue cube to the right of a red sphere”) — another documented failure mode.

  • DataComp (Gadre et al., 2024): Benchmark for evaluating training dataset quality by fixing the model architecture and varying the data; demonstrates that CLIP’s performance depends as much on data quality as on scale.

  • LAION-CLIP-Score Threshold: LAION established that image-text pairs with CLIP cosine similarity below 0.28 should be discarded during web dataset curation; this threshold has become a de facto data quality standard used widely in Foundation Model pre-training pipelines.

    Limitations and Known Failure Modes

  • Social and Demographic Biases: Training on unfiltered web data embeds demographic, geographic, occupational, and cultural biases. Studies have shown that CLIP associates certain occupations disproportionately with specific genders and ethnicities, reflecting and potentially amplifying societal stereotypes. This is a critical concern for deployments in Computer Vision systems used in hiring, policing, or healthcare.

  • Compositional and Relational Reasoning: CLIP struggles with tasks requiring attribute binding, counting, spatial relationships, and negation. WinoGround results show CLIP at chance performance on many relational reasoning items, despite strong aggregate benchmark scores. This limits its utility for Augmented Reality spatial reasoning tasks and robotic manipulation planning.

  • Fine-Grained Discrimination: CLIP cannot reliably distinguish visually similar fine-grained categories (bird species, car models, medical abnormalities) without domain-specific fine-tuning, because the natural-language supervision it was trained on rarely contains the precise taxonomic or clinical terminology that distinguishes these categories.

  • Domain Gap for Specialised Imaging: Medical imaging (radiology, pathology), satellite imagery, industrial inspection imagery, and scientific visualisations are severely underrepresented in WIT. CLIP representations are weak for these domains without domain-specific contrastive pre-training (e.g., BioMedCLIP for clinical images, RemoteCLIP for satellite imagery).

  • Prompt Sensitivity and Brittleness: Small changes in wording, punctuation, or template structure can shift zero-shot accuracy by 5-10 percentage points. This brittleness makes Prompt Engineering a critical and fragile component of CLIP-based classification pipelines, and complicates deployment in systems that must be robust to diverse user inputs.

  • Text Length Limitation: The 77-token BPE limit truncates long descriptions. For tasks involving detailed scene descriptions, long captions, or multi-sentence text, information loss at truncation can significantly degrade performance.

  • English Centricity: The original CLIP and most OpenCLIP checkpoints are overwhelmingly trained on English text. Zero-shot performance degrades substantially for non-English queries; multilingual variants (mSigLIP, SigLIP 2’s multilingual checkpoint) address this but at some cost to English performance.

  • Closed Training Data: OpenAI has not publicly released the WIT training dataset. The open-source alternative, LAION-5B, has faced legal scrutiny regarding copyright and consent for the web-scraped images and captions, creating regulatory uncertainty for models trained on it.

    Key Terminology

  • InfoNCE Loss: Information Noise-Contrastive Estimation loss; the contrastive objective that maximises mutual information between matched pairs by treating unmatched in-batch pairs as noise

  • Zero-Shot Transfer: Applying a model trained on one task distribution to a different task without any task-specific training examples

  • Dual-Encoder Architecture: A two-tower design in which each modality is independently encoded into a shared embedding space; enables efficient pre-computation of embeddings

  • Prompt Engineering: The practice of crafting natural-language templates to maximise downstream task performance in zero-shot or few-shot settings

  • CLIP Score: The cosine similarity between an image embedding and a text embedding from CLIP; widely used as a proxy for image-text semantic alignment in generative model evaluation and dataset filtering

  • WIT (WebImageText): The 400M image-text pair proprietary dataset used to train the original CLIP; not publicly released

  • Temperature Parameter (τ): A learned scalar that controls the sharpness of the similarity distribution before softmax in the contrastive loss; lower values make the distribution peakier

  • OpenCLIP: Open-source CLIP reproduction by the LAION community and BAAI; provides reproducible training code and over 100 public checkpoints trained on LAION-400M and LAION-5B

  • SigLIP: Sigmoid Loss for Language Image Pre-training; removes batch-size dependence of the InfoNCE softmax normalisation by using a pairwise sigmoid loss

  • LAION-5B: The largest openly available image-text dataset (5.85 billion pairs), curated using CLIP-score filtering; the foundation for most open-source CLIP training runs

  • WIT (WebImageText): 400 million image-text pairs from the internet, proprietary to OpenAI; the training set for the original CLIP models

  • DataComp: Benchmark and dataset competition for CLIP data curation; demonstrates that data quality (smart filtering) matters as much as data scale for CLIP representation quality

  • CLIP-FID: Fréchet Inception Distance computed using CLIP ViT-L/14 features instead of Inception-v3; provides more semantically meaningful image distribution distance for generative model evaluation

  • Open-Vocabulary Detection: Object detection where the set of detectable classes is not fixed at training time; specified via natural-language descriptions at inference; enabled by CLIP-derived feature representations in systems such as OWL-ViT and Grounding DINO

  • EVA-CLIP: Family of billion-parameter CLIP models from BAAI; uses enhanced training with masked image modelling combined with contrastive loss; largest variant reaches 18B parameters and 80.7% ImageNet zero-shot

  • CoCa (Contrastive Captioners): Combines InfoNCE contrastive loss with a generative captioning loss; enables CLIP-style retrieval plus image captioning from a single model; developed by Google Research (2022)

    How CLIP Differs from Earlier Visual Representation Models

    To appreciate CLIP’s significance it is helpful to contrast it with the representation learning approaches it superseded:

  • ImageNet-Supervised CNNs (AlexNet, VGG, ResNet, 2012-2019): Trained on 1.28M manually labelled images from 1,000 classes. The label set is closed and the semantic coverage is determined entirely by the annotation team’s taxonomic choices. Transfer to new domains requires re-labelling data and retraining classification heads. CLIP eliminates both constraints: 400M web-sourced pairs with open vocabulary coverage and zero-shot transfer without any task-specific labels.

  • Self-Supervised Visual Representations (SimCLR, MoCo, DINO, 2020-2022): Learn visual representations from unlabelled images using augmentation-based or self-distillation contrastive objectives. These produce rich visual features but have no text alignment and therefore no zero-shot capability. Downstream tasks still require labelled data for each new classification or detection task. CLIP’s text alignment changes the economics of new-task deployment fundamentally.

  • Visual-Semantic Embedding (VSE, DeViSE, 2013-2016): Early attempts to align image and word-embedding spaces (GloVe, Word2Vec). Limited by word embedding quality and small training datasets (tens of thousands of pairs). CLIP’s scale (400M pairs) and use of transformer language models as the text encoder produce qualitatively superior cross-modal alignment that handles paraphrase, context, and compositional descriptions that word-vector models cannot.

  • ALIGN and Florence (Google and Microsoft, 2021): Direct contemporaries using similar dual-encoder contrastive objectives. ALIGN used 1.8B noisy pairs; Florence added multi-task heads for detection and captioning. Both systems independently validated CLIP’s core approach, establishing the dual-encoder contrastive framework as the consensus paradigm for vision-language pre-training.

  • BLIP-2 (Salesforce, 2023): Extended the CLIP framework by introducing a Q-Former (Querying Transformer) connector between a frozen CLIP encoder and a frozen large language model (OPT, FlanT5). The Q-Former extracts a fixed number of visual query tokens from CLIP features and passes them to the language model, achieving competitive VQA and image captioning while training only the lightweight connector. This architecture — frozen CLIP + lightweight connector + frozen LLM — became the dominant VLM design template, used by InstructBLIP, mPLUG-Owl2, and related systems.

    CLIP Model Family Comparison Table

ModelYearParamsTraining DataImageNet ZS Top-1COCO I2T R@1Notes
CLIP ViT-B/322021150MWIT-400M63.2%58.4Original OpenAI release
CLIP ViT-L/142021428MWIT-400M75.5%65.7Best original variant
CLIP ViT-L/14@3362021428MWIT-400M76.2%67.0Higher resolution input
OpenCLIP ViT-H/142022986MLAION-2B78.0%73.4Open-source, LAION data
OpenCLIP ViT-G/1420221.8BLAION-2B78.5%74.0Largest standard OpenCLIP
SigLIP ViT-B/162023150MWebLI76.7%65.1Sigmoid loss, no batch-norm
EVA-CLIP-18B202418BLAION+COYO80.7% avg—Largest open CLIP model
SigLIP 2 ViT-B/162025150MWebLI++79.1%69.7+captioning, +distillation
MetaCLIP ViT-L/142023428MCommonCrawl76.2%69.1Curated data balance
Jina-CLIP v22024865MLAION+text70.0%—Joint image-text+text-text

Evaluation Results and Comparisons

Zero-Shot ImageNet Performance (top-1 accuracy):

  • CLIP ViT-B/32 (OpenAI, 2021): 63.2%

  • CLIP ViT-L/14@336 (OpenAI, 2021): 76.2% — equivalent to supervised ResNet-50

  • OpenCLIP ViT-H/14 on LAION-2B (2022): 78.0%

  • EVA-CLIP-18B (BAAI, 2024): 80.7% averaged across 27 benchmarks — open-source SOTA

  • SigLIP 2 ViT-B/16 (Google, 2025): 79.1% — at B/16 scale, surpasses all prior variants

  • Supervised ResNet-50 baseline: 76.2% — this is the target CLIP aimed to match at zero-shot

  • Supervised ViT-L/16 on ImageNet-21K: 87.8% — upper bound for supervised vision models

    MSCOCO Retrieval (image-to-text R@1):

  • CLIP ViT-L/14 (2021): 65.7 — original baseline

  • OpenCLIP ViT-H/14 LAION-2B (2022): 73.4 — open-source improvement

  • SigLIP ViT-B/16 (2023): 65.1 — comparable despite smaller model

  • SigLIP 2 ViT-B/16 (2025): 69.7 — +4.6 points from richer training recipe

  • CoCa ViT-G/14 (2022): 75.7 — benefits from captioning objective

    Compositional Reasoning (WinoGround):

  • CLIP ViT-L/14: 30.4% text score, 11.4% image score — barely above chance (25%)

  • This exposes the fundamental limitation of bag-of-words text understanding in CLIP

  • Structured CLIP variants with compositional training improve to ~38-42% on WinoGround

  • Foundation Model: Pre-trained large model adaptable to many downstream tasks; CLIP is the canonical vision-language foundation model

  • Contrastive Learning: Self-supervised approach training representations by comparing positive/negative pairs; CLIP’s core training paradigm

  • Vision Transformer: Transformer applied to image patches; the dominant CLIP vision encoder architecture since 2021

  • Transformer Architecture: The universal sequence-to-sequence architecture underlying both CLIP encoders

  • Self-Supervised Learning: Learning representations without human labels; CLIP’s web-scraped image-caption data serves as self-supervision

  • Zero-Shot Learning: Performing tasks without task-specific training examples; CLIP’s primary and most remarkable capability

  • Cross-Modal Retrieval: Retrieving items from one modality (images) using queries in another (text); CLIP’s primary retrieval application

  • Embedding Space: A vector space in which semantic similarity is captured by geometric proximity; CLIP creates a shared multimodal embedding space

  • Transfer Learning: Using representations learned on one task for another; CLIP’s representations transfer broadly across visual tasks

  • Multimodal AI: AI systems processing multiple input/output modalities; CLIP is foundational infrastructure for multimodal AI

  • Stable Diffusion: Open-source text-to-image diffusion model that uses CLIP text encoders for conditioning

  • Augmented Reality: Overlaying digital content on physical reality; CLIP enables semantic scene understanding for AR

  • Prompt Engineering: Crafting effective natural-language inputs to optimise model behaviour; critical for CLIP zero-shot classification

    Prompt Engineering Best Practices for CLIP

    Effective CLIP zero-shot classification requires careful prompt design. The following practices are recommended based on empirical analysis from Radford et al. (2021) and subsequent work:

  • Use contextual templates rather than bare class names:

    • Bad: “dog”
    • Good: “A photo of a dog”
    • Better: “A photo of a {label}, a type of pet”
    • Best (for specific domains): “A satellite image of a {label}” (for remote sensing)
  • Template ensembling: Average text embeddings over 80 diverse templates; yields +3.5pp ImageNet top-1 versus single template

  • Domain-specific templates: Choose templates appropriate to the deployment domain:

    • Medical: “A chest X-ray showing {disease}”
    • Art: “A painting in the style of {artist}”
    • Food: “A photo of {food}, a type of food”
    • Document: “A scanned page of a {document type}”
  • Avoid ambiguous class names: “Jaguar” is ambiguous (car vs animal); use “Jaguar automobile” or “jaguar cat” to disambiguate

  • Handle multi-word classes: Hyphenate or naturalise compound class names for consistent tokenisation

  • Soft prompt tuning (CoOp, CoCoOp): Learnable continuous prompt tokens prepended to class embeddings; improves few-shot accuracy by 5-15pp at the cost of requiring a few labelled examples per class

  • WaffleCLIP (random textual descriptors): Demonstrates that even random word concatenations around class names improve zero-shot accuracy, suggesting CLIP is sensitive to text length and context rather than purely semantic content

    Accessibility and Computational Requirements

    CLIP is widely accessible through multiple distribution channels, making it one of the most widely deployed Foundation Model architectures in both research and production:

  • OpenAI CLIP (original):

    • Repository: github.com/openai/CLIP (MIT licence)
    • Models: ViT-B/32 (151MB), ViT-B/16 (585MB), ViT-L/14 (890MB), ViT-L/14@336 (891MB)
    • Minimum requirements: Python 3.7+, PyTorch 1.7.1+, CUDA 10.1+ (GPU optional for inference)
    • RAM: 4GB minimum; 16GB recommended for ViT-L/14
  • HuggingFace transformers integration:

    • from transformers import CLIPModel, CLIPProcessor
    • Supports all major CLIP variants; standardised preprocessing pipeline
    • Widely used in research and production Python stacks
  • OpenCLIP (open-source):

    • Repository: github.com/mlfoundations/open_clip (MIT licence)
    • 100+ pretrained checkpoints on LAION-400M, LAION-2B, DataComp, CommonCrawl
    • Supports ViT-B, ViT-L, ViT-H, ViT-G, ConvNeXt backbones
  • Apple Core ML: CLIP ViT-B/32 converted to Core ML for on-device inference on iPhone 12+ and Apple Silicon; enables privacy-preserving local semantic search without server round-trips

  • TensorRT Deployment: NVIDIA TensorRT-optimised CLIP variants achieve 4-8× inference speedup on NVIDIA GPUs; widely used in production visual search infrastructure

  • ONNX Export: CLIP models exported to ONNX format for runtime-agnostic deployment (OpenVINO, ONNX Runtime, TensorRT); enables deployment on AMD GPUs, Intel CPUs, and edge inference hardware

    CLIP in the Broader AI Ecosystem

    CLIP occupies a unique position in the modern AI stack as both a standalone capability and a foundational component for downstream systems. Understanding its ecosystem relationships clarifies its strategic importance:

    As a Component in Generative AI: The text-to-image generation pipeline — arguably the highest-visibility consumer AI application of 2022-2026 — depends critically on CLIP. In Stable Diffusion 1.x, the text encoder is CLIP ViT-L/14, whose output embeddings directly condition the U-Net denoising network via cross-attention. This means that every Stable Diffusion image generation is implicitly a CLIP inference. Stable Diffusion XL (2023) uses two CLIP text encoders in parallel (CLIP ViT-L/14 and OpenCLIP ViT-bigG/14), concatenating their outputs for richer conditioning. DALL-E 2 (OpenAI, 2022) uses CLIP image embeddings directly as the conditioning signal for its diffusion model, enabling image variations by conditioning on the CLIP embedding of an input image rather than text. This architecture made CLIP central to the generative AI revolution of 2022-2024.

    As a Retrieval Infrastructure: Pinterest deployed CLIP-based visual search (“Shop the Look”, “Visual Discovery”) at scale, processing billions of image-text retrieval queries monthly. The deployment index contains hundreds of millions of product images encoded by CLIP; users’ text or image queries are encoded by CLIP at inference time and matched via approximate nearest-neighbour search using a custom HNSW-based index. This Pinterest deployment was one of the first at-scale production CLIP systems and demonstrated that CLIP embeddings remain stable and useful for retrieval at billion-scale corpora. Getty Images, Shutterstock, and Adobe Stock subsequently deployed CLIP-based semantic search as the default search modality for their stock image libraries. Unsplash’s “Semantic Search” product was an early open demonstration of CLIP-powered cross-modal image retrieval.

    As an Evaluation Tool: CLIP Score — the cosine similarity between a generated image’s CLIP embedding and the text prompt’s CLIP embedding — has become a standard automatic evaluation metric for text-to-image generation quality, complementing human preference studies. The FID (Fréchet Inception Distance) metric for generative image quality uses Inception-v3 features; CLIP-FID uses CLIP ViT-L/14 features instead, providing a more semantically meaningful distribution-level quality measure. CLIP Score and CLIP-FID are reported in virtually every text-to-image generation paper since 2022.

    As a Training Signal: CLIP rewards are used in RLHF-style fine-tuning of text-to-image models. By maximising CLIP similarity between generated images and their prompts, generators can be fine-tuned to improve prompt adherence without collecting new human preference labels. This CLIP-guided generation (also called CLIP-guided diffusion) was widely used in early open-source image generation systems before human preference RLHF data became available at scale.

    As a Foundation for VLMs: Large vision-language models (GPT-4V, LLaVA, InstructBLIP, CogVLM, Idefics) universally use CLIP or CLIP-derived visual encoders as their vision backbone. The pre-aligned multimodal embedding space that CLIP provides means that much less cross-modal alignment training is required when connecting visual features to a language model decoder — the CLIP encoder has already done the heavy lifting of aligning image and text representations. This architectural choice makes CLIP the default visual feature extractor for the entire frontier VLM ecosystem as of 2026.

    Scaling Laws and Efficiency Research

    CLIP’s performance follows predictable scaling laws similar to those established for large language models. Key findings from the scaling literature as of 2025:

  • Data Scaling: Performance improves monotonically with training dataset size (LAION-400M → LAION-2B → LAION-5B) at fixed model scale; the relationship is approximately logarithmic: doubling the data yields roughly constant absolute accuracy gains

  • Model Scaling: Performance improves predictably with model parameter count (ViT-B → ViT-L → ViT-H → ViT-G); EVA-CLIP-18B demonstrates that scaling to 18B parameters continues to yield substantial gains (80.7% vs 78.5% for ViT-G)

  • Compute-Optimal Training: Chinchilla-style compute-optimal scaling for CLIP has been studied by Zhai et al. (2022, “Scaling Vision Transformers”) and subsequently by DataComp (Gadre et al., 2024), which found that data quality is at least as important as data scale for CLIP at fixed compute — better data curation can match a 4× dataset size increase

  • Batch Size Effects: InfoNCE loss quality is strongly dependent on batch size because more in-batch negatives improve the contrastive signal. SigLIP’s sigmoid loss removes this batch-size dependence, enabling efficient training at much smaller batch sizes without quality degradation — a critical practical improvement for memory-constrained training setups

  • Resolution Scaling: Higher input resolution consistently improves CLIP performance; ViT-L/14@336 (336×336 input) outperforms ViT-L/14@224 by approximately 0.7pp on ImageNet zero-shot, demonstrating that spatial detail in the image embedding adds information beyond what lower-resolution patches capture

  • Architectural Comparisons: ViT encoders consistently outperform ResNet encoders at equivalent parameter counts on zero-shot transfer tasks, but ResNet encoders are more efficient at small scales. The ViT advantage grows with scale, making ViT the dominant choice for all large CLIP models as of 2022 onwards

    CLIP Industry Timeline

  • January 2021: CLIP preprint published on arXiv (arXiv:2103.00020); OpenAI releases weights and inference code under MIT licence

  • May 2021: CLIP presented at ICML 2021; receives broad citation and coverage

  • April 2022: DALL-E 2 released using CLIP image embeddings for conditioning; public awareness of CLIP reaches mainstream AI users

  • August 2022: Stable Diffusion 1.x released using CLIP ViT-L/14 as the text encoder; massive open-source adoption begins

  • September 2022: OpenCLIP ViT-H/14 trained on LAION-2B released, surpassing original CLIP quality with open weights

  • October 2022: LAION-5B dataset released; CLIP-score filtering at 0.28 threshold documented as the curation method

  • October 2022: CLIP-based open-vocabulary detection (OWL-ViT, GLIP) demonstrated at ECCV 2022

  • March 2023: SigLIP (sigmoid loss CLIP) released by Google, removing batch-size dependence

  • July 2023: Stable Diffusion XL released using dual CLIP text encoders

  • August 2023: MetaCLIP introduced, demonstrating that data curation quality is as important as data scale

  • December 2023: EVA-CLIP scaling pushed to 18B parameters; open-source CLIP performance reaches 80.7% ImageNet zero-shot

  • February 2025: SigLIP 2 released by Google DeepMind with captioning, distillation, and multilingual checkpoints; 79.1% ImageNet zero-shot at ViT-B scale

  • 2025-2026: CLIP variants embedded in spatial computing hardware (Apple Vision Pro, Meta Quest Pro, Microsoft HoloLens 2); AR scene understanding applications proliferate

Provenance