Abstract
In self-supervised learning (SSL), representations are learned via an auxiliary task without annotated labels. A common task is to classify augmentations or different modalities of the data, which share semantic content (e.g. an object in an image) but differ in style (e.g. the object's location). Many approaches to self-supervised learning have been proposed, e.g. SimCLR, CLIP and VicREG, which have recently gained much attention for their representations achieving downstream performance comparable to supervised learning. However, a theoretical understanding of the mechanism behind self-supervised methods eludes. Addressing this, we present a generative latent variable model for self-supervised learning and show that several families of discriminative SSL, including contrastive methods, induce a comparable distribution over representations, providing a unifying theoretical framework for these methods. The proposed model also justifies connections drawn to mutual information and the use of a "projection head". Learning representations by fitting the model generatively (termed SimVAE) improves performance over discriminative and other VAE-based methods on simple image benchmarks and significantly narrows the gap between generative and discriminative representation learning in more complex settings. Importantly, as our analysis predicts, SimVAE outperforms self-supervised learning where style information is required, taking an important step toward understanding self-supervised methods and achieving task-agnostic representations.
Introduction
Self-supervised learning (SSL) has seen explosive success with models like CLIP and SimCLR, which learn powerful representations without human-annotated labels. They typically work by "pulling together" different versions of the same image (augmentations) and "pushing apart" different images. However, we lack a rigorous mathematical understanding of why this works. Furthermore, standard SSL has a "content bias": it is excellent at identifying what is in an image but often discards "style" information (e.g., the dog's position or the lighting). This "representation collapse" makes these models less useful for downstream tasks like object localization or orientation detection. The authors aim to bridge the gap between the intuitive "pull/push" mechanics of SSL and formal probabilistic generative modeling.
The SSL Generative Model
The authors propose the SSL Model, a hierarchical generative latent variable model. In this model, a high-level variable ($y$) determines the semantic content, while a latent variable ($z$) governs the style and gives rise to differences between related samples. The actual data ($x$) is then sampled based on $z$.
The key technical contribution is showing that the loss functions of discriminative SSL (like InfoNCE) are essentially approximations of the Evidence Lower Bound (ELBO) of this generative model. Specifically, they show that discriminative SSL replaces the generative "reconstruction" term with an entropy term. This explains the "pull/push" mechanics: "pulling" related samples corresponds to fitting the mixture prior, while "pushing" unrelated samples acts as a substitute for the reconstruction term to prevent representation collapse.
SimVAE: Preserving Content and Style
To prove this theory's utility, the authors introduce SimVAE. Unlike standard SSL, which is discriminative, SimVAE fits the model generatively by maximizing the full ELBO, including the reconstruction term. This allows the model to learn a representation space that is clustered by content but still preserves the "style" nuances necessary to reconstruct the original image.
This framework also provides a theoretical justification for the "projection head" (extra layers added to the end of encoders). These layers allow the model to satisfy the SSL loss while letting the deeper layers maintain the variance needed for a true generative distribution. Furthermore, the authors argue that the perceived link between SSL and Mutual Information (MI) is not the fundamental mechanism, but rather a byproduct of substituting entropy for reconstruction.
Experimental Results
The researchers evaluated SimVAE on several standard image benchmarks, including MNIST, FashionMNIST, CelebA, and CIFAR10.
Qualitative Comparison
Reconstructions from SimVAE clearly preserve orientations and colors that are completely lost in the reconstructions from discriminative methods like SimCLR or VicREG. As shown in Figure 2, SimVAE maintains the fine-grained structural details of the original digits and clothing items.
Quantitative Performance
- Style Retrieval: On the CelebA dataset, SimVAE significantly outperformed discriminative methods like SimCLR and VicREG on "style" tasks (e.g., predicting hair color), showing a +14.8% improvement.
- Content Classification: SimVAE narrowed the performance gap between generative and discriminative models on CIFAR10, outperforming previous VAE-based methods by roughly 15%.
- Robustness: SimVAE proved more robust to the strength of data augmentations compared to vanilla VAEs, which often struggle when images are heavily cropped or color-distorted.
Conclusion
SimVAE takes an important step toward understanding self-supervised methods and achieving task-agnostic representations. While generative modeling remains inherently difficult compared to discriminative modeling, SimVAE significantly narrows the gap. Future work will focus on scaling generative SSL to larger, high-resolution datasets like ImageNet, potentially leading to new ways of learning representations that don't require knowing the downstream task in advance.
Summary updated