Skip to content
AI360Xpert
Beta

BYOL Without Negatives

Train one net to predict what a slow copy sees in another crop of the same photo. No strangers needed, so collapse must be stopped another way.

BYOL predicts the slow target view without any negative pairs
BYOL predicts the slow target view without any negative pairs

Why Does This Exist?

Negative pairs cost memory and can wrongly push two dogs apart. BYOL asks whether positives alone suffice. It keeps an online net plus a slow target, predicts across views, and blocks gradient into the target. The siamese network shape stays, but the contrastive loss goes away.

This page covers predictor plus stop-gradient only. Cluster variants live in pages like SwAV, linked from image retrieval.

The one idea you need first.

Stop-gradient means the target branch gives a number but takes no update from this loss. Only the online weights move by gradient; the target follows by slow momentum m=0.996m = 0.996.

Think of It Like This

Tracing a teacher who walks very slowly

A student traces drawings taped on a slow walker. The walker moves a little each day, so yesterday tracing still helps today. The student never sees other walkers, yet her hand gets steadier because the target keeps drifting just out of reach.

The online net is the student, the target is the walker, and the predictor is her pencil grip. Where it stops: a real student could freeze her hand and claim success, while BYOL asymmetry keeps that trivial answer unstable.

How It Actually Works

Encode view v1v_1 with online encoder ff then predictor qq to get p=q(f(v1))p = q(f(v_1)). Encode view v2v_2 with target encoder ftf_t to get z=ft(v2)z = f_t(v_2), with no gradient into zz. Minimize L=2−2⋅sim(p,z)L = 2 - 2 \cdot \mathrm{sim}(p,z), which is squared error on unit vectors. Update ft=mft+(1−m)ff_t = m f_t + (1-m) f with m=0.996m = 0.996.

In plain words: qq adds the asymmetry, mm sets target slowness, and LL is zero only when prediction matches the slow view.

Worked example

Let unit vectors p=[0.8,0.6]p = [0.8, 0.6] and z=[0.85,0.53]z = [0.85, 0.53]. Norms are 1.01.0 and 0.7225+0.2809=1.0034≈1.002\sqrt{0.7225+0.2809} = \sqrt{1.0034} \approx 1.002. Dot is 0.68+0.318=0.9980.68 + 0.318 = 0.998. Cosine is 0.998/1.002≈0.9960.998/1.002 \approx 0.996. Loss is 2−2×0.996=0.0082 - 2 \times 0.996 = 0.008. A collapsed constant gives high error once the target drifts, so only tracking views keeps loss this low.

Watch Out For

Removing the predictor and collapsing quietly

Without qq, online and target can match by outputting one constant. Loss hits zero while features carry nothing. The symptom is zero loss plus chance-level probes. Keep the predictor and check linear probes, not just the loss.

The Quick Version

  • BYOL matches an online prediction to a slow momentum target with no negatives.
  • Predictor plus stop-gradient supply the asymmetry that stops collapse.
  • Momentum 0.996 keeps the target stable across steps.
  • Loss is cosine distance on unit vectors.
  • Probe the encoder, since the loss alone can hide collapse.