A zoo of recipes
Self-supervised learning (SSL) is now the default way to learn representations from unlabeled data. Instead of labels, it uses a task built from the data itself. SimCLR and CLIP pull matching pairs together and push random pairs apart. BYOL, DINO, and JEPA predict the output of a slowly moving copy of the network. MAE and BERT fill in masked patches or words. GPT predicts the next token.
Each method comes with its own story and its own bag of tricks: negative samples, stop-gradients, momentum encoders, predictor heads, centering, whitening, and very large batches. Some tricks seem essential for one method and useless for another. The obvious questions are still open:
- What representation are all these methods trying to learn?
- Why do such different procedures all work?
This post argues that there is one answer. Underneath the recipes, these methods approximate the same mathematical object: the spectral decomposition of the pointwise mutual information between two views of the data. The methods differ only in how they parametrize that decomposition and how they fit it. Seen this way, several puzzles about SSL get simple explanations. The full details are in the paper ↗, and an overview is in the slides ↗.
What representation do we want?
Start with what we want a representation for. We train it once, without labels, and then reuse it for many downstream tasks that we do not know in advance. The cheapest way to reuse it is to put a linear head on top. So call a representation sufficient if every downstream prediction can be represented by it:
This seems too much to ask, since we do not know the tasks beforehand. What makes it possible is a simple assumption. There is some underlying content , such as the object in the image or the meaning of the sentence, and any label we care about depends on only through . This assumption appears in the literature again and again, from sufficient dimension reduction and its kernel version in statistics to the theory of self-supervised learning (Arora et al., Lee et al., Tosh et al.). Then any such prediction can be written as an average over the content, , so it is linear in the posterior . A representation that spans is therefore sufficient.
But is never observed, and we have no labels. The trick is that SSL never looks at a single example alone. It looks at pairs: an image and its augmentation, a masked sentence and its missing words, a context and its continuation. Call the two views and , and assume the other view also depends on only through . A good augmentation changes the pixels but keeps the content, so still reveals .
Under this assumption, everything tells us about passes through . The quantity that captures exactly this dependence is the pointwise mutual information (PMI), or equivalently the ratio
Here the right side is the spectral decomposition of this ratio, the continuous analogue of an SVD. Think of a huge matrix whose rows and columns are indexed by data points, with entry . Its singular vectors give the feature map , and they recover exactly the span of , up to a linear transformation that the head absorbs. So a representation learned from unlabeled pairs alone is enough to solve any downstream task with a linear head. This is the essential target that most SSL algorithms are chasing, often in disguise. Next we look at how each method aims at it.
Two knobs: how to parametrize, how to fit
Once the target is fixed, an SSL method is defined by two choices.
How to parametrize the decomposition.
- Linear. The ratio is a plain inner product, . Examples are spectral contrastive learning, Barlow Twins, VICReg, and BYOL.
- Energy-based. The ratio is an exponential, . This looks nonlinear, but the exponential of an inner product is itself an inner product of infinitely many random features, so it is still a spectral decomposition. Examples are SimCLR, word2vec, and MoCo.
- Denoising. Based on the energy-based form, one view is a corrupted copy of the other, by noise, masking, or truncation. Then , with , the average feature of the clean given the corrupted . Examples are diffusion spectral representation, denoising autoencoders, BERT, and GPT.
- Nonlinear. A projector network is applied on top of the encoder , sometimes on one side only, . Examples are MAE, SimSiam, and JEPA.
- Latent-variable. The features are soft cluster assignments . Since and , the ratio is , an inner product of the cluster assignments of the two views, weighted by . Examples are DeepCluster, SwAV, and DINO.
- Multi-modal. Each view has its own encoder, for example for images and for text , . Examples are CLIP and SigLIP.
How to fit it. The options are a square loss, noise-contrastive estimation (telling real pairs from random pairs), density-ratio fitting, power iteration (matching a slowly updated copy of yourself), diffusion loss, and maximum likelihood.
Each existing method is a point on this grid, shown in Figure 1. Contrastive and non-contrastive methods are not opposites. They are different fitting rules for the same target. The details of recasting each method into the framework are in the paper ↗.
The family is older than deep learning. PCA, Laplacian eigenmaps, LLE, Isomap, and t-SNE compute the same kind of decomposition. They differ mainly in how they estimate the PMI: a Gaussian kernel, a nearest-neighbor graph, or geodesic distances. They then solve for the features with an eigensolver or by gradient descent. Modern SSL keeps the decomposition and changes the estimator. Data augmentation produces positive pairs directly from , so the PMI never has to be written down, and the features are fit by stochastic gradients. That is a large part of why it scales, and why the essence is hidden, not revealed.
Three puzzles, explained from the spectral view
Beyond unifying existing SSL algorithms, the spectral view also helps us understand them. The two knobs give new answers to three puzzles: why some methods need large batches, which comes from the fitting rule (§ 4.1); how denoising methods relate to one another, which comes from the parametrization (§ 4.2); and how a learned representation should be used downstream, which also comes from the parametrization (§ 4.3).
4.1 Batch size is not about contrast
The first puzzle is about the fitting rule. A common belief is that contrastive methods such as SimCLR and CLIP need huge batches to supply negative examples, and that non-contrastive methods such as Barlow Twins and VICReg were designed to avoid this. The spectral view points to a different cause: how the samples in a batch enter the loss. Two statistical notions make this precise:
- A mini-batch loss is unbiased if its expectation is the loss we want. Then a small batch only adds noise, which averages out over training.
- A mini-batch loss is consistent if, with the batch size fixed, its minimizer converges to the true ratio as the amount of training data grows. More data means more batches, not bigger ones.
A loss that is a plain average over samples is unbiased. Once the samples enter through a nonlinear function of batch averages, the mini-batch loss is still an unbiased estimate of its own expected loss at that batch size, but this expected loss now depends on and can differ from the loss we want. The question then becomes whether it is still consistent.
- Square loss. With the score , the loss we want is
On a batch , each expectation becomes a plain average,so for any batch size. The loss is unbiased, and a larger batch only reduces noise.
- Contrastive ranking loss (SimCLR, CLIP). The ideal loss normalizes the score of the true partner by an expectation over all random candidates,
In practice the expectation is replaced by a sum: the loss compares the true partner with random candidates ,On a batch, the other samples in the batch serve as the random candidates,so , showing that is an unbiased estimate of . But is not . As grows, , while for any finite the log of a sum over candidates differs from the log of the expectation, so each batch size defines a different loss, and is not an unbiased estimate of . What makes it work is that and every have the same minimizer, , as long as the model can represent it. So the loss is consistent for any batch size. More negatives make each step more informative.
Contrastive learning is a good example that separates the two roles of samples: the samples within a batch define which loss we optimize, and the number of batches, i.e., the amount of training data, decides how well we find its minimizer.
- Power iteration (BYOL, SimSiam, JEPA). These methods are non-contrastive, and they avoid collapse without any batch statistics. The target is a copy of the encoder, , frozen at step (by stop-gradient or a moving average), and the encoder is trained to predict it from the other view. With a linear predictor , the loss at step is
Why does this work? The minimizer satisfies , so each step applies the conditional expectation, the operator whose singular vectors we want, to the current features. Repeating the step is power iteration, which converges to the leading singular vectors (Guo et al.). Since the target is frozen within a step, shrinking the features toward zero does not lower the loss, so there is no collapse. On a batch the loss is a plain average,so for any batch size, and the loss of each step is unbiased. There is no single global loss, but the procedure is still consistent: the exact iteration converges to the leading singular vectors, and since the batch loss of each step is unbiased, with fixed the noise averages out over steps as the amount of data grows.
- Barlow Twins and VICReg. Both penalize a second-moment matrix of the features. Barlow Twins uses the cross-correlation of standardized features,
and VICReg uses the covariance of each view, with ,On a batch, both plug in the batch estimate , for example , to get . The estimate is unbiased, but the loss is nonlinear in it. For a squared entry, with ,where the terms with pair each sample with itself, so , and is biased. The square root and the standardization behave the same way. This bias of order moves the minimizer away from the true ratio, so the loss is not consistent. No amount of training fixes it. Only a larger batch shrinks the bias, and these are the methods that need large batches.
The view also suggests a fix. For the square-penalty variant of VICReg, the bias comes only from terms that pair a sample with itself. Computing the penalty over distinct pairs of samples removes the bias for any batch size . This is a small change to the code; see the Unbiased VICReg in Section 3.2 of the paper ↗, and Section 9.1 for the batch-size discussion of all the objectives.
4.2 Denoising: two mirror images
The second puzzle is about the parametrization. Diffusion models and denoising autoencoders (DAEs) both learn to remove noise, and a diffusion model is often described as a DAE trained at many noise levels. In the spectral view, they are not: the two are mirror images.
Both belong to one family. The model scores a pair through features of a condition on one side and features of a target on the other, (in § 03, the target is the corrupted view and is ), and the corruption is what makes the two sides different. The difference lies in which side is noisy and which features are kept as the representation:
- A diffusion spectral representation (Shribak et al.) conditions on a clean and targets noisy versions of its paired variable at all noise levels. It keeps the clean-side features. So far it has been used on paired data, for example a state-action pair and the next state in control.
- A DAE conditions on a noisy input and targets the clean one at a single noise level. It keeps the noisy-side features.
So the DAE is not a single-noise-level diffusion model. The two are mirror images: the noise and the kept features sit on opposite sides. The rest of the family follows the same pattern. BERT is a DAE with masking instead of Gaussian noise. GPT masks everything after the current position, so next-token prediction is exact maximum likelihood in the same family.
4.3 How you build it decides how you use it
The third puzzle is also about the parametrization, which tells us which downstream head is enough. With a linear parametrization, a linear head is sufficient, as in § 02. With other parametrizations, the matching head changes. Here we focus on one important case, the asymmetric projector, where an extra network is applied to one side only. This is the predictor in BYOL, SimSiam, and JEPA, and the decoder in MAE.
In these models, the inner product that forms the decomposition sits after the projector, not after the encoder. When the projector is thrown away, the encoder features alone need a head that does what the projector did. This explains a known puzzle about MAE. Its features do poorly with a linear probe but well when the last Transformer block is fine-tuned. MAE's decoder mixes information across patches through attention. A linear head on pooled features cannot undo that mixing, and a head with attention can. The features are not deficient. The usual linear probe does not match the way the model was built. The asymmetric projectors are recast in Section 6.1, and the matching heads for all parametrizations are discussed in Section 9.2 of the paper ↗.
Deriving new algorithms
The spectral view also derives new algorithms. Pairing a parametrization with a fitting rule not tried before, or fixing a flaw that the analysis reveals, gives a new method. A few examples from the paper:
- Unbiased VICReg. Computing the VICReg penalty over distinct pairs of samples removes its batch-size bias, as explained in § 4.1 (paper, p. 17).
- Power iteration beyond BYOL. MINC (Guo et al.) derives a non-contrastive method from power iteration, with a Hebbian update that keeps the features orthogonal and has unbiased gradients for any batch size. The iteration also extends from the square loss to NCE and -divergence losses (paper, p. 12 and p. 17).
- Density-ratio fitting for energy-based features. Replacing the log-sum-exp in SimCLR by a plain expectation of the exponential gives a loss with the same target that is unbiased for any batch size and easier to optimize (paper, p. 23).
- Projected representation learning. Regressing onto a fixed statistic of the other view, such as random features, with an orthonormal head gives non-redundant features from a plain square loss, with no negatives, no target copy, and no batch statistics (paper, p. 16).
- Multi-modal diffusion representation. Adding noise to both modalities and fitting the diffusion loss learns features of both sides at all noise levels (paper, p. 43).
The paper derives more for each parametrization, including latent-variable ones, in Sections 3.2, 4.2, 5.2, 6.2, 7.2, and 8.2.
Beyond self-supervised learning
The view also covers LLM pretraining. Next-token prediction in GPT is maximum likelihood in the family of § 4.2. Since one Transformer is shared by all contexts, split the context into a prompt and the tokens after it, . For each prompt, the model scores the next token by , the same family with added to the condition. So the same model with different prompts represents the decompositions of different PMIs. These decompositions are not independent: the output token features are shared by all prompts, and only the condition features change with .
The same view applies wherever a representation must summarize a conditional distribution. In control and reinforcement learning, decomposing the transition makes the value of every policy linear in the learned features. This turns value estimation into regression and makes planning and exploration tractable. We look at this in Part II of this series, What Representation Does Reinforcement Learning Need? Causal inference with hidden confounders and the analysis of animal behavior work the same way, as shown in Section 11 of the paper. In each case, the question is what the representation should be, and the answer is the spectral decomposition of the right operator.
To sum up, a single principle, sufficiency, fixes the target: the spectral decomposition of the PMI. Two choices, the parametrization and the fitting rule, generate the methods, from SimCLR and BYOL to diffusion, BERT, and GPT. The same two choices explain puzzles such as batch size, the relation between diffusion and DAEs, and how to read out a representation (§ 04), and they derive new algorithms (§ 05). The derivations and more are in the paper ↗, and an overview is in the slides ↗.
Acknowledgements
This post is based on joint work with Na Li and Dale Schuurmans.
References
- Dai, Li, and Schuurmans 2026, Spectral Ghost in Representation Learning
- Dai 2026, Spectral Ghost in (Self-supervised) Representation Learning, talk slides
- Li 1991, Sliced Inverse Regression for Dimension Reduction
- Fukumizu, Bach, and Jordan 2004, Dimensionality Reduction for Supervised Learning with Reproducing Kernel Hilbert Spaces
- Arora et al. 2019, A Theoretical Analysis of Contrastive Unsupervised Representation Learning
- Lee et al. 2021, Predicting What You Already Know Helps
- Tosh, Krishnamurthy, and Hsu 2021, Contrastive Learning, Multi-view Redundancy, and Linear Models
- Chen et al. 2020, SimCLR
- He et al. 2020, MoCo
- Grill et al. 2020, BYOL
- Guo et al. 2026, Representation Learning via Non-Contrastive Mutual Information
- Zbontar et al. 2021, Barlow Twins
- Bardes et al. 2022, VICReg
- Caron et al. 2021, DINO
- He et al. 2022, Masked Autoencoders
- Assran et al. 2023, I-JEPA
- Radford et al. 2021, CLIP
- Devlin et al. 2019, BERT
- Vincent et al. 2008, Denoising Autoencoders
- HaoChen et al. 2021, Spectral Contrastive Learning
- Ma and Collins 2018, NCE and Negative Sampling
- Shribak et al. 2024, Diffusion Spectral Representation for Reinforcement Learning