NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Do Self-Supervised and Supervised Methods Learn Similar Visual Representations?

Tom George Grigg, Dan Busbridge, Jason Ramapuram, Russ WebbarXiv 2021

TL;DR

This paper investigates whether self-supervised learning (SSL) and supervised learning (SL) create similar visual representations. Using a technique called Centered Kernel Alignment (CKA), they found that while both methods learn similar representations in the early and intermediate layers of a neural network, these representations diverge significantly in the final layers as each method optimizes for its specific objective. This suggests that the success of SSL might stem from learning useful intermediate features, rather than perfectly mimicking SL's final output.

What Problem Does This Paper Address?

The rapid progress in self-supervised learning (SSL) for computer vision has been impressive, with SSL methods closing the performance gap with traditional supervised learning (SL) on many tasks. However, a fundamental question remains: what exactly are these SSL methods learning? Do they build representations that are qualitatively similar to those learned through explicit supervision, or do they discover entirely different ways to represent visual information? Understanding this is crucial for designing better SSL objectives and for understanding the fundamental principles of representation learning. This paper aims to shed light on this by directly comparing the internal representations learned by a prominent contrastive SSL method (SimCLR) and supervised learning on a standard image classification task.

Methods

The core of this paper's methodology lies in Centered Kernel Alignment (CKA). CKA is a technique used to measure the similarity between the representations learned by different neural networks or different layers within the same network. It works by comparing the "Gram matrices" (which capture pairwise similarities between representations of different samples) of the feature maps from two different sources. A high CKA value indicates that the representations are structurally similar.

The authors applied CKA to compare:

  • Internal representations: How layers within a single trained model (either SL or SimCLR) relate to each other.
  • Cross-method representations: How representations from a SimCLR-trained model compare to those from an SL-trained model at corresponding layers.
  • Augmentation invariance: How representations change when the same image is augmented in different ways, specifically for the SimCLR objective.
  • Class separability: How well representations can be used to linearly classify images, by comparing them to "class representations."

They used a standard ResNet-50 architecture for both supervised and SimCLR training. For SimCLR, they followed the original framework and objective, while for supervised learning, they used the standard CIFAR-10 labels.

Datasets

  • CIFAR-10: This dataset was used for both training and evaluating the models. It's a widely used benchmark dataset consisting of 60,000 32x32 color images in 10 classes.

Key Insights and Ideas

  • Intermediate similarity, final divergence: The most striking finding is that while early and intermediate layers of SimCLR and SL models show high representational similarity, the final layers diverge significantly. This suggests that both methods learn a common "toolkit" of visual primitives in the early stages, but then specialize in different directions.
  • Dissimilar means, similar ends (partially): SimCLR and SL achieve similar intermediate representations through fundamentally different objectives. SimCLR focuses on learning augmentation invariance, while SL focuses on class discrimination.
  • SSL learns augmentation invariance, SL does not implicitly: The paper explicitly shows that SimCLR's representations become increasingly invariant to augmentations as they pass through the network, a direct consequence of its objective. SL, surprisingly, does not inherently learn this type of invariance.
  • The importance of intermediate representations: The authors propose that SimCLR's strong performance on downstream tasks likely stems from the class-informative intermediate representations it learns, rather than a perfect match in the final output layer.
  • Implications for auxiliary task design: This work raises critical questions about how to design future self-supervised tasks. Can we create label-free objectives that encourage learning intermediate representations more aligned with supervised learning, potentially leading to even better performance or transferability?

Key Results

  • High CKA in early/intermediate layers: The CKA values between corresponding layers of SimCLR and SL models are high in the initial and middle stages of the ResNet-50 backbone.
  • Low CKA in final layers: The CKA values drop significantly in the final block groups of the network, indicating a divergence in learned representations.
  • SimCLR learns augmentation invariance: Figure 3 (middle) shows a clear trend of increasing CKA between differently augmented versions of the same image as representations pass through the SimCLR network, especially in later layers.
  • SL does not learn augmentation invariance: The CKA between augmented images for SL models does not show a consistent increase and even decreases in some parts of the network.
  • Both methods improve linear separability: Linear probe accuracy increases monotonically with depth for both SimCLR and SL, indicating that both learn features that are increasingly useful for classification.
  • SL accelerates class mapping in final layers: Figure 3 (right) shows that SL representations align more rapidly with class representations in the final layers, as expected due to its direct optimization objective.

Limitations and Future Work

  • Limited scope of comparison: The study focuses on a single contrastive SSL method (SimCLR) and a single architecture (ResNet-50) on a single dataset (CIFAR-10). The authors acknowledge that other SSL methods and architectures might yield different results.
  • Focus on specific augmentations: The analysis of augmentation invariance is tied to the specific augmentations used by SimCLR.
  • Future Work: The authors pose several open questions:
  • Can we design label-free tasks that share more intermediate features with supervised learning?
  • Should we incorporate inductive biases like "mapping to the simplex" (similar to SL's objective) into SSL?
  • Are self-supervised representations more robust in multi-task or multi-distribution settings?
  • Investigating the role of different SSL objectives and architectures.

Summary updated

BibTeX
@misc{grigg2021do,
  author = {Tom George Grigg and Dan Busbridge and Jason Ramapuram and Russ Webb},
  title = {{Do Self-Supervised and Supervised Methods Learn Similar Visual Representations?}},
  year = {2021},
  eprint = {2110.00528},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.00528},
}
Figure