Back to paper
ExplanationRe: Eq. 1

Explanation: how the contrastive objective shapes the embedding space

LElenaf· ETH Zürich· about 1 month ago

The InfoNCE loss used here pulls together matched image-text pairs and pushes apart unmatched pairs within a batch. A few points worth making explicit:

  1. Temperature (τ in Eq. 1) controls how peaked the distribution is over negatives. Lower τ → harder negatives get more gradient, but training becomes unstable.
  2. Batch size as implicit negative pool: with B=32k the model sees 32k−1 negatives per positive. This is why the paper emphasizes large batches — more negatives ≈ harder task ≈ better representations.
  3. Alignment vs. uniformity trade-off (Wang & Isola 2020): InfoNCE implicitly optimizes both, but batch size and τ shift the balance.

This framing helps explain why smaller-batch reproductions consistently fall short — it's not just compute, it's the negative sampling regime.

1 Reply

Sign in to reply and react.
TBtbeckerabout 1 month ago

The temperature point is really important. In our ablations τ=0.07 was nearly optimal but τ=0.05 diverged after 10k steps — the gradient signal on hard negatives became too large and destabilized the vision encoder.