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.
| Diagnostic | What it checks | Failure signal |
|---|---|---|
| per-dimension variance | whether each embedding dimension carries variation | many dimensions near zero variance |
| covariance spectrum | whether representation uses multiple directions | one or few dominant eigenvalues |
| pairwise distance distribution | whether examples separate in embedding space | distances concentrate near zero |
| nearest neighbors | whether similarity is semantically meaningful | unrelated examples become nearest neighbors |
| linear probe or kNN | whether representation transfers | no 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.
| Case | Interpretation |
|---|---|
| low variance across augmented views, high variance across examples | desired invariance |
| low variance across both views and examples | collapse |
| high variance but poor downstream probe | variation exists but may be irrelevant |
| good train probe, poor split transfer | shortcut 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?