Bootstrap Your Own Latent (BYOL; Grill and colleagues, NeurIPS 2020) learns representations with no negative pairs at all. An online network predicts a target network's projection of a different augmented view. The target is a slow exponential moving average of the online network. A trivial solution exists (every image maps to the same vector), yet BYOL avoids it in practice, thanks to the asymmetry between an online predictor and a slowly moving target. This page covers the online/target design, the 2 − 2·cos loss, the EMA schedule and why collapse is avoided. In the exercises you implement the loss and a collapse measure, then train BYOL and two ablations on the style-dominated world. Full BYOL reached probe accuracy 0.69 with healthy embedding spread (0.20). Without the predictor it reached 0.53, and without the momentum target 0.33, both with embeddings partly collapsed (spread 0.05–0.06).
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.
Predict your own slower twin
BYOL has two copies of a network. The online copy sees one altered view of an image and tries to predict what the target copy outputs for a different view. The target is not trained directly; it slowly follows the online copy. There are no negatives, nothing pushing different images apart, so in principle the networks could cheat by mapping everything to the same point. Surprisingly, with a predictor and a slow target, they do not. The demo shows what collapse looks like: an embedding whose spread shrinks to a few directions.
Self-supervised learning lab
Effective rank 15.6 of 16 dimensions. Non-contrastive methods need stop-gradients, predictors, centring or variance terms to keep the spectrum from collapsing to a few directions.
Why engineers care
Methods without negatives are robust to batch size and do not need careful negative sampling, which helps when data has few classes or many near-duplicates, as in industrial and sensor imagery.
📝 Quick check (Level 0)
0/3 answered
1. BYOL uses negatives?
2. The target network…
3. The risk without negatives is…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.
Implement the BYOL loss, the EMA update and an embedding-spread collapse measure.
📝 Quick check (Level 2)
0/3 answered
1. BYOL's predictor is…
2. Collapse is caught by monitoring…
3. BYOL without batch norm is possible with…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.
Theory
Why does BYOL not collapse?
The constant map minimises the loss, yet training does not find it.
Analyses (Tian, Chen and Ganguli, 2021) show that, with a predictor and a slowly moving target, the dynamics of gradient descent on the online network do not flow toward the collapsed solution: the predictor learns to track the target’s directions, and the EMA prevents the target from collapsing as fast as the online network would.
Remove either asymmetry and collapse becomes much more likely.
Bootstrapping. The target supplies regression targets that improve as the online network improves, like target networks in reinforcement learning. Its slowness keeps targets stable.
Fragility. Without negatives, success depends on optimisation details: predictor learning rate, momentum schedule, normalisation and training length. Ablations often fail differently in different settings.
📝 Quick check (Level 3)
0/3 answered
1. The constant map is…
2. BYOL's target network resembles…
3. BYOL's success depends on…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.
Do the predictor and the momentum target prevent collapse?
History.
J.-B. Grill et al., “Bootstrap your own latent: a new approach to self-supervised learning” (NeurIPS 2020).
P. Richemond et al. (2020), BYOL works without batch statistics.
Y. Tian, X. Chen and S. Ganguli (ICML 2021), analysis of non-contrastive learning dynamics.
Exercise 2.
Setup: the same style-dominated world and probe as earlier pages. Encoder 32 → 64 → 16, projector and predictor 16 → 32 → 16, 1500 Adam steps (learning rate 0.01), symmetric loss.
Variants: full BYOL (predictor, EMA target with m = 0.99); without the predictor; and without momentum (target = online network).
Measurements: probe accuracy and the spread of the normalised embeddings.
variant
probe accuracy
embedding spread
raw observations
0.522
0.176
BYOL
0.686
0.204
no predictor
0.534
0.059
no momentum
0.330
0.051
BYOL works without negatives: it improves the probe from 0.52 to 0.69 and keeps a healthy spread.
Removing either asymmetry causes partial collapse: spread falls by a factor of 3–4, and accuracy drops to raw level or below.
Seeds: with seeds 1 and 2, BYOL beat both ablations again (0.73 and 0.64 against 0.59 and 0.51 without the predictor, 0.47 and 0.50 without momentum).
The no-momentum result depended on settings: at learning rate 0.003 that variant did not collapse (0.67), a reminder of how fragile non-contrastive training is.
BYOL stayed below SimCLR here (0.69 vs 0.78) in this small setting.
🐍 Exercise 2 (research): do the predictor and the momentum target prevent collapse?
Train BYOL and ablations without the predictor and without momentum, measuring probe accuracy and embedding spread.
BYOL in AI, robotics and aerospace
Few-class sensor data: pre-training where negatives are often false negatives (many near-identical scenes).
Robotics: bootstrapped targets also appear in reinforcement learning and world models.
Design lesson: without negatives, guard against collapse explicitly. Monitor spread or rank, and ablate the asymmetries in your own setting.
References
J.-B. Grill et al. (2020). “Bootstrap your own latent: a new approach to self-supervised learning.” NeurIPS.
Y. Tian, X. Chen and S. Ganguli (2021). “Understanding self-supervised learning dynamics without contrastive pairs.” Proc. ICML.
P. H. Richemond et al. (2020). “BYOL works even without batch statistics.” arXiv:2010.10241.
BYOL 0.69 (spread 0.20); without predictor 0.53 (0.06), without momentum 0.33 (0.05).
Practice
Show:
Level 0
Problem 1Level 0
Year BYOL appeared at NeurIPS?
2020.
Problem 2Level 0
Negatives used by BYOL?
0.
Problem 3Level 0
BYOL loss for orthogonal p and z’?
2.
Level 1
Problem 4Level 1
BYOL loss for opposite p and z’?
4.
Problem 5Level 1
τ at the start of BYOL’s schedule?
0.996.
Problem 6Level 1
Symmetric loss for halves 0.3 and 0.5?
0.8.
Problem 7Level 1
τ halfway through the schedule (τ_base = 0.996)?
1 − 0.004·0.5 = 0.998.
Level 2
Problem 8Level 2
BYOL probe accuracy in exercise 2?
0.686.
Problem 9Level 2
Probe accuracy without the predictor?
0.534.
Problem 10Level 2
Probe accuracy without momentum?
0.33.
Problem 11Level 2
BYOL embedding spread?
0.204.
Problem 12Level 2
Ratio of no-momentum to BYOL spread (0.051/0.204)?
0.25.
Problem 13Level 2
Embedding spread without the predictor?
0.059.
Level 3
Problem 14Level 3
Prove that ‖p/‖p‖ − z/‖z‖‖² = 2 − 2 cos(p, z).
With unit vectors u = p/‖p‖ and v = z/‖z‖: ‖u − v‖² = ‖u‖² + ‖v‖² − 2u·v = 1 + 1 − 2 cos(p, z) = 2 − 2 cos(p, z). ∎
Problem 15Level 3
Explain why the no-momentum ablation collapsed here.
With the target equal to the online network, both branches move together, and the gradient can shrink differences between views simply by shrinking the embedding’s diversity on both sides at once. Nothing slows the target’s collapse relative to the online network, so the dynamics drift toward a low-spread solution (spread 0.05) that carries little class information. ∎
Problem 16Level 3
Compare BYOL with MoCo.
Both use a momentum target encoder. MoCo contrasts queries against many negatives from a queue (uniformity pressure prevents collapse). BYOL has no negatives and regresses targets through an extra predictor, relying on asymmetry and slow targets. BYOL is less sensitive to batch size and false negatives, but more fragile to optimisation details. ∎
Problem 17Level 3
Advise on self-supervised pre-training on near-duplicate factory images.
Negatives would often be near-duplicates (false negatives), so prefer a non-contrastive method such as BYOL, VICReg or SimSiam. Monitor embedding spread and effective rank, follow published settings (predictor, τ schedule, normalisation), and evaluate on labelled defect tasks with linear probes and few-label fine-tuning. ∎
Level 4
Problem 18Level 4
BYOL probe accuracy with seed 1?
0.73.
Problem 19Level 4
Embedding spread without momentum?
0.051.
Problem 20Level 4
Training steps in exercise 2?
1500.
Coding practice
🐍 Code 1 (Level 0): pair loss
2 − 2·cos.
🐍 Code 2 (Level 0): τ schedule
Cosine rise to 1.
🐍 Code 3 (Level 0): negatives
BYOL's count.
🐍 Code 4 (Level 0): spread ratio
collapsed / healthy.
🐍 Code 5 (Level 0): symmetric loss
Sum both directions.
Topic test
A timed test drawn at random from this topic's question bank. Each attempt gets new questions. For a longer test across the whole chapter, see the chapter test, or mix topics in the question bag.
BYOL: topic test
10 questions, drawn at random from a bank of 21. Every attempt is different.
⏱ Time limit: 15 minutes. The test submits itself when time runs out.
Levels covered: 0, 1, 2, 3, 4. No hints or solutions until you submit.