Why Contrastive Unsupervised Learning Works: A Theoretical Analysis

Arora, Khandeparkar, Khodak, Plevrakis, Saunshi · ICML 2019 · latent classes → Jensen → linear classification
arXiv 1902.09229PMLR PDFInteractive page

Latent classes: hidden labels that only the theory sees

Pick class c ~ ρ, draw x and x⁺ from D_c. Draw the negative x⁻ from the marginal, ignoring the anchor. Same-class negatives are class collisions.

Collision matrix: P(anchor class i, negative class j) = ρᵢρⱼ

Diagonal cells are collisions. Their sum is τ = Σρᵢ². Hover a cell. Skewed ρ is Illustrative, not from the paper.

Proof chain: unsupervised loss bounds the mean classifier (Lemma 4.3, Theorem 4.1)

Click a box or use the buttons to step through.

Jensen's inequality: ℓ(E t) ≤ E ℓ(t) for convex ℓ

ℓ shown is the logistic loss log(1+e^−t), as a generic convex loss. Two stand-in scores t₁, t₂ around a mean.

Block averaging (CURL): averages sit closer to the class mean

Simulated Gaussian cloud Illustrative — measured in this toy, not a paper result.

The price of random negatives: τ versus number of classes

Uniform ρ gives τ = 1/K. Log–log axes. The correction factor is 1/(1−τ).

Theorem 4.5 anatomy: what sits on the right-hand side

L_sup ≤ L_diff + λ·s(f) + η·Gen, with λ = c·τ/(1−τ), η = 1/(1−τ). Values below are Illustrative: c = 1, L_diff = 0.30, Gen = 0.05. The paper estimates none.

Figure 1 counterexamples: contrastive is not competitive in general

Reported accuracy (average binary tasks, %)

Numbers as stated in the episode. Y axis is truncated at 80. No seeds or variance reported.

More negatives: chance at least one collides

P = 1 − (1 − 1/K)^k for uniform classes. This is plain arithmetic, not a paper measurement.

Does more always help? Two stories Illustrative

Schematic shapes only, no values. Theorem 6.1: the coefficient on s grows with k. SimCLR and MoCo report gains from many negatives.

Evidence audit: what is proven, simulated, tested, evaluated

Hover a cell. Green = yes, orange = partial or directional, red = no. This summarizes the episode's critique.

Open experiment: degrade the independence assumption

Positives are assumed independent given the class. Adjacent windows share tokens. Overlap shown is a drawing, not data.

References