Towards Demystifying Representation Learning with Non-contrastive Self-supervision

Xiang Wang, Xinlei Chen, Simon Shaolei Du, Yuandong Tian

TL;DR

Non-contrastive self-supervised learning (nc-SSL) methods like BYOL and SimSiam avoid representation collapse without negative pairs, but why they work remains poorly understood. This paper proves that in linear networks, weight decay acts as an implicit threshold that discards high-variance ("nuisance") features while preserving low-variance ("invariant") features, reducing downstream sample complexity from $\Omega(d)$ to $O(r)$. Leveraging these theoretical insights, the authors propose DirectCopy, a streamlined algorithm that removes expensive eigen-decompositions while matching or outperforming prior approaches across standard benchmarks.

What Problem Does This Paper Address?

Traditional contrastive learning avoids trivial (constant) representations by pulling positive pairs together and pushing negative pairs apart. Recently, non-contrastive SSL (nc-SSL) methods showed that you can achieve state-of-the-art representations using only positive pairs by combining an asymmetric architecture (an extra predictor network) with a stop-gradient operation.

While recent work explained why gradient dynamics prevent representation collapse, fundamental questions remained open:

  1. What representation is actually learned?
  2. How does data augmentation interact with learning dynamics to improve downstream performance?
  3. Does the learned representation provably reduce sample complexity on downstream tasks?

Methods

The authors analyze nc-SSL through a generalized framework called $\text{DirectSet}(\alpha)$, where the predictor weight matrix $W_p$ is directly set via the correlation matrix $F$ of predictor inputs ($W_p \propto F^\alpha + \epsilon I$). Prior work (DirectPred) is a special case with $\alpha = 1/2$, which requires a computationally expensive eigen-decomposition at every step.

Key theoretical and algorithmic contributions include:

  • Theoretical Dynamics in Linear Networks: Under a model where data consists of an invariant feature subspace $S$ (dimension $r$) and a nuisance subspace $B$ corrupted by augmentation noise $\sigma^2 P_B$, the authors analyze gradient flow and descent dynamics.
  • Sample Complexity Bounds: A formal proof showing that ridge regression on the learned representations recovers downstream ground-truth weights with $O(r + \log(1/\zeta))$ samples rather than the ambient dimension $\Omega(d)$.
  • DirectCopy ($\alpha = 1$): By setting $\alpha = 1$, the predictor becomes a direct, normalized copy of the correlation matrix $F$ ($W_p = F / \|F\| + \epsilon I$). This completely bypasses eigen-decomposition, relying solely on matrix normalization (or even unnormalized running statistics).

Datasets

The authors evaluate DirectCopy on four standard computer vision benchmarks:

  • STL-10 (evaluated at 100, 300, and 500 epochs)
  • CIFAR-10 (evaluated at 100, 300, and 500 epochs)
  • CIFAR-100 (evaluated at 100, 300, and 500 epochs)
  • ImageNet (100 epochs, standard linear evaluation protocol)

No new datasets were introduced; the paper focuses on standard linear evaluation protocols on top of ResNet-18 (for STL-10 and CIFAR) and ResNet-50 (for ImageNet).

Key Insights and Ideas

  • Weight decay is an implicit feature filter: The weight decay hyperparameter $\eta$ determines the exact cutoff for feature retention. Specifically, features with augmentation variance $\sigma^2$ collapsing to zero require $\eta > \frac{1}{4(1+\sigma^2)}$. Nuisance features (high variance under augmentations) fall above this threshold and are zeroed out, whereas invariant features (low variance) are preserved.
  • Balance is vital: If weight decay $\eta$ is too low, nuisance features are not suppressed; if $\eta$ is too high, invariant features also collapse.
  • Predictor regularization ($\epsilon$) controls the basin of attraction: A moderate regularizer $\epsilon$ expands the basin of attraction toward non-trivial solutions, allowing the network to converge from smaller initializations. However, setting $\epsilon$ too large collapses the representation.
  • Eigen-decomposition is unnecessary: DirectPred needed an expensive square-root eigenspace calculation ($\alpha = 1/2$). DirectCopy ($\alpha = 1$) provably converges to the exact same projection space (with an even larger scaling factor), drastically simplifying implementation and reducing per-batch computational overhead.

Key Results

  • ImageNet (100 epochs, ResNet-50): DirectCopy achieves 68.8% top-1 linear probe accuracy, outperforming both DirectPred (68.5%) and a strong gradient-based linear predictor baseline (68.6%).
  • STL-10 (ResNet-18): DirectCopy reaches 82.95% at 500 epochs, substantially higher than DirectPred (78.86%) and the gradient-based SGD baseline (75.25%).
  • CIFAR-10 & CIFAR-100: DirectCopy matches or exceeds DirectPred at longer training horizons (e.g., reaching 89.62% vs. 89.52% on CIFAR-10 at 500 epochs).
  • Robust Normalization: Ablation shows DirectCopy performs equally well whether $F$ is normalized by spectral norm, Frobenius norm, or not normalized at all over longer schedules.

Limitations and Future Work

  • Linear vs. Nonlinear Dynamics: The mathematical proofs assume linear networks. In deep nonlinear models, empirical observations show that discarded nuisance features actually undergo a resurgence in later training epochs—a phenomenon correlated with improved downstream accuracy that linear theories cannot currently explain.
  • Simplified Data Assumptions: The theoretical analysis assumes Gaussian distributions and an orthogonal split between invariant and nuisance subspaces, which simplifies real-world image manifold geometries.
  • Predictor Complexity: While DirectCopy eliminates predictor eigen-decomposition, understanding the gap between single-layer linear predictors and multi-layer nonlinear predictors in deep Siamese networks remains an open theoretical challenge.

Summary updated

BibTeX
@inproceedings{wang2022towards,
  author = {Xiang Wang and Xinlei Chen and Simon Shaolei Du and Yuandong Tian},
  title = {{Towards Demystifying Representation Learning with Non-contrastive Self-supervision}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=yCS5dckx_vj},
}
Figure