Paper commentary
Bootstrap your own latent: A new approach to self-supervised Learning
- Problem Contrastive self-supervised methods need negative pairs, which demand large batches, memory banks or careful mining, and their accuracy depends heavily on the augmentations used.
- Method BYOL trains an online network to predict a target network's projection of a differently augmented view of the same image, with the target updated as a slow exponential moving average of the online weights and a predictor applied only on the online branch.
- Results Reached 74.3% top-1 accuracy under linear evaluation with ResNet-50 (1×) on ImageNet, and 79.6% with ResNet-200 (2×).
Why negative pairs are a bottleneck
State-of-the-art contrastive methods learn image representations by pulling together representations of two augmented views of the same image and pushing apart representations of views taken from different images. Keeping the push effective means handling negatives with care, either through large batch sizes, a memory bank or customized mining, and the accuracy of these methods also depends strongly on which augmentations are chosen.
Contrastive approaches need many negatives because each representation has to be separated from many other examples to make the discrimination task hard enough. Bootstrapping methods such as DeepCluster drop the negatives, but they need a costly clustering phase and specific precautions against trivial solutions.
Predicting one augmented view's representation from another, with no discriminative term, invites collapse, because a constant output is trivially predictable. The open question is whether negatives are indispensable for preventing collapse while keeping high performance.
How the online and target networks interact
BYOL keeps two networks with the same architecture but separate weights, an online network with weights θ and a target network with weights ξ. The online network is made of an encoder f_θ, a projector g_θ and a predictor q_θ, and the target network supplies the regression targets for the online network.
The target weights follow the online weights through an exponential moving average, applied after every training step with a target decay rate τ between 0 and 1. The update takes the form \[ \xi \leftarrow \tau\xi + (1-\tau)\theta \], so a value of τ close to 1 keeps the target changing slowly.
From one image, two augmented views v and v′ are drawn with two different augmentation distributions. The online branch maps v to y_θ and then to a projection z_θ, while the target branch maps v′ to y′_ξ and then to a projection z′_ξ, with the predictor applied only to the online projection. Both the prediction q_θ(z_θ) and the target projection z′_ξ are ℓ2-normalized before they are compared.
The loss is the squared distance between the normalized prediction and the normalized target projection, which equals \[ \mathcal{L}_{\theta,\xi} = 2 - 2\cdot \frac{\langle q_\theta(z_\theta), z'_\xi\rangle}{\lVert q_\theta(z_\theta)\rVert_2 \cdot \lVert z'_\xi\rVert_2} \]. The loss is symmetrized by feeding the two views to the opposite branches, and the sum of both terms is minimized with respect to θ only, with the stop-gradient keeping gradients away from the target branch.
The optimizer updates θ with the gradient of this total loss and a learning rate η, and the target weights ξ are then moved by the moving average.
At the end of training only the encoder f_θ is kept, and its output y_θ is used as the image representation for downstream tasks. The number of inference-time weights is counted only for this encoder when BYOL is compared with other methods.
Why the predictor and slow target prevent collapse
Because BYOL has no explicit term that prevents collapse, a reader might expect the parameters to settle at a constant representation that minimizes the loss. The authors hypothesize that BYOL's dynamics is not gradient descent on any single loss over θ and ξ jointly, which is similar to GANs, and that undesirable equilibria are unstable rather than attractive.
Under that derivation a constant feature in z_θ is penalized, because conditioning on a constant cannot reduce the variance of the target projection the way a varying online projection can.
A hard copy of the online weights into the target would also propagate new sources of variability, but sudden changes could break the assumption that the predictor is near optimal. The authors hypothesize that the main role of the moving-averaged target is to keep the predictor near optimal throughout training, and they cite ablations as empirical support for that reading.
Training configuration
The augmentation pipeline follows SimCLR: a random patch is resized to 224×224 with a random horizontal flip, then a color distortion is applied, followed by Gaussian blur and solarization. The color distortion is a random sequence of brightness, contrast, saturation and hue changes with an optional grayscale conversion.
The base encoder is a ResNet-50 (1×) v1 whose pooled representation has 2048 features, and the projector is a multi-layer perceptron with a 4096-unit linear layer, batch normalization, ReLU and a final 256-dimensional linear layer. Unlike SimCLR, the output of this projector is not batch normalized, and the predictor uses the same architecture as the projector.
The main run uses the LARS optimizer with a cosine decay learning rate schedule over 1000 epochs and a 10-epoch warm-up. The target decay rate starts from τbase = 0.996 and rises to one during training through the cosine schedule τ = 1−(1−τbase)·(cos(πk/K)+1)/2, with k the current step and K the total number of steps. The batch size is 4096 split over 512 Cloud TPU v3 cores, and training of ResNet-50 (×1) takes about 8 hours.
ImageNet linear evaluation results
Under linear evaluation, a linear classifier is trained on the frozen BYOL encoder and its accuracy is measured on the ImageNet test set. With a standard ResNet-50 (1×), BYOL reaches 74.3% top-1 and 91.6% top-5 accuracy, a 1.3% improvement over the previous self-supervised best reported in the comparison table, InfoMin Aug. at 73.0. The gap to the supervised baseline of 76.5% narrows but does not close, and the stronger supervised baseline of 78.9% remains higher.
With wider or deeper encoders BYOL reaches 78.6% on ResNet-50 (4×), close to the 78.9% of the best supervised baseline for that architecture. Comparing across encoder sizes, the ResNet-200 (2×) model uses 30% fewer parameters than the previous state of the art, which the authors report as 76.8%.
The comparison table lists top-1 and top-5 accuracies for each method under linear evaluation, which lets the ResNet-50 entries be read against the other self-supervised methods in one place.
Semi-supervised and transfer results
In the semi-supervised setting, the pretrained encoder is fine-tuned with fixed splits of 1% and 10% of the ImageNet training labels. When fine-tuning uses 100% of the ImageNet labels with ResNet-50, BYOL reaches 77.7% top-1.
On the transfer classification benchmarks, BYOL is compared with SimCLR and with the Supervised-IN baseline across 12 datasets under both linear evaluation and fine-tuning. BYOL outperforms SimCLR on all 12 benchmarks and outperforms Supervised-IN on 7 of them, while being slightly worse on the other 5.
On VOC2012 semantic segmentation BYOL is 1.9 mIoU above Supervised-IN and 1.1 mIoU above SimCLR. On object detection with Faster R-CNN, fine-tuned on VOC2007 trainval and scored on test2007, BYOL is 3.1 AP50 above Supervised-IN and 2.3 AP50 above SimCLR. On NYU v2 depth estimation, evaluated on 654 test images, BYOL raises the pct. < 1.25 score by 3.5 points over the supervised baseline and by 1.3 points over SimCLR, and it is better or on par on every metric in the table.
What the ablations isolate
Accuracy is top-1 under linear evaluation on ImageNet.
Batch size is varied from 128 to 4096 by averaging gradients over several steps, while the target is updated once every N steps. SimCLR deteriorates rapidly as batch size shrinks, while BYOL stays stable from 256 to 4096 and drops only at smaller sizes, which the authors attribute to batch normalization layers in the encoder.
With random crops as the only augmentation, BYOL reaches 59.4%, which is 13.1 points below its 72.5% baseline, while SimCLR falls to 40.3%, which is 27.6 points below its 67.9% baseline. The authors explain the gap by saying that crops of one image share color histograms, so a contrastive objective built on crops can be solved from color alone, whereas BYOL's prediction of the target keeps pushing information into the online network.
With a constant random target the representation reaches 18.8% ± 0.7 top-1, while the random network alone reaches 1.4%. Decay rates from 0.9 to 0.999 all stay above 68.4%, while an instant copy destabilizes training and never updating the target keeps training stable but stops iterative improvement.
Removing the predictor turns BYOL into an unsupervised Mean Teacher variant without a classification loss, and this variant collapses, which suggests the predictor is needed to prevent collapse without labels. Removing the target network can still avoid collapse if the predictor is kept near optimal, by using an optimal linear predictor that reaches 52.5% or by raising the predictor learning rate, which reaches 66.5%.
Limitations
BYOL still depends on augmentations designed for vision, and the authors note that obtaining comparable augmentations for audio, video or text would need significant effort and expertise. The authors identify automating the search for such augmentations as the next step for other modalities, and no experiment in the reported units applies BYOL to a non-vision modality.
Removing weight decay makes the network diverge in both BYOL and SimCLR, so the method depends on weight regularization. The ablations are run at 300 epochs on 64 TPU v3 cores, while the main results use 1000-epoch training.
The authors did not observe convergence to undesirable equilibria in their experiments, but the claim that those equilibria are unstable rests on the hypothesis and the derivation under an optimal predictor.
Paper info
- Authors
- Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H. Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, Michal Valko
- Venue
- arXiv · Preprint
- First published
- 2020-6-13
- Added
- 2026-10-20
- Updated
- 2020-9-10
- Version
- v3
- arXiv
- 2006.07733
- Category
- cs.LG · cs.CV · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H. Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, Michal Valko (2020). Bootstrap your own latent: A new approach to self-supervised Learning. arXiv:2006.07733v3. https://arxiv.org/abs/2006.07733v3
BibTeX
@misc{grill2020bootstrap,
title = {{Bootstrap your own latent: A new approach to self-supervised Learning}},
author = {Jean-Bastien Grill and Florian Strub and Florent Altché and Corentin Tallec and Pierre H. Richemond and Elena Buchatskaya and Carl Doersch and Bernardo Avila Pires and Zhaohan Daniel Guo and Mohammad Gheshlaghi Azar and Bilal Piot and Koray Kavukcuoglu and Rémi Munos and Michal Valko},
year = {2020},
eprint = {2006.07733},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2006.07733v3}
}