Rethinking Evaluation Protocols of Visual Representations Learned via Self-supervised Learning

Jae-Hun Lee, Doyoung Yoon, Byeongmoon Ji, Kyungyul Kim, Sangheum HwangarXiv 2023 · DOI

TL;DR

This paper reveals that common evaluation methods for self-supervised learning (SSL) visual representations, like linear probing (LP) and transfer learning (TL), are highly sensitive to hyperparameters. The authors propose simple fixes: input normalization for LP and careful consideration of weight decay during pre-training for TL, leading to more reliable and comparable evaluations of SSL models.

What Problem Does This Paper Address?

Self-supervised learning (SSL) has become a dominant paradigm for learning visual representations from vast amounts of unlabeled data. The quality of these learned representations is typically assessed using two main protocols: linear probing (LP), where a linear classifier is trained on frozen features from an upstream dataset (like ImageNet), and transfer learning (TL), where a pre-trained SSL model is fine-tuned on various downstream tasks. While SSL methods have shown impressive results, this paper highlights a critical issue: the reported performance is often highly dependent on the specific hyperparameters chosen for LP and TL. This sensitivity makes it difficult to fairly compare different SSL methods and to determine if a model has learned truly generic, adaptable representations. The authors aim to uncover the root causes of this hyperparameter sensitivity in current evaluation protocols and propose more robust evaluation strategies.

Methods

The core of this research involves extensive empirical experiments to dissect the sources of performance sensitivity in LP and TL.

  • For Linear Probing (LP): The authors investigate the impact of input normalization. They hypothesize that the lack of consistent normalization for the features fed into the linear classifier is a key factor in performance variations. They specifically test the effect of applying Batch Normalization (BN) before the linear classifier.
  • For Transfer Learning (TL): The researchers explore various hyperparameters during the upstream pre-training phase of SSL models. They focus on identifying which pre-training parameters significantly influence the downstream transferability of the learned representations. Their experiments specifically highlight the role of weight decay during SSL pre-training.
  • Cross-setting Experiments: A crucial aspect of their methodology is conducting "cross-setting" experiments. This involves evaluating models trained with one SSL method's hyperparameters using the evaluation settings (LP or TL) of another method. This helps to isolate the impact of the evaluation protocol itself versus the inherent properties of the learned representations.

Datasets

The paper utilizes several standard datasets for their experiments:

  • ImageNet [9]: Used for pre-training and as an upstream dataset for linear probing and k-NN evaluations.
  • CIFAR-100 [20]: A multi-class image classification dataset used for transfer learning.
  • Oxford Flowers 102 [25]: A fine-grained image classification dataset used for transfer learning.
  • Stanford Cars [19]: A fine-grained dataset of car classes used for transfer learning.
  • iNaturalist [18, 19]: Datasets for natural fine-grained categories used for transfer learning.

No new benchmarks were introduced; the focus was on re-evaluating existing benchmarks and protocols.

Key Insights and Ideas

  • LP is Fragile Without Normalization: The performance of linear probing is surprisingly sensitive to the input features' distribution. Without consistent normalization (like Batch Normalization), different SSL models can show vastly different performance rankings, even when using the same downstream task.
  • BN is a Game-Changer for LP: Applying Batch Normalization before the linear classifier in LP significantly stabilizes performance across different hyperparameter settings. It also helps align the rankings from LP and k-NN evaluations, suggesting it makes LP a more reliable measure of discriminability.
  • Weight Decay is the Hidden Lever for TL: The transferability of SSL representations is not solely determined by the downstream fine-tuning hyperparameters. Instead, a crucial, often overlooked, factor is the weight decay used during the upstream SSL pre-training. This parameter has a profound impact on how well the learned features generalize to new tasks.
  • Discriminability vs. Transferability Disconnect: Metrics like LP and k-NN, which measure discriminability on the upstream dataset, do not reliably predict transferability to downstream tasks. A model might perform well on LP but poorly on TL, or vice versa, due to factors like weight decay.
  • Supervised Models are More Robust (to evaluation settings): While SSL models show significant performance swings with evaluation hyperparameters, standard supervised models (like DeiT) tend to be much more stable, suggesting that label supervision helps learn more inherently robust features.

Key Results

  • LP Stability with BN: Applying BN to LP evaluations eliminated performance variations across different hyperparameter settings for most SSL methods, reducing the gap from 3-26% to around 1%.
  • TL Instability: Transfer learning performance showed significant gaps of up to 86.24% across different TL hyperparameter settings for various SSL models.
  • Weight Decay Impact on TL: Experiments showed that varying the weight decay during SSL pre-training (e.g., from 0.04 to 0.04→0.2) could drastically change TL performance and stability. For instance, Mugs and DINO showed much more stable TL performance with a weight decay of 0.04→0.2 compared to other values.
  • Loss Landscape and CKA: Analysis using loss landscapes and Centered Kernel Alignment (CKA) supported the findings, showing that appropriate weight decay leads to flatter loss landscapes and better feature reusability, correlating with improved transferability.

Limitations and Future Work

  • Hyperparameter Search Space: The paper acknowledges that while they identified key factors, exploring the entire hyperparameter space for every SSL method and dataset is computationally prohibitive.
  • Focus on ViT: The experiments primarily used Vision Transformer (ViT) architectures. While the findings are likely generalizable, further validation on other architectures might be beneficial.
  • Recommendations for Evaluation: The authors strongly recommend incorporating input normalization (BN) into LP evaluations and carefully considering the weight decay parameter during SSL pre-training when assessing transferability. They call for a re-evaluation of current SSL evaluation protocols to ensure they provide a more accurate and robust assessment of model quality.
  • Future Work: The paper implicitly suggests that future research should focus on developing SSL methods that are inherently robust to evaluation hyperparameter variations, or on developing more sophisticated evaluation metrics that capture both discriminability and transferability more effectively.

Summary updated

BibTeX
@misc{lee2023rethinking,
  author = {Jae-Hun Lee and Doyoung Yoon and Byeongmoon Ji and Kyungyul Kim and Sangheum Hwang},
  title = {{Rethinking Evaluation Protocols of Visual Representations Learned via Self-supervised Learning}},
  year = {2023},
  eprint = {2304.03456},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.03456},
}
Figure