Pruning Convolutional Neural Networks with Self-Supervision

Mathilde Caron, Ari Morcos, Piotr Bojanowski, Julien Mairal, Armand JoulinarXiv 2020

Abstract: Convolutional neural networks trained without supervision come close to matching performance with supervised pre-training, but sometimes at the cost of an even higher number of parameters. Extracting subnetworks from these large unsupervised convnets with preserved performance is of particular interest to make them less computationally intensive. Typical pruning methods operate during training on a task while trying to maintain the performance of the pruned network on the same task. However, in self-supervised feature learning, the training objective is agnostic on the representation transferability to downstream tasks. Thus, preserving performance for this objective does not ensure that the pruned subnetwork remains effective for solving downstream tasks. In this work, we investigate the use of standard pruning methods, developed primarily for supervised learning, for networks trained without labels (i.e. on self-supervised tasks). We show that pruned masks obtained with or without labels reach comparable performance when re-trained on labels, suggesting that pruning operates similarly for self-supervised and supervised learning. Interestingly, we also find that pruning preserves the transfer performance of self-supervised subnetwork representations.

Introduction

Self-supervised learning (SSL) has significantly narrowed the performance gap with supervised learning in computer vision. However, these gains often come from massive, over-parameterized models. While pruning is a standard technique to reduce the computational footprint of supervised models, its application to SSL remains under-explored. The central question is whether pruning a network based on a self-supervised "proxy" task (like predicting image rotation) degrades the quality of the visual representations needed for downstream tasks like object classification.

Methodology

The researchers employed Unstructured Magnitude-Based Pruning, an iterative method that zeros out weights with the smallest magnitudes. This was applied to networks trained on three self-supervised pretext tasks:

  • RotNet: Predicting the rotation angle of an image.
  • Exemplar: Distinguishing between different augmented versions of the same image.
  • NPID (Non-Parametric Instance Discrimination): Treating each image as its own class.

Evaluation focused on two areas: feature transferability (training a linear classifier on frozen pruned features) and the Lottery Ticket Hypothesis (evaluating whether the discovered sparse "masks" can be successfully retrained).

Key Results: Transferability and Sparsity

A primary finding is that self-supervised models are remarkably resilient to pruning. As shown in Figure 2, pruning up to 90% of a network's weights (leaving only 10% remaining) does not significantly deteriorate feature quality across multiple downstream datasets, including Pascal VOC2007, Places205, and ImageNet.

Transfer performance across VOC07, Places205, and ImageNet as a function of network sparsity.

Interestingly, for methods like RotNet and Exemplar, moderate pruning actually improves transfer performance. This suggests that pruning may act as a regularizer, stripping away information specific to the proxy task while preserving more generalizable visual features.

Competitive Masks and the Lottery Ticket Hypothesis

The study distinguishes between the pruned architecture (the mask) and the initial weights (the winning tickets). The results indicate that structural masks discovered through self-supervision are nearly as effective as those found using supervised labels.

Comparison of performance for masks discovered via supervised vs. self-supervised (NPID) pruning.

When these self-supervised masks are retrained from scratch on labeled data, they match the performance of masks discovered via supervised pruning. This suggests that the "winning ticket" architectures for vision tasks are somewhat universal and can be identified without semantic labels. However, the specific initial weights found via SSL do not transfer as well as supervised initializations, implying that while the structure is universal, the weights remain task-dependent.

The CIFAR-10 Sparsity Trap

The authors highlight a critical observation for the pruning community: deep networks like ResNet-18 trained on CIFAR-10 naturally push a vast majority (80-85%) of their weights toward zero even without explicit pruning. This "natural sparsity" makes CIFAR-10 a poor benchmark for evaluating pruning algorithms, as high compression rates are achieved trivially.

Conclusion and Future Work

This work demonstrates that standard pruning techniques are highly effective for self-supervised models. Pruning not only maintains but can sometimes enhance the transferability of learned features. Future research should explore structured pruning (removing entire filters or layers) to achieve actual hardware speedups, as well as the sensitivity of "weight rewinding" in the early stages of self-supervised training.

Summary updated

BibTeX
@misc{caron2020pruning,
  author = {Mathilde Caron and Ari Morcos and Piotr Bojanowski and Julien Mairal and Armand Joulin},
  title = {{Pruning Convolutional Neural Networks with Self-Supervision}},
  year = {2020},
  eprint = {2001.03554},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.03554},
}
Figure