Skip to content

Image-language and multimodal models · Image-language and multimodal models · MM003 · Model

SigLIP family, including SigLIP 2

Uses a pairwise sigmoid alignment loss rather than a global softmax over image-text matches. SigLIP 2 extends the family with additional captioning/self-supervised objectives, data curation and…

Partly runs in CodeSplash (Experimental) Component demo, not a trained model CodeSplash's run and the reference's record

In CodeSplash

A CodeSplash method covers part of this entry; some options or variants aren't built yet. The methods that run it are Experimental.

Do it in CodeSplash Run it on your own data. It's in the Experimental lane in the app.

Availability
Partly runs in CodeSplash (Experimental)
Code example
Component demo, not a trained model
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Uses a pairwise sigmoid alignment loss rather than a global softmax over image-text matches. SigLIP 2 extends the family with additional captioning/self-supervised objectives, data curation and multilingual/dense-feature improvements; these are documented family changes, not separate entries for every checkpoint.

Question / objective

Can independent pairwise image-text matching objectives provide strong transferable alignment and support broader visual representations? The learning target replaces a null/alternative hypothesis formulation; benchmark evaluation is a separate statistical task.

Method type and supervision

Model/system family. Image-language or broader multimodal learning using the paired, generated or task-specific supervision described below. This is not a classical significance test.

Architecture / computational structure

Image/text encoders produce similarity logits with learned scale and bias. Original SigLIP applies binary matching supervision per pair; SigLIP 2 adds a richer training recipe and selected variable-resolution/aspect-ratio support.

Assumptions

Paired text remains noisy supervision. Pairwise sigmoid scores are not automatically calibrated real-world match probabilities, because negative sampling and class balance differ from deployment. SigLIP and SigLIP 2 checkpoints require their own preprocessing and objective description.

Formula / computational definition

L=−∑ijlog⁡σ(yij[avˉi⊤tˉj+b])L=-\sum_{ij}\log\sigma(y_{ij}[a\bar v_i^\top\bar t_j+b]), where yij∈{−1,+1}y_{ij}\in\{-1,+1\} marks mismatches/matches, a,ba,b are scale/bias and σ\sigma is logistic. Normalization and additional objectives depend on the release. This captures the central mechanism; consult the primary source for all masks, stages, normalizations and loss terms.

Parameters and notation

Learned/estimated quantities: Encoder/projection weights and similarity scale/bias are learned; the pair label and negative sampling policy are supplied. Additional prediction/distillation modules depend on the family member. Hyperparameters and design choices: Positive/negative ratio, batch/pair count, temperature/bias initialization, resolution, language mixture and auxiliary-loss weights influence learning.

Fitting, fine-tuning, and adaptation

Start with a frozen encoder probe or projection adaptation. Use supported LoRA/partial unfreezing for domain transfer and retain multilingual/retrieval/dense-task validation when those capabilities matter. Do not attribute every SigLIP 2 gain solely to the sigmoid loss. Save the exact trainable-module selection, data split, loss, optimizer and processor configuration; distinguish parameter adaptation from inference-time prompt tuning.

How to use and calibrate

Choose a specific model/processor and task protocol, validate preprocessing on known examples, tune only on a held-out development set and freeze the final evaluation. Compare pairwise and softmax objectives at matched data/compute, and evaluate retrieval, zero-shot labels, dense features and subgroup robustness separately.

Example application

Train or transfer an image-text encoder for retrieval and use its visual features in a larger multimodal assistant.

Interpretation / pitfalls

Watch out

Reported capability is conditional on available visual evidence, data coverage and the chosen task. Compare pairwise and softmax objectives at matched data/compute, and evaluate retrieval, zero-shot labels, dense features and subgroup robustness separately. A successful numeric component example is not evidence that a complete system achieves a published benchmark score.

Python and R code examples

Component: Numerically stable pairwise logistic matching loss. Dependencies: shared NumPy/base-R setup above. Python: executed successfully. R: unexecuted. Complete model training/inference: not run.

Full implementation routes: Python: use the original authors’ released family implementation/configuration and identify the exact SigLIP generation; R: implement the component loss or bridge encoding through reticulate, with model-specific processors.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Component demo, not a trained model — Numerically stable pairwise logistic matching loss.

Shared setup for this chapter
import numpy as np
def softmax(x):
    z = np.asarray(x, dtype=float)
    e = np.exp(z-z.max())
    return e/e.sum()
scores=np.array([[2.,-.5],[-.3,1.5]])
labels=np.array([[1.,-1.],[-1.,1.]])
loss=np.logaddexp(0.,-labels*scores).mean()
print("pairwise sigmoid loss",loss)
R

Component demo, not a trained model — Numerically stable pairwise logistic matching loss.

scores <- rbind(c(2,-.5),c(-.3,1.5))
labels <- rbind(c(1,-1),c(-1,1)); z <- -labels*scores
loss <- mean(pmax(z,0)+log1p(exp(-abs(z))))
print(loss)

Sources

From the CodeSplash reference, entry MM003.