[Paper Review] Guillotine Regularization: Why removing layers is needed to improve generalization in Self-Supervised Learning
This paper introduces Guillotine Regularization—a technique that improves generalization in self-supervised learning (SSL) by removing the final projector head layers after training, despite the SSL objective being optimized at those layers. The key finding is that the optimal layer for downstream tasks is often not the last projector layer, but an intermediate layer, and this performance gain arises from misalignment between the SSL pretext task and downstream task; reducing this misalignment via better positive pair design diminishes the need for Guillotine Regularization.
One unexpected technique that emerged in recent years consists in training a Deep Network (DN) with a Self-Supervised Learning (SSL) method, and using this network on downstream tasks but with its last few projector layers entirely removed. This trick of throwing away the projector is actually critical for SSL methods to display competitive performances on ImageNet for which more than 30 percentage points can be gained that way. This is a little vexing, as one would hope that the network layer at which invariance is explicitly enforced by the SSL criterion during training (the last projector layer) should be the one to use for best generalization performance downstream. But it seems not to be, and this study sheds some light on why. This trick, which we name Guillotine Regularization (GR), is in fact a generically applicable method that has been used to improve generalization performance in transfer learning scenarios. In this work, we identify the underlying reasons behind its success and show that the optimal layer to use might change significantly depending on the training setup, the data or the downstream task. Lastly, we give some insights on how to reduce the need for a projector in SSL by aligning the pretext SSL task and the downstream task.
Motivation & Objective
- To investigate why removing the final projector layers in SSL models significantly improves downstream performance despite the SSL objective being optimized at those layers.
- To identify the root causes behind the effectiveness of this counterintuitive practice, termed Guillotine Regularization.
- To examine how training optimization, data distribution, and downstream task characteristics influence the optimal layer for transfer learning.
- To demonstrate that reducing the misalignment between the SSL pretext task and downstream task decreases reliance on Guillotine Regularization.
- To advocate for systematic evaluation across multiple layers during transfer learning, rather than defaulting to the backbone or final projector layer.
Proposed method
- The authors introduce Guillotine Regularization as a post-training layer removal technique, distinct from architectural modifications like adding a projector.
- They evaluate linear probes at various layers of ResNet50 models trained with multiple SSL methods (e.g., SimCLR, MoCo, BYOL) to compare downstream performance across layers.
- They experiment with two alternative positive pair definitions: nearest neighbors from a pretrained SSL model and class-based pairs from ImageNet labels, to test alignment with downstream tasks.
- They use a conditional generative model (RCDM) to visualize and compare the information content retained in representations across different network layers.
- They train models with standard data augmentations (crop, color jitter, blur, solarization) and use a 3-layer MLP head for all SSL methods to ensure consistency.
- They conduct ablation studies across optimization, data, and downstream tasks to assess layer selection sensitivity.
Experimental results
Research questions
- RQ1Why does removing the final projector layers in self-supervised models lead to significant performance gains on downstream tasks?
- RQ2How does the alignment between the SSL pretext task and the downstream task affect the necessity of Guillotine Regularization?
- RQ3Does the optimal layer for transfer learning vary depending on the training setup, data distribution, or downstream task?
- RQ4Can the need for Guillotine Regularization be reduced by redefining positive pairs in the SSL pretext task to better align with downstream objectives?
- RQ5To what extent do intermediate layers contain more transferable and generalizable features than the final projector layer in SSL?
Key findings
- Removing the final projector layers (Guillotine Regularization) can improve ImageNet linear probe accuracy by up to 30 percentage points in some SSL methods, despite the SSL objective being optimized at those layers.
- The optimal layer for downstream performance is not always the final projector layer; in many cases, intermediate layers outperform both the backbone and the projector.
- When positive pairs in SSL are defined using class-level similarity (e.g., same ImageNet class), the performance gap between the backbone and projector layers diminishes significantly.
- Using nearest-neighbor-based positive pairs reduces the performance gap between backbone and projector layers, indicating that better alignment between pretext and downstream tasks reduces the need for Guillotine Regularization.
- The representation at the final projector layer often loses high-level semantic information (e.g., breed identity in dogs), while intermediate layers preserve such information better, as shown by conditional generation with RCDM.
- The effectiveness of Guillotine Regularization is highly sensitive to training setup, data, and downstream task, indicating no universal optimal layer across all scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.