Self-Supervised Disentanglement by Leveraging Structure in Data Augmentations

Cian Eastwood, Julius von Kügelgen, Linus Ericsson, Diane Bouchacourt, Pascal Vincent, Bernhard Schölkopf, Mark Ibrahim

TL;DR

Current self-supervised learning (SSL) methods often discard "style" information (like color or orientation) to focus on "content," which hurts performance on downstream tasks where that style actually matters. This paper introduces a framework that uses structured data augmentations to disentangle style into separate embedding spaces rather than throwing it away, backed by a formal causal proof that these latent attributes can be uniquely recovered.

What Problem Does This Paper Address?

In the world of self-supervised representation learning, the standard recipe is to take an image, apply two different random augmentations (like cropping and color jittering), and tell a neural network to produce the same embedding for both. The goal is to make the representation invariant to these changes—essentially teaching the model that "style" (color, rotation) is a nuisance to be discarded so it can focus on "content" (object identity).

However, the authors argue that "universal pre-training" is still an unsolved problem because one task’s style is another task’s content. If you discard color information to recognize a dog on ImageNet, your model will struggle with a downstream task like fine-grained flower classification, where color is a primary distinguishing feature. Current methods try to strike a balance by tuning the "amount" of invariance, but this is a fragile, task-specific fix.

Methods

The authors propose a shift from discarding style to disentangling it. Instead of one embedding space, they learn $M+1$ spaces: one for content ($Z_0$) and $M$ for specific style attributes ($Z_1, \dots, Z_M$).

The core innovation lies in how they structure data augmentations. Rather than applying random transformations, they construct specific pairs of views that share different attributes:

  • Pair 0: Shares only content (different color, different rotation).
  • Pair 1: Shares content and color (same color, different rotation).
  • Pair 2: Shares content and rotation (different color, same rotation).

By routing these pairs through separate "projector" networks ($g_0, g_1, g_2$), they enforce invariance within each specific space. For example, the "color" space $Z_1$ is trained to be invariant to rotation but not to color. To prevent the model from just copying the same information into every space, they maximize the joint entropy across all spaces, forcing them to capture distinct, non-redundant information.

Figure 1: Framework overview. Given M atomic transformations like color distortion or rotation (here, M = 2), we learn a “content” embedding space (Z0) that is invariant to all transformations and M “style” embedding spaces (Z1, Z2) that are each invariant to all-but-the-mth atomic transformation. To do so, we construct M+1 transformation pairs (tm, t′m) sharing different transformation parameters and use these to create M+1 transformed image pairs (˜xm, ˜x′m) sharing different features. After routing each pair to a different space, we: (i) enforce invariance within each space; and (ii) maximize entropy across the joint spaces. The result is M+1 disentangled embedding spaces.

The paper also provides a rigorous theoretical grounding using Causal Representation Learning. They model the data as being generated by independent latent variables (content and styles) and prove that their specific objective function can uniquely identify and recover these variables up to a simple invertible transformation.

Datasets

The authors evaluated their approach across three levels of complexity:

  1. Numerical Dataset: A synthetic latent-variable model used to verify the theoretical claims of identifiability.
  2. ColorDSprites: A version of the classic DSprites dataset (2D shapes) modified with colors, allowing for precise measurement of how well the model recovers ground-truth factors like shape, scale, and orientation.
  3. ImageNet-1k: The standard large-scale benchmark for real-world performance. They used a blurred-face version and evaluated the resulting representations on 13 diverse downstream tasks, including texture classification (DTD), flower species recognition, and object detection (VOC2007).

Key Insights and Ideas

  • Disentanglement is better than Invariance: By creating a "home" for style information, the model doesn't have to choose between keeping it (and polluting the content representation) or discarding it (and losing useful features).
  • Structure is the Key to Identifiability: Unsupervised disentanglement is famously difficult (or impossible without assumptions). This paper shows that the structure we already build into our data augmentations provides the "weak supervision" needed to make disentanglement mathematically provable.
  • The Projector Mystery: A surprising finding was that while their method significantly improved the information content in the post-projector embeddings ($z$), the gains were less pronounced in the pre-projector representations ($h$). This adds weight to the growing research interest in understanding why projectors are so critical in SSL.

Key Results

On the ColorDSprites benchmark, the authors showed that their adaptive training could reliably remove style from the content space even when the model had "excess capacity" (i.e., the embedding dimension was larger than the true number of content factors).

On ImageNet, the results were even more striking. When training from scratch with their method (+ Ours-Scratch), they saw a massive boost in downstream performance for tasks that rely on style. For "Spatial" tasks (like keypoint estimation), the performance (measured by $r^2$) jumped from 23.8 (standard SimCLR) to 39.1.

ImageNet results comparing standard SSL methods against the proposed disentanglement framework.

Crucially, this improved downstream "universality" came at a slight cost to ImageNet-Top1 accuracy. This confirms the authors' hypothesis: standard SSL over-optimizes for ImageNet by discarding style, which helps on ImageNet but hurts almost everywhere else.

Limitations and Future Work

  • Projector Role: The fact that improvements were mostly seen in the $z$ space rather than the $h$ space is a limitation for practitioners who typically use $h$ for downstream tasks. The authors suggest future work should investigate how to better propagate these style-retaining benefits back into the main backbone.
  • Augmentation Knowledge: The method requires the user to group augmentations into meaningful "style" categories (e.g., grouping jitter and grayscale into "appearance"). Automating this grouping would be a significant next step.
  • Training Stability: The authors noted that training their method from scratch with VICReg was unstable, suggesting that the choice of base SSL algorithm matters.

Summary updated

BibTeX
@inproceedings{eastwood2023self,
  author = {Cian Eastwood and Julius von Kügelgen and Linus Ericsson and Diane Bouchacourt and Pascal Vincent and Bernhard Schölkopf and Mark Ibrahim},
  title = {{Self-Supervised Disentanglement by Leveraging Structure in Data Augmentations}},
  booktitle = {CRL @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=JoISqbH8vl},
}
Figure