How Well Do Sparse Imagenet Models Transfer?

Eugenia Iofinova, Alexandra Peste, Mark Kurtz, Dan AlistarhCVPR 2021

Abstract

Transfer learning is a classic paradigm by which models pretrained on large “upstream” datasets are adapted to yield good results on “downstream” specialized datasets. Generally, more accurate models on the “upstream” dataset tend to provide better transfer accuracy “downstream”. In this work, we perform an in-depth investigation of this phenomenon in the context of convolutional neural networks (CNNs) trained on the ImageNet dataset, which have been pruned—that is, compressed by sparsifying their connections. We consider transfer using unstructured pruned models obtained by applying several state-of-the-art pruning methods, including magnitude-based, second-order, regrowth, lottery-ticket, and regularization approaches, in the context of twelve standard transfer tasks. Our study shows that sparse models can match or even outperform the transfer performance of dense models, even at high sparsities, and, while doing so, can lead to significant inference and even training speedups.

Introduction

In the field of deep learning, the prevailing trend has been toward increasingly larger models. However, the associated computational costs have led to the widespread adoption of pruning—removing redundant weights to create efficient "sparse" models. While the efficacy of sparse models on their original training tasks (e.g., ImageNet) is well-documented, their ability to serve as general-purpose feature extractors for transfer learning remained an open question. This study provides a systematic evaluation of whether pruned models retain the "general intelligence" required for downstream adaptation.

Methodology

The research evaluates ResNet50 and MobileNetV1 architectures pre-trained on ImageNet-1K. The authors conduct a "stress test" across a diverse suite of 12 downstream tasks, categorized into general tasks (e.g., CIFAR-10/100, Caltech-101/256, DTD, SUN397) and specialized tasks (e.g., FGVC Aircraft, Oxford Birds, Stanford Cars, Oxford Flowers, Food-101, Oxford-IIIT Pets). Additionally, object detection transfer is tested using YOLO architectures from COCO to Pascal VOC.

Two primary transfer learning strategies are evaluated:

  1. Linear Finetuning: The pre-trained backbone is frozen, and only the final classification head is trained. This evaluates the quality of the learned features.
  2. Full Finetuning: All model weights are updated, testing whether the sparse architecture (the "mask") is suitable for the new task.

Pruning methods are categorized into three groups: Progressive Sparsification (e.g., GMP, WoodFisher), which gradually removes weights during training; Sparse Regularization (e.g., AC/DC, STR, RigL), which uses penalties to encourage sparsity; and the Lottery Ticket Hypothesis (LTH), which seeks specific "lucky" sub-networks.

Results and Analysis

The experimental results challenge the assumption that pruning necessarily degrades transferability. Sparse models frequently match or even exceed the transfer accuracy of dense models.

Transfer performance comparison. Top: Validation accuracy at 80% sparsity across 12 tasks. Bottom: Relative error increase as sparsity increases from 80% to 98%.

Key Findings:

  • Performance Parity and Gains: At 90% sparsity, AC/DC-pruned models achieved 55.5% accuracy on the Aircraft dataset, significantly surpassing the dense baseline of 49.2%. This suggests that sparse regularization can act as a form of feature-level regularization, improving generalization on specialized tasks. Progressive methods like WoodFisher remained within 1% of dense accuracy across most tasks even at high sparsity levels.
  • Methodological Trade-offs: The optimal pruning method depends heavily on the finetuning approach. Regularization-based methods (AC/DC, RigL) are superior for linear finetuning. In contrast, progressive methods (GMP, WoodFisher) are the preferred choice for full finetuning, where the entire network is adapted to the new domain.
  • Object Detection and Efficiency: The study also found that sparse YOLO models transferred to Pascal VOC with minimal loss in Mean Average Precision (mAP). Furthermore, utilizing sparse backbones with sparsity-aware inference engines yielded 2–4x speedups in both training and inference times. This efficiency is critical for reducing the environmental and financial costs of model adaptation.

Practical Recommendations

Based on the findings, the authors propose a decision framework for practitioners looking to employ sparse transfer learning.

Decision tree for selecting a pruning strategy based on hardware constraints and task type.

If hardware or training time is a constraint, Linear Finetuning is recommended. Within this branch, specialized tasks benefit from Sparse Regularization (AC/DC, STR, RigL), while general tasks can utilize any pruning strategy. If constraints are not a factor, Full Finetuning with Progressive Sparsification (GMP, WoodFisher) typically yields the best results.

Conclusion

Sparse ImageNet models are remarkably effective transfer learners. They offer a path toward high-performance specialized models with significantly reduced computational footprints. Future work will extend these investigations to Vision Transformers (ViTs) and explore broader metrics such as model bias and robustness.

Summary updated

BibTeX
@inproceedings{iofinova2021how,
  author = {Eugenia Iofinova and Alexandra Peste and Mark Kurtz and Dan Alistarh},
  title = {{How Well Do Sparse Imagenet Models Transfer?}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=EQQOzoFGg6},
}
Figure