Skip to main content
QUICK REVIEW

[Paper Review] Reverse Engineering Self-Supervised Learning

Ido Ben-Shaul, Ravid Shwartz-Ziv|arXiv (Cornell University)|May 24, 2023
Domain Adaptation and Few-Shot LearningComputer Science11 citations
TL;DR

The paper empirically analyzes SSL representations, showing SSL induces semantic clustering and data compression driven by regularization, and that semantic alignment improves across layers and hierarchies without access to labels during training.

ABSTRACT

Self-supervised learning (SSL) is a powerful tool in machine learning, but understanding the learned representations and their underlying mechanisms remains a challenge. This paper presents an in-depth empirical analysis of SSL-trained representations, encompassing diverse models, architectures, and hyperparameters. Our study reveals an intriguing aspect of the SSL training process: it inherently facilitates the clustering of samples with respect to semantic labels, which is surprisingly driven by the SSL objective's regularization term. This clustering process not only enhances downstream classification but also compresses the data information. Furthermore, we establish that SSL-trained representations align more closely with semantic classes rather than random classes. Remarkably, we show that learned representations align with semantic classes across various hierarchical levels, and this alignment increases during training and when moving deeper into the network. Our findings provide valuable insights into SSL's representation learning mechanisms and their impact on performance across different sets of classes.

Motivation & Objective

  • Investigate how SSL-trained representations cluster with respect to sample augmentations and semantic classes.
  • Explore the role of regularization versus invariance in driving clustering.
  • Assess whether SSL representations align with semantic classes across hierarchical levels.
  • Examine how clustering and semantic alignment evolve across network layers during training.

Proposed method

  • Train SSL models (e.g., VICReg) on CIFAR-100 using standard augmentations. Measure clustering via nearest class-center (NCC) accuracy and class-variance metrics (CDNV). Analyze sample-level versus semantic-class clustering dynamics over training epochs. Decompose SSL loss into invariance and regularization components to assess their impact. Estimate mutual information between input and embeddings during training (MINE). Evaluate linear probe performance and hierarchical clustering across layers and targets (samples, 100 classes, 20 superclasses).
  • Use RES-L-H (ResNet variant) backbones with a two-layer MLP projection head for VICReg experiments.
  • Compare SSL clustering to supervised clustering with and without data augmentation to contextualize results.
  • Explore target randomness by creating target labels with varying semantic meaningfulness and track learning.
  • Examine intermediate layers to determine how hierarchical semantic targets are captured across depth.
Figure 1 : SSL training induced semantic clustering. UMAP visualization of the SSL representations before and after training in different hierarchies. (top) Augmentations of five different samples, each sample colored distinctly. (middle) Samples from five different classes within the standard CIFAR
Figure 1 : SSL training induced semantic clustering. UMAP visualization of the SSL representations before and after training in different hierarchies. (top) Augmentations of five different samples, each sample colored distinctly. (middle) Samples from five different classes within the standard CIFAR

Experimental results

Research questions

  • RQ1Do SSL-trained representations cluster data with respect to semantic classes in addition to augmentations?
  • RQ2What is the role of the regularization term in SSL in promoting semantic clustering and information compression?
  • RQ3How does alignment to semantic targets evolve as training progresses and as we move deeper into the network?
  • RQ4Can SSL representations learn and reflect hierarchical class structures (samples, original classes, superclasses) across layers?
  • RQ5How does the randomness of targets affect the ability of SSL representations to align with semantic structure?

Key findings

  • SSL training induces strong clustering of augmented samples around their mean embeddings, and increasingly clusters by semantic classes at later training stages.
  • Regularization, not invariance, primarily drives improvements in semantic clustering and downstream linear accuracy, with invariance saturating early.
  • Representations show high alignment with semantic classes across hierarchies, even without label information during SSL training.
  • Clustering into semantic classes improves across deeper layers and deeper layers better capture high-level hierarchies (superclasses) than original classes.
  • Mutual information between input and embeddings decreases over training, indicating implicit information compression.
  • SSL models exhibit neural-collapse-like centroid structures at the sample level, with persistent semantic clustering that strengthens over training.
Figure 6 : SSL algorithms cluster the data with respect to semantic targets. (right) The results in Figure 2 . (left) The unnormalized version of the same results.
Figure 6 : SSL algorithms cluster the data with respect to semantic targets. (right) The results in Figure 2 . (left) The unnormalized version of the same results.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.