// § 01

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 ↗.

// § 02

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 ϕ(x)\phi(x) sufficient if every downstream prediction can be represented by it:

E[y∣x]=⟨wy,ϕ(x)⟩for every downstream target y.\mathbb{E}[y \mid x] = \langle w_y, \phi(x)\rangle \quad\text{for every downstream target } y.

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 zz, such as the object in the image or the meaning of the sentence, and any label yy we care about depends on xx only through zz. 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, E[y∣x]=∫E[y∣z] P(z∣x) dz\mathbb{E}[y\mid x] = \int \mathbb{E}[y\mid z]\,P(z\mid x)\,dz, so it is linear in the posterior P(z∣x)P(z\mid x). A representation that spans P(z∣x)P(z\mid x) is therefore sufficient.

But zz 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 xx and x′x', and assume the other view x′x' also depends on xx only through zz. A good augmentation changes the pixels but keeps the content, so x′x' still reveals zz.

Under this assumption, everything xx tells us about x′x' passes through zz. The quantity that captures exactly this dependence is the pointwise mutual information (PMI), or equivalently the ratio

P(x,x′)P(x) P(x′)=⟨ϕ(x),ϕ(x′)⟩.\frac{P(x, x')}{P(x)\,P(x')} = \langle \phi(x), \phi(x')\rangle .

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 P(x,x′)/(P(x)P(x′))P(x,x')/(P(x)P(x')). Its singular vectors give the feature map ϕ\phi, and they recover exactly the span of P(z∣x)P(z\mid x), 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.

// § 03

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, P(x,x′)P(x)P(x′)=⟨ϕ(x),ϕ(x′)⟩\dfrac{P(x,x')}{P(x)P(x')} = \langle\phi(x),\phi(x')\rangle. Examples are spectral contrastive learning, Barlow Twins, VICReg, and BYOL.
  • Energy-based. The ratio is an exponential, P(x,x′)P(x)P(x′)∝exp⁡(υ(x)⊤υ(x′))\dfrac{P(x,x')}{P(x)P(x')} \propto \exp\big(\upsilon(x)^\top\upsilon(x')\big). 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 x~′\tilde x' of the other, by noise, masking, or truncation. Then P(x~′∣x)P(x~′)∝exp⁡(υ(x)⊤μ(x~′))\dfrac{P(\tilde x'\mid x)}{P(\tilde x')} \propto \exp\big(\upsilon(x)^\top\mu(\tilde x')\big), with μ(x~′)≈E[υ(x′)∣x~′]\mu(\tilde x')\approx\mathbb{E}[\upsilon(x')\mid\tilde x'], the average feature of the clean x′x' given the corrupted x~′\tilde x'. Examples are diffusion spectral representation, denoising autoencoders, BERT, and GPT.
  • Nonlinear. A projector network nnθ\texttt{nn}_\theta is applied on top of the encoder υ\upsilon, sometimes on one side only, P(x,x′)P(x)P(x′)=⟨υ(x′),nnθ(υ(x))⟩\dfrac{P(x,x')}{P(x)P(x')} = \langle\upsilon(x'),\texttt{nn}_\theta(\upsilon(x))\rangle. Examples are MAE, SimSiam, and JEPA.
  • Latent-variable. The features are soft cluster assignments P(z∣x)P(z\mid x). Since P(x′∣x)=∫P(x′∣z) P(z∣x) dzP(x'\mid x) = \int P(x'\mid z)\,P(z\mid x)\,dz and P(x′∣z)=P(z∣x′)P(x′)/P(z)P(x'\mid z) = P(z\mid x')P(x')/P(z), the ratio is P(x,x′)P(x)P(x′)=∫P(z∣x) P(z∣x′)P(z) dz\dfrac{P(x,x')}{P(x)P(x')} = \displaystyle\int \frac{P(z\mid x)\,P(z\mid x')}{P(z)}\,dz, an inner product of the cluster assignments of the two views, weighted by 1/P(z)1/P(z). Examples are DeepCluster, SwAV, and DINO.
  • Multi-modal. Each view has its own encoder, for example ϕ\phi for images xx and ν\nu for text yy, P(x,y)P(x)P(y)∝exp⁡(⟨ϕ(x),ν(y)⟩)\dfrac{P(x,y)}{P(x)P(y)} \propto \exp\big(\langle\phi(x),\nu(y)\rangle\big). 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 ↗.

FIGURE 01 / THE SPECTRAL FRAMEWORK
Overview: sufficiency of the spectral representation leads to six parametrizations, each fitted by a learning objective, recovering existing SSL and classic methods.
Figure 1. One target, two choices. Sufficiency points to the spectral decomposition of the PMI (top). Each method picks a parametrization (middle) and a learning objective (bottom). Classic methods, in gray, are part of the same family.

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 P(x,x′)P(x,x'), 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.

// § 04

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 BB 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 BB and can differ from the loss we want. The question then becomes whether it is still consistent.

  • Square loss. With the score s(x,x′)=ϕ(x)⊤ϕ(x′)s(x,x') = \phi(x)^\top\phi(x'), the loss we want is
    L=−2 EP(x,x′)[s(x,x′)]+EP(x)P(x′)[s(x,x′)2].L = -2\,\mathbb{E}_{P(x,x')}[s(x,x')] + \mathbb{E}_{P(x)P(x')}[s(x,x')^2].
    On a batch {(xi,xi′)}i=1B\{(x_i,x_i')\}_{i=1}^B, each expectation becomes a plain average,
    L^=−2B∑is(xi,xi′)+1B(B−1)∑i≠js(xi,xj′)2,\hat L = -\frac{2}{B}\sum_{i} s(x_i,x_i') + \frac{1}{B(B-1)}\sum_{i\neq j} s(x_i,x_j')^2,
    so E[L^]=L\mathbb{E}[\hat L] = L 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,
    L∞=−EP(x,x′)[s(x,x′)−log⁡EP(x′′)[es(x,x′′)]].L_\infty = -\mathbb{E}_{P(x,x')}\Big[s(x,x') - \log\mathbb{E}_{P(x'')}\big[e^{s(x,x'')}\big]\Big].
    In practice the expectation is replaced by a sum: the loss compares the true partner x1′∼P(x′∣x)x_1'\sim P(x'\mid x) with B−1B-1 random candidates x2′,…,xB′∼P(x′)x_2',\ldots,x_B'\sim P(x'),
    LB=−E[log⁡es(x,x1′)∑j=1Bes(x,xj′)].L_B = -\mathbb{E}\Big[\log\frac{e^{s(x,x_1')}}{\sum_{j=1}^{B} e^{s(x,x_j')}}\Big].
    On a batch, the other samples in the batch serve as the random candidates,
    L^B=−1B∑ilog⁡es(xi,xi′)∑jes(xi,xj′),\hat L_B = -\frac{1}{B}\sum_{i}\log\frac{e^{s(x_i,x_i')}}{\sum_{j} e^{s(x_i,x_j')}},
    so E[L^B]=LB\mathbb{E}[\hat L_B] = L_B, showing that L^B\hat L_B is an unbiased estimate of LBL_B. But LBL_B is not L∞L_\infty. As BB grows, LB−log⁡B→L∞L_B - \log B \to L_\infty, while for any finite BB the log of a sum over BB candidates differs from the log of the expectation, so each batch size defines a different loss, and L^B\hat L_B is not an unbiased estimate of L∞L_\infty. What makes it work is that L∞L_\infty and every LBL_B have the same minimizer, s(x,x′)=log⁡P(x,x′)P(x)P(x′)+c(x)s(x,x') = \log\frac{P(x,x')}{P(x)P(x')} + c(x), 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 LBL_B 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, ϕt\phi_t, frozen at step tt (by stop-gradient or a moving average), and the encoder is trained to predict it from the other view. With a linear predictor WW, the loss at step tt is
    Lt=EP(x,x′)[∥Wϕ(x)−ϕt(x′)∥2].L_t = \mathbb{E}_{P(x,x')}\big[\|W\phi(x) - \phi_t(x')\|^2\big].
    Why does this work? The minimizer satisfies Wϕ(x)=E[ϕt(x′)∣x]W\phi(x) = \mathbb{E}[\phi_t(x')\mid x], 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,
    L^t=1B∑i∥Wϕ(xi)−ϕt(xi′)∥2,\hat L_t = \frac{1}{B}\sum_{i}\|W\phi(x_i) - \phi_t(x_i')\|^2,
    so E[L^t]=Lt\mathbb{E}[\hat L_t] = L_t 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 BB fixed the noise averages out over steps as the amount of data grows.
  • Barlow Twins and VICReg. Both penalize a second-moment matrix CC of the features. Barlow Twins uses the cross-correlation C=EP(x,x′)[ϕ(x)ϕ(x′)⊤]C = \mathbb{E}_{P(x,x')}[\phi(x)\phi(x')^\top] of standardized features,
    LBT=∑k(1−Ckk)2+λ∑k≠lCkl2,L_{\text{BT}} = \sum_k (1-C_{kk})^2 + \lambda\sum_{k\neq l} C_{kl}^2,
    and VICReg uses the covariance of each view, C=E[(ϕ(x)−ϕˉ)(ϕ(x)−ϕˉ)⊤]C = \mathbb{E}\big[(\phi(x)-\bar\phi)(\phi(x)-\bar\phi)^\top\big] with ϕˉ=E[ϕ(x)]\bar\phi = \mathbb{E}[\phi(x)],
    LVIC=E∥ϕ(x)−ϕ(x′)∥2+α∑kmax⁡(0, 1−Ckk+ϵ)+β∑k≠lCkl2.L_{\text{VIC}} = \mathbb{E}\|\phi(x)-\phi(x')\|^2 + \alpha\sum_k \max\big(0,\, 1-\sqrt{C_{kk}+\epsilon}\big) + \beta\sum_{k\neq l} C_{kl}^2.
    On a batch, both plug in the batch estimate C^\hat C, for example C^=1B∑iϕ(xi)ϕ(xi′)⊤\hat C = \frac{1}{B}\sum_i \phi(x_i)\phi(x_i')^\top, to get L^\hat L. The estimate C^\hat C is unbiased, but the loss is nonlinear in it. For a squared entry, with ai=ϕk(xi)ϕl(xi′)a_i = \phi_k(x_i)\phi_l(x_i'),
    C^kl2=1B2∑i,jaiaj,\hat C_{kl}^2 = \frac{1}{B^2}\sum_{i,j} a_i a_j,
    where the BB terms with i=ji=j pair each sample with itself, so E[C^kl2]=Ckl2+1B(E[ai2]−Ckl2)\mathbb{E}[\hat C_{kl}^2] = C_{kl}^2 + \frac{1}{B}\big(\mathbb{E}[a_i^2] - C_{kl}^2\big), and L^\hat L is biased. The square root and the standardization behave the same way. This bias of order 1/B1/B 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 B≥2B \ge 2. 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, exp⁡(υ(condition)⊤ψ(target))\exp(\upsilon(\text{condition})^\top\psi(\text{target})) (in § 03, the target is the corrupted view and ψ\psi is μ\mu), 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 xx and targets noisy versions of its paired variable yy 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 xx and the next state yy 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.
FIGURE 02 / CONDITION AND TARGET
Condition and target for diffusion representation, DAE, BERT, and GPT; the condition side is kept as the representation.
Figure 2. In each method, the condition-side features (orange box) are kept as the representation. Diffusion and the DAE put the noise on opposite sides. BERT masks tokens at a single rate. GPT masks all future tokens.

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.

FIGURE 03 / ONE-SIDED PROJECTORS
Architectures of BYOL, SimSiam, JEPA, and MAE: encoder kept, projector on the condition side only, target branch without gradient.
Figure 3. In all four methods, the projector (orange) is applied to one side only, and the encoder (blue) is kept. BYOL, SimSiam, and JEPA regress onto a target produced by a copy of the encoder, which is a form of power iteration. MAE regresses onto fixed pixels.

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 ↗.

// § 05

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 ff-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 h(x′)h(x') 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.

// § 06

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 pp and the tokens after it, xˉ\bar x. For each prompt, the model scores the next token yy by exp⁡(υ(p,xˉ)⊤ψ(y))\exp(\upsilon(p, \bar x)^\top\psi(y)), the same family with pp 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 ψ(y)\psi(y) are shared by all prompts, and only the condition features change with pp.

The same view applies wherever a representation must summarize a conditional distribution. In control and reinforcement learning, decomposing the transition P(s′∣s,a)P(s'\mid s,a) 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 ↗.

// THANKS

Acknowledgements

This post is based on joint work with Na Li and Dale Schuurmans.

// SOURCES

References

  1. Dai, Li, and Schuurmans 2026, Spectral Ghost in Representation Learning
  2. Dai 2026, Spectral Ghost in (Self-supervised) Representation Learning, talk slides
  3. Li 1991, Sliced Inverse Regression for Dimension Reduction
  4. Fukumizu, Bach, and Jordan 2004, Dimensionality Reduction for Supervised Learning with Reproducing Kernel Hilbert Spaces
  5. Arora et al. 2019, A Theoretical Analysis of Contrastive Unsupervised Representation Learning
  6. Lee et al. 2021, Predicting What You Already Know Helps
  7. Tosh, Krishnamurthy, and Hsu 2021, Contrastive Learning, Multi-view Redundancy, and Linear Models
  8. Chen et al. 2020, SimCLR
  9. He et al. 2020, MoCo
  10. Grill et al. 2020, BYOL
  11. Guo et al. 2026, Representation Learning via Non-Contrastive Mutual Information
  12. Zbontar et al. 2021, Barlow Twins
  13. Bardes et al. 2022, VICReg
  14. Caron et al. 2021, DINO
  15. He et al. 2022, Masked Autoencoders
  16. Assran et al. 2023, I-JEPA
  17. Radford et al. 2021, CLIP
  18. Devlin et al. 2019, BERT
  19. Vincent et al. 2008, Denoising Autoencoders
  20. HaoChen et al. 2021, Spectral Contrastive Learning
  21. Ma and Collins 2018, NCE and Negative Sampling
  22. Shribak et al. 2024, Diffusion Spectral Representation for Reinforcement Learning