Representation Collapse

Representation collapse happens when a model maps many different inputs to the same or nearly same embedding. The pretraining loss may look small, but the representation becomes useless for downstream tasks.

A collapsed encoder has low embedding variance:

In the extreme case:

where is a constant vector.

Why It Happens

  • The objective admits a trivial constant solution.
  • Positive-pair alignment is used without a mechanism that preserves information.
  • The target network changes too quickly or receives gradients that allow both sides to collapse.
  • Augmentations remove too much information.

Common Prevention Mechanisms

  • Negative examples, as in contrastive learning.
  • Stop-gradient or EMA target encoders, as in many joint-embedding methods.
  • Variance, covariance, or whitening penalties.
  • Predictor asymmetry between online and target branches.
  • Reconstruction or masked prediction targets that require input-specific information.

Diagnostics

Collapse should be measured, not guessed from the pretraining loss.

DiagnosticWhat it checksFailure signal
per-dimension variancewhether each embedding dimension carries variationmany dimensions near zero variance
covariance spectrumwhether representation uses multiple directionsone or few dominant eigenvalues
pairwise distance distributionwhether examples separate in embedding spacedistances concentrate near zero
nearest neighborswhether similarity is semantically meaningfulunrelated examples become nearest neighbors
linear probe or kNNwhether representation transfersno gain over simple baseline

For embeddings , a simple variance diagnostic is:

and a covariance diagnostic is:

If many are near zero or the spectrum of is nearly rank-one, the representation may be collapsed or highly anisotropic.

Collapse vs Useful Invariance

Not all removed variation is bad. A good representation can ignore nuisance factors while preserving task-relevant factors.

CaseInterpretation
low variance across augmented views, high variance across examplesdesired invariance
low variance across both views and examplescollapse
high variance but poor downstream probevariation exists but may be irrelevant
good train probe, poor split transfershortcut or leakage-sensitive representation

Checks

  • What is the batch-wise variance of embeddings?
  • Do nearest neighbors contain meaningful semantic or structural similarity?
  • Does a linear probe perform above a simple baseline?
  • Does collapse appear only for a specific augmentation policy, masking ratio, or target encoder update?
  • Are variance and covariance measured on held-out data, not only training batches?
  • Does the representation preserve variation relevant to the target split unit?