SigLIP Sigmoid Pair Loss
Score every image-text pair on its own as match or not, instead of picking one winner per row. Small batches then train fine.
Why Does This Exist?
Softmax over the batch ties every score together, so small batches give noisy targets and huge batches cost memory. SigLIP treats each of the pairs as its own yes-or-no lesson with label for mates and otherwise. Image retrieval training then works at batch instead of .
This page covers the sigmoid loss only. Dual-encoder matching basics are the ALIGN page, and captioning use is image captioning.
The one idea you need first.
Logit with scale and bias near . Loss per pair is with in . Start very negative because most pairs do not match.
Think of It Like This
Stamping each ticket instead of picking one winner
A raffle judge usually picks one winner per row of tickets. SigLIP instead stamps every ticket yes or no alone. A weak ticket can still pass on its own merits, and a strong row does not suppress its neighbors.
Softmax is the one-winner rule, sigmoid is the stamp, and bias is the strict starting ink. Where it stops: raffle tickets are independent, while image pairs still share encoders.
How It Actually Works
Encode images and texts to unit vectors. Score all pairs with scale and bias. Pay binary logistic loss per pair. Mates pull up, others push down, with no normalization across .
In plain words: lessons per batch replace softmax picks, and absorbs the base rate of non-matches.
Worked example
Let mate logit , . Loss . Non-mate , : loss . Batch gives such terms, mean near early. Raising mate scores and lowering the rest drops each term alone, with no row competition.
Watch Out For
Zero bias that floods early training
Starting scores most negatives as matches and gradients explode. Loss spikes in step one. The fix is standard: init bias near and scale near so negatives start quiet.
The Quick Version
- SigLIP pays binary sigmoid loss on every image-text pair.
- Mates are plus one and all others minus one.
- No batch softmax means small batches work.
- Bias near minus ten handles the match imbalance.
- Retrieval quality matches softmax runs at lower cost.