Make the data supply its own target: two views of the same thing must land close in embedding space, and something must stop the trivial answer, every input mapped to one point. The methods differ only in that something: negatives pushed away (contrastive), an asymmetric pair of networks (BYOL, SimSiam, DINO), a statistic of the batch (Barlow Twins, VICReg), or predicting the hidden part of the input (MAE, I-JEPA).
Fig. 1 is one real batch before and after contrastive training: the diagonal stays high, everything else falls.
You need: softmax cross entropy and its gradient p − y (Loss functions), cosine similarity of l2-normalised vectors, and for the masked-modelling section a ViT's patch tokens (ViT paper page). The parent (Topic: ml-fundamentals, "Beyond one network" and "Everything is cross entropy") places this paradigm beside supervised training; this page owns the mechanisms.
detach()), so the gradient flows through the other branch only.| Family | Positive pair, or target | What stops a constant output | Landmarks |
|---|---|---|---|
| Contrastive | two views of one input; an image and its caption | negatives: the rest of the batch, a memory bank or a queue | CPC 2018, SimCLR 2020, MoCo 2019, CLIP 2021, SimCSE 2021 |
| Self-distillation, no negatives | two views of one input | asymmetry: a predictor, a stop-gradient, a slow teacher; DINO adds centering and sharpening | BYOL 2020, SimSiam 2020, DINO 2021, DINOv2 2023, DINOv3 2025 |
| Redundancy reduction | two views of one input | a term on the batch's statistics: each output dimension must vary, dimensions must not correlate | Barlow Twins 2021, VICReg 2021 |
| Masked modelling | the hidden part of the input, in pixels or tokens | nothing needed: the target is the data, so a constant output scores badly | BERT 2018, BEiT 2021, MAE 2021, SimMIM 2021 |
| Joint-embedding prediction | the representation of the hidden part, from a slow target encoder | the EMA target encoder and a predictor, as in self-distillation; or a regulariser on the embeddings (SIGReg) in place of the teacher | data2vec 2022, I-JEPA 2023, V-JEPA 2024, V-JEPA 2 2025, LeWM 2026 (SIGReg) |
Dates are first arXiv versions; each method is sourced where it is described below; the family tree in the closed Depth section puts them on one time axis.
Early self-supervision invented pretext tasks whose answer the data already holds (which rotation was applied, where a patch sits, how to unshuffle a jigsaw); the features were good only insofar as the proxy needed them. Instance discrimination (Wu et al. 2018) made the geometry itself the goal: treat every image as its own class, keep each image's feature in a memory bank rather than a classifier's weights, and use noise-contrastive estimation to cope with a million classes. The losses that state the geometry are older.
The contrastive loss with a margin (Hadsell, Chopra and LeCun 2006) scores one pair at a time at distance d: a similar pair pays ½d2, a dissimilar pair pays ½ max(0, m − d)2, so dissimilar pairs are pushed only while they sit inside the radius m. The triplet loss (FaceNet, Schroff, Kalenichenko and Philbin 2015) compares distances instead of thresholding them: an anchor a, a positive p of the same identity and a negative n, embedded on the unit hypersphere (‖f(x)‖2 = 1, 128 dimensions):
A triplet already separated by the margin contributes nothing, neither loss nor gradient. So the loss lives or dies by which negatives it sees. FaceNet names three kinds: hard (closer than the positive), semi-hard ("further away from the anchor than the positive exemplar, but still hard because the squared distance is close to the anchor-positive distance. Those negatives lie inside the margin α", §3.2) and easy (beyond the margin). It mines them online inside mini-batches of "around 1,800 exemplars" with "around 40 faces" per identity, and picks semi-hard ones because "Selecting the hardest negatives can in practice lead to bad local minima early on in training, specifically it can result in a collapsed model (i.e. f(x) = 0)". The result was 99.63% on LFW and 95.12% on YouTube Faces.
Predict: with FaceNet's margin of 0.2, how many of this batch's 2,256 triplets (48 anchors, 47 negatives each) still contribute anything, before and after contrastive training? Then move the margin.
Two lessons carry over to everything below. A hinge spends its gradient on a handful of triplets and none on the rest, so it needs mining and big pools of candidates. And pushing hardest on the closest negatives can collapse the embedding. InfoNCE answers the first by scoring one positive against all the negatives at once, each weighted by a softmax; as τ → 0 it becomes max(0, maxj sij − sii)/τ, a margin-free hinge on the hardest negative alone derived. Listwise ranking losses are the same softmax over a list: with one relevant item ListNet's top-one loss is InfoNCE (Loss functions, "Ranking losses").
Squared distances 2 − 2 cos from the real cosines of the 48-pair batch (BERT first-last average pooling; SimCSE [CLS]), computed in the page. At α = 0.2, 21 of 2,256 triplets are active under BERT (1 hard, 20 semi-hard) and 1 after SimCSE, the false negative of anchor 31 below; at α = 0.8, 1,825 and 153 derived. Recomputed in src/recompute.py.
On the hero's batch at τ = 0.05, BERT's mean loss is 0.29 nats and SimCSE's 0.04, and after SimCSE the single most similar negative takes almost half of each anchor's push. Both come from one formula:
It is the softmax cross entropy of an N-way classification whose classes are the candidates in the batch and whose right answer is the positive (van den Oord et al. 2018, CPC, §2.3); temperature as a softmax knob in general is on Activation functions. Read as ranking, it is the listwise loss (ListNet's softmax over a list) with one relevant item, next to the pairwise and LambdaRank losses on Loss functions ("Ranking losses: only the order counts"). Three facts make it special.
Write sij for the cosine between anchor i and candidate j and pij for the softmax over sij/τ. Differentiating derived:
The positive is pulled up by (1 − ppositive)/τ and each negative is pushed down by pij/τ; the pushes add up to the pull. Unlike the triplet hinge, every negative gets some push, in proportion to how similar it already is. The temperature sets how sharply: as τ falls the push concentrates on the hardest negatives; as τ rises every negative gets the same small push. Wang and Liu (2021) call this the hardness-aware property ("the temperature τ controls the strength of penalties on hard negative samples"), and name the cost of going too low the "uniformity-tolerance dilemma": things that genuinely belong together get pushed apart.
Fig. 2 follows one anchor of the hero's batch through the formula, step by step.
Predict: at τ = 1, what share of anchor 31's push does its hardest negative take, against an even split of 1/47 = 2%? And at τ = 0.01? Drag the temperature, then click other rows.
SimCLR's ImageNet sweep found τ = 0.1 best of {0.05, 0.1, 0.5, 1} at batch 4,096 (Chen et al. 2020, Table 5), 0.5 best on CIFAR-10 (Appendix B); SimCSE uses 0.05 (Gao et al. 2021, Table D.1); MoCo 0.07; CLIP learns it (below).
A model that knows nothing puts probability 1/N on the positive and scores ln N, so the batch size changes the task itself, not only the gradient noise: drag N above and watch the dotted chance line move. A lower loss at a bigger batch is not a better model; compare ln N − L, or better, a downstream probe. CPC proves the loss bounds the mutual information between the two views from below, I ≥ ln N − L, "which becomes tighter as N becomes larger" (§2.3), and the bound can never exceed ln N (Poole et al. 2019: "upper bounded by log K", K the batch size): ln 4,096 = 8.3 nats is the most a SimCLR batch can certify derived.
Hence the engineering that buys negatives: big batches (SimCLR trains at 4,096 by default and sweeps 256 to 8,192, §2.2; CLIP uses 32,768); a memory bank of every image's last-seen feature (Wu et al. 2018: many negatives, but stale ones from older versions of the encoder); a queue fed by a momentum encoder (MoCo, next section), which decouples the number of negatives from the batch; or a sigmoid instead of the softmax: SigLIP scores every image-text pair as an independent binary decision, so the loss "does not require a global view of the pairwise similarities for normalization" (Zhai et al. 2023; the CLIP paper page animates softmax against sigmoid on one batch).
Random negatives include items that share the anchor's meaning or class, and the loss pushes them away anyway. The batch has one: the only anchor either model gets wrong is row 31, "A woman is dancing in the rain.", whose nearest candidate is another pair's "A man and woman are dancing in rain." (cosine 0.92 after SimCSE) rather than its own positive, "A woman dances in the rain out side." (0.87). It is also the one triplet SimCSE leaves active above. Chuang et al. (2020) correct the objective for these false negatives; Robinson et al. (2021) go the other way and sample hard negatives on purpose, with a knob for how hard. In practice: deduplicate, use larger and more diverse batches, and when mining hard negatives for retrieval, filter the ones that are actually positives; how often a mined "negative" is really relevant on SciFact, and a positive-aware filter, are measured on Embedding models, sections 4 and 5.
Forty-eight STS-B test pairs that human raters scored 4.5 to 5 out of 5; each first sentence is an anchor, its partner the positive, the other partners the negatives. Cosines are real (BERT-base before and after unsupervised SimCSE, computed offline by src/real_embeddings.py); the softmax, loss and gradient are computed in your browser and checked against PyTorch's cross_entropy and autograd (src/recompute.py). Averaged over the 48 anchors the hardest negative's share is 20% under BERT and 44% after SimCSE at τ = 0.05, and 3% at τ = 1 measured. The batch is easy (near-paraphrases sharing most words): raw BERT already ranks 47 of 48 positives first, and what contrastive training changes is the margin.
Every method on this page runs two views of one input through two branches and compares the outputs. What differs is small and decisive: whether the branches share weights, whether one is a moving-average copy, whether a predictor or a stop-gradient breaks the symmetry, and where the negatives come from, if anywhere.
Fig. 3 draws that picture once and lights up what each design changes. Green plates are trained by the gradient, grey ones are moving-average copies that get none; blue dots are the data going forward, orange dots the gradient coming back, purple dots the weights copied into the slow branch.
SimCLR (Chen et al. 2020) calls the loss NT-Xent ("normalized temperature-scaled cross entropy") and finds three things matter. Augmentation: "the combination of random crop and color distortion is crucial" (§3). A projection head: a small MLP g maps the representation h to the z the loss sees; a nonlinear head beats a linear one by about 3% and no head by more than 10% (§4.2), and after training "we throw away the projection head" and use h (using z downstream is a common mistake). Scale: large batches and long training. Linear evaluation on ImageNet reaches 69.3% top-1 with a ResNet-50 and 76.5% with a ResNet-50 four times wider, "matching the performance of a supervised ResNet-50"; fine-tuned on 1% of the labels it reaches 85.8% top-5 (Table 6 and abstract).
MoCo (He et al. 2019) encodes the query view with the trained encoder and the key view with a second encoder whose weights are a moving average of the first, θk ← mθk + (1 − m)θq. Each batch's keys join a queue of K = 65,536 and the oldest leave, so the negatives are many and, because the key encoder changes slowly, consistent with each other: a large momentum (m = 0.999) "works much better than a smaller value". τ = 0.07. The number of negatives no longer depends on the batch.
| Design | Second branch | What stops collapse | Numbers that define it |
|---|---|---|---|
| SimCLR | same weights | negatives: the other 2(N − 1) views in the batch | batch 4,096; τ = 0.1; nonlinear projection head |
| MoCo | momentum (EMA) encoder for the keys | negatives from a queue of past keys | K = 65,536 keys; m = 0.999; τ = 0.07 |
| BYOL | EMA target network | a predictor on the online side plus the slow target | EMA rate from 0.996 to 1, cosine schedule |
| SimSiam | same weights, stop-gradient | stop-gradient plus predictor | no EMA; works from batch 64 to 4,096 |
| DINO | EMA teacher | centering and sharpening of the teacher's softmax | teacher τ 0.04 to 0.07, student 0.1; centre momentum 0.9 |
| VICReg | same weights, both trained | a variance hinge per dimension over the batch | λ = μ = 25, ν = 1; γ = 1 |
Wang and Isola (2020) split what InfoNCE optimises on the unit hypersphere into two measurable properties, and show that as the number of negatives grows the loss optimises exactly these two:
lalign(x, y, alpha=2), lunif(x, t=2))The numerator of InfoNCE rewards alignment and the denominator rewards uniformity, and "directly optimizing for these two metrics leads to comparable or better performance than contrastive learning" (abstract). Seen this way, collapse is not mysterious: alignment alone is minimised perfectly by mapping everything to one point, and only the uniformity half stops it.
Predict: both runs in Fig. 4 start from the same weights and both pull two views of a digit together; only the left also pushes the negatives away. Which one shrinks towards a point first?
Real hand-written digits (scikit-learn's 1,797 8 × 8 images, UCI) through an encoder with a 3-D output, so every image is a point on the unit sphere; colour is the digit, never seen by training. MLP 64-256-256-3, Adam (learning rate 10−3), 3,000 steps of 256 images, two views each (shift up to 2 pixels, 25% of pixels dropped, contrast jitter, noise); measured on 200 held-out digits; three seeds, seed 0 shown (src/train_toy.py sphere3, about a minute on two CPU threads). The "perfectly even sphere" uniformity is log((1 − e−8)/8) = −2.08 derived, since ‖u − v‖2 = 2 − 2 cos θ and cos θ is uniform on [−1, 1] over the sphere. A 3-D output is far too small for real use: at τ = 0.5 the trained sphere's 5-NN accuracy is 74.5 to 80.5% over three seeds, against 90% for the raw pixels toy (an earlier 2-D version of this toy, on a circle, reached about 50%); it is drawn because a sphere can be seen.
Two refinements matter in practice. Dimensional collapse: even with negatives, embeddings can end up spanning a lower-dimensional subspace than they have room for (Jing et al. 2021: "dimensional collapse also happens in contrastive learning"), which is why the collapse lab below reports an effective rank beside the std. Pretrained language-model embeddings are anisotropic: they occupy "a narrow cone in the vector space", so that in GPT-2's last layer "two random words will on average have almost perfect cosine similarity" (Ethayarajh 2019). That is a uniformity failure, and the hero batch shows it: random pairs of STS-B sentences have a mean cosine of 0.62 under BERT and 0.32 after SimCSE, while SimCSE's alignment is slightly worse (0.25 against 0.17), exactly SimCSE's own reading: "pre-trained embeddings have good alignment, their uniformity is poor" (§7, Figure 3). It also means a cosine threshold only means something for the model it was tuned on. The same narrow cone is why BERTScore offers a rescaled score (Evaluation metrics).
Negatives are expensive (big batches, queues) and some are false. Remove them and "two views of an input should have the same embedding" has a perfect and useless solution: a constant. Every method without negatives is a different way to make that solution unreachable or unstable, and the loss will not warn you: a collapsed SimSiam or VICReg run has an excellent loss. Watch the embedding std instead: the standard deviation of the l2-normalised output, about 1/√d when spread out and 0 when collapsed (SimSiam's monitor).
Predict: SimSiam with and without one detach(), everything else identical. Does the run without it lose by a little or by everything? The lab opens at the end of training (step 3,000); drag the scrubber back to watch it happen, then try the DINO pairs: two different ways to collapse.
BYOL (Grill et al. 2020) uses "two neural networks, referred to as online and target networks". The online network has an extra predictor MLP and is trained to predict the target network's projection of the other view; the target gets no gradient and is an exponential moving average of the online weights, with rate starting at τbase = 0.996 and increased to 1 on a cosine schedule (§3.3). "While state-of-the art methods rely on negative pairs, BYOL achieves a new state of the art without them": 74.3% ImageNet linear top-1 with a ResNet-50 and 79.6% with a larger ResNet.
SimSiam (Chen and He 2020) strips BYOL down: no moving average, one shared encoder, a predictor on one branch and a stop-gradient on the other. "A stop-gradient operation plays an essential role in preventing collapsing": removing it alone drops ImageNet accuracy to 0.1%, and removing the predictor also fails (§4.1, §4.2, Table 1a). The lab reproduces both failures at toy scale. Why asymmetry is enough is a dynamics question, not a property of the loss: the constant is still a minimum. Tian, Chen and Ganguli (2021) analyse "how multiple factors, like predictor networks, stop-gradients, exponential moving averages, and weight decay all come into play", and derive a predictor that can be set directly from the data's statistics (DirectPred).
DINO (Caron et al. 2021) is self-distillation with no labels: a student matches the softmax output of a momentum teacher (momentum on a cosine schedule from 0.996 to 1) across different crops. Two operations on the teacher's output prevent collapse, and each alone causes a different one: "centering prevents one dimension to dominate but encourages collapse to the uniform distribution, while the sharpening has the opposite effect" (§3.1). Centering subtracts a running mean of the teacher's outputs; sharpening uses a low teacher temperature, warmed up from 0.04 to 0.07 over the first 30 epochs, against 0.1 for the student. The collapse measures are the teacher output's entropy (0 when one prototype wins, ln K when uniform) and its KL divergence from the student; in the lab, no centering drives the entropy to 0 and no sharpening to ln 32. With a ViT-B/8, DINO reaches 80.1% linear and 77.4% k-NN top-1 on ImageNet (Table 2).
Barlow Twins (Zbontar et al. 2021) computes the cross-correlation matrix between the two views' embeddings over the batch and pushes it towards the identity: diagonal 1 (invariance), off-diagonal 0 (no redundancy between dimensions). VICReg (Bardes, Ponce and LeCun 2021) separates the jobs into three terms: invariance (mean squared distance between the views), variance (a hinge keeping each dimension's standard deviation over the batch above γ = 1) and covariance (off-diagonal covariances pushed to 0), weighted λ = μ = 25 and ν = 1. These use the batch as a statistic, not as negatives; the variance hinge alone is what blocks the constant, as the lab's VICReg pair shows. Collapse as one training failure among others is on the parent's When training goes wrong tab (Topic: ml-fundamentals).
One small encoder (MLP 64-256-256-16) trained eleven ways on two augmented views of the same real digits, no labels; labels only measure. Seed 0 of three shown.
The quoted toy numbers: the SimSiam run with stop-gradient ends with embedding std 0.24 and the run without it at 0.001; dropping VICReg's variance term collapses the run to a single point after a few hundred steps, in all three seeds; raw pixels give a 90% 5-NN accuracy and the untrained encoder 82%.
Scikit-image's "chelsea" photograph at 224 × 224. Model: facebook/vit-mae-base (encoder 12 layers of width 768; decoder 8 layers of width 512; its config sets norm_pix_loss to false, so it predicts plain normalised pixels), run offline with a fixed random mask (src/real_mae.py). The losses at 50%, 75% and 90% hidden are : harder as more is hidden, but the picture stays recognisable at 75%. No I-JEPA model is run (its predictions are vectors, with no picture to show); its blocks follow the paper's sampling: 4 target blocks with scale 0.15 to 0.2 and aspect ratio 0.75 to 1.5, one context block with scale 0.85 to 1.0 and unit aspect ratio, targets removed from it (§3); seeded draw in src/mk_data.py.
The other road needs no pairs at all: hide part of the input and predict it. A constant output cannot win, because the target is the data. BERT did this for text, masking 15% of tokens (BERT paper page, which runs a toy BERT live). For images the question is what to predict: discrete visual tokens from a separately trained tokenizer (BEiT, Bao et al. 2021: "recover the original visual tokens based on the corrupted image patches"); pixels (MAE, He et al. 2021; SimMIM, Xie et al. 2021, which "predicts raw pixel values of the randomly masked patches by a lightweight one-layer head" with an l1 loss); or representations from a slowly updated copy of the encoder (data2vec, Baevski et al. 2022, one recipe for speech, text and images; I-JEPA, Assran et al. 2023).
MAE rests on two choices. It masks "a high proportion of the input image, e.g., 75%", because images are redundant enough that a lower ratio is solved by interpolation (BERT's "typical masking ratio is 15%", §4.1); and its encoder "operates only on the visible subset of patches (without mask tokens), along with a lightweight decoder", so pretraining runs "3x or more" faster. The loss is the mean squared error on masked patches only, and predicting each patch's pixels normalised by that patch's own mean and variance "improves representation quality" (§3). A ViT-Huge pretrained this way reaches 87.8% on ImageNet-1K after fine-tuning; that headline is fine-tuned, and MAE features are not the ones to use frozen. I-JEPA keeps the masking but changes the target: predict the representations of several large target blocks from one context block, so the model is never asked for texture it cannot know. It trains a ViT-H/14 "using 16 A100 GPUs in under 72 hours", under 1,200 GPU hours and "over 10x more efficient than a ViT-H/14 pretrained with MAE".
Predict: at 75% hidden, will the released MAE checkpoint's reconstruction of a real photograph still be recognisable? Watch, then switch to 90% and to I-JEPA.
The split today is less "contrastive or not" than joint-embedding methods (contrastive, self-distillation, JEPA, which compare or predict embeddings) against masked generative methods (MAE, which reconstruct the input), with prediction in latent space favoured when the goal is semantic features. The camps meet in practice: DINOv2 adds a masked-image term to self-distillation, and I-JEPA borrows MAE's masking and BYOL's moving-average target. Patches and why ViT became the backbone for all of this are on the ViT paper page.
CLIP (Radford et al. 2021) is InfoNCE across modalities: an image encoder and a text encoder, a batch of 32,768 image-caption pairs, and the loss run in both directions (image picks its caption from the batch, caption picks its image; tick "Symmetric loss" on the InfoNCE lab to see it on real cosines). The temperature is learned, starting from 0.07 with the logit scale capped at 100. Writing the classes as text then gives zero-shot classification. CLIP as the vision encoder of multimodal models, beside SigLIP and plain ViT, is on Vision encoders: ViT, CLIP and SigLIP; a trained toy CLIP and its successors are on the CLIP paper page.
What the objective forces the model to output decides the architecture. A contrastive objective wants one vector per input, compared with other vectors; nothing is generated token by token, so an encoder suffices, which is why CLIP's towers, sentence embedders (SBERT, SimCSE, retrieval models) and reranker backbones are encoders. Next-token prediction must emit sequences and needs a decoder, and its representations are shaped for predicting the next token, not for comparison. BERT sits between: an encoder trained with a generative-style objective (masked tokens), whose raw embeddings are poor for similarity until contrastively fine-tuned. That last step is measurable.
SimCSE (Gao, Yao and Chen 2021) needs no labels: "we pass the same sentence to the pre-trained encoder twice: by applying the standard dropout twice, we can obtain two different embeddings as 'positive pairs'", with in-batch negatives, τ = 0.05 and batch 64. On the STS benchmark test set, the Spearman correlation between cosine and human similarity rises from 53.87 (BERT, Table 5) to 76.85, and the 7-task average reaches 76.3, 81.6 with supervised NLI pairs. This page recomputes both from the released checkpoints:
Spearman (× 100) between cosine and the human score over all 1,379 test pairs; alignment over pairs scored 4 or more; uniformity and mean cosine over random pairs of test sentences. Recomputed: unsup-SimCSE 76.84 against the paper's 76.85; BERT "embedding + last avg" 53.87, matching SimCSE's own Table 5 baseline, and BERT "first-last avg" 59.04, matching Su et al.'s figure (SimCSE Table B.2). The two baselines share the name "first-last avg." in the literature but average different layers: Su et al. the first and last transformer layers, SimCSE's Table 5 the embedding layer and the last one our finding; pooling details move results by several points. SimCSE's unsupervised model is read at the last layer's [CLS] vector without its training-time MLP, as the authors' repository does.
In 2026 contrastive training is the standard post-training recipe for embedding and retrieval models, applied to an encoder and, increasingly, to a decoder-only LLM with pooling: decoder LLMs are contrastively adapted precisely because next-token pretraining alone does not give a well-shaped similarity space. On the text side the same loss trains retrieval embedders on query-document pairs: Embedding models (a child of Topic: rag-and-retrieval) applies it to SciFact with mined hard negatives, a tiny fine-tune and model choice.
| Model | Backbone | Pooling | Training signal |
|---|---|---|---|
| SBERT (2019) | BERT, RoBERTa (encoder) | mean of token vectors ("The default configuration is MEAN") | siamese and triplet networks on NLI and STS |
| SimCSE (2021) | BERT, RoBERTa | [CLS]; unsupervised models drop the training-time MLP at test | dropout views (unsupervised) or NLI entailment pairs |
| E5 (2022) | encoder | average pooling over the output layer | contrastive pretraining on web text pairs (CCPairs), then fine-tuning |
| E5-Mistral (Dec 2023) | Mistral-7B, decoder-only | the last layer's vector at an appended [EOS] token | synthetic data from proprietary LLMs in 93 languages |
| NV-Embed (2024) | Mistral-7B, causal mask removed during contrastive training | a latent attention layer, which beat mean and last-token pooling | two-stage contrastive instruction tuning |
| Qwen3-Embedding (2025) | Qwen3, causal attention kept | the last layer's hidden state at an appended [EOS] token | multi-stage training with synthetic data generated by Qwen3 |
Before contrastive training, post-processing was the fix on offer: BERT-flow maps the "non-smooth anisotropic semantic space of sentences" to an isotropic one with a normalising flow (Li et al. 2020).
First arXiv (or conference) dates; colour is the family from the table at the top. Click a family to dim the others.
The definitive survey of objectives, from the contrastive loss to CLIP. (50 min)
The broader landscape, including the pretext tasks this page summarises in one paragraph. (50 min)
One of the two foundational objectives: augmentations, projection head, batch size, temperature. (45 min)
The other: the loss and its mutual-information bound. (45 min)
The two properties the Reading tab animates, with the reference code. (40 min)
The cleanest ablation of collapse: stop-gradient, predictor, the std monitor. (35 min)
Self-distillation with centering and sharpening, and what ViTs learn from it. (45 min)
Data curation and scale for frozen features. (90 min)
75% masking and the asymmetric encoder-decoder. (45 min)
Prediction in representation space: LeCun-school non-generative self-supervision. (45 min)
Contrastive sentence embeddings from dropout alone, with the anisotropy analysis. (40 min)
Collapse prevented by three explicit terms on batch statistics. (40 min)
The parent: contrastive learning beside supervised training ("Beyond one network"), "Everything is cross entropy", and the When training goes wrong tab. (30 min, plus 1 in closed details)
Cross entropy, margins and the losses InfoNCE is built from. (31 min, plus 5 in closed details)
BERTScore on real embeddings, and why its scores need rescaling. (27 min, plus 7 in closed details)
Softmax and temperature. (25 min, plus 5 in closed details)
A tiny CLIP trained and run live; its 8 × 8 batch with a temperature slider; softmax against sigmoid. (27 min)
The backbone of MAE, DINO and I-JEPA; a toy ViT live. (23 min)
LeWM, a small JEPA trained from pixels with SIGReg, used as a world model to plan: where its predictor is enough and where the search fails. (10 min, plus 3 in closed details)
Masked-token prediction, with a toy BERT live. (23 min)
Teacher, student, soft targets and temperature, the machinery DINO reuses without labels. (25 min, plus 8 in closed details)
InfoNCE applied to retrieval: query-document pairs, in-batch and mined hard negatives, false negatives measured on SciFact, a tiny fine-tune and choosing a model. (27 min)
Embeddings in retrieval practice. (21 min)
The image side: CLIP's and SigLIP's contrastive training compared on a running example, as the encoders multimodal models read with. (34 min)
ViT and CLIP inside multimodal architectures. (25 min)
src/ folder in the knowledge base repository.