The objective of multi-modal AI is to bridge the gap between disparate data types—text, images, and audio—by mapping them into a shared, semantically meaningful latent space. This article explores the architectures that enable cross-modal retrieval, focusing on the evolution from CLIP's contrastive loss to the more scalable SigLIP.
The CLIP model, introduced by OpenAI in 2021, established the current paradigm for Multi-Modal alignment.
CLIP utilizes two independent encoders:
For a given image-text pair(i, t), the model generates embeddings\mathbf{z}_i = E_I(i)and\mathbf{z}_t = E_T(t).
CLIP is trained on a massive dataset of 400M pairs. The loss function, InfoNCE, forces matching pairs to have high cosine similarity while pushing non-matching pairs apart. For a batch ofNpairs, the loss for imageiis:
SigLIP (Sigmoid Language-Image Pre-training) is a 2023 refinement from Google Research that addresses the scalability limits of CLIP.
The fundamental change in SigLIP is the replacement of the global Softmax loss with a Pairwise Sigmoid Loss. Instead of normalizing similarity over the entire batch, SigLIP treats every image-text combination(i, j)in the batch as an independent binary classification problem: *y_{ij} = 1ifimatchesj(positive pair). *y_{ij} = -1otherwise (negative pair).
The loss is defined as:
Where\beta(gain) andb(bias) are learnable parameters.
Once aligned in the latent space\mathcal{Z}, multi-modal models can perform several tasks:
By embedding potential labels as text (e.g., "a photo of a cat"), we can classify an image by finding the label embedding with the highest cosine similarity to the image embedding.
While CLIP and SigLIP use Late Fusion (dot product of final embeddings), more advanced models use Intermediate Fusion via Cross-Attention:
This allows the visual features to "query" the textual context, enabling more complex reasoning tasks like Visual Question Answering (VQA).
| Feature | CLIP | SigLIP |
|---|---|---|
| Loss Function | InfoNCE (Softmax-based) | Pairwise Sigmoid |
| Normalization | Across the whole batch | Independent per pair |
| Scaling Bottleneck | Communication (All-Gather) | Negligible |
| Best Use Case | Large-scale pre-training on clusters | Scalable training / Fine-tuning |
The transition from CLIP to SigLIP represents a shift from "competition within a batch" to "independent verification of pairs," providing a mathematically cleaner and more computationally efficient path toward Generative AI systems that truly understand the relationship between pixels and prose.