Masked Autoencoders Enable Efficient Knowledge Distillers

Yutong Bai, Zeyu Wang, Junfei Xiao, Chen Wei, Huiyu Wang +3 more
8/25/2022
cs.CV
transformer-attentioncontrastive-ssldistillation

Official code: UCSC-VLAA/DMAE (109 stars, Python, last commit 2023-07-24).

Abstract

This paper studies the potential of distilling knowledge from pre-trained models, especially Masked Autoencoders. Our approach is simple: in addition to optimizing the pixel reconstruction loss on masked inputs, we minimize the distance between the intermediate feature map of the teacher model and that of the student model.

Show full abstract

This design leads to a computationally efficient knowledge distillation framework, given 1) only a small visible subset of patches is used, and 2) the (cumbersome) teacher model only needs to be partially executed, ie, forward propagate inputs through the first few layers, for obtaining intermediate feature maps. Compared to directly distilling fine-tuned models, distilling pre-trained models substantially improves downstream performance. For example, by distilling the knowledge from an MAE pre-trained ViT-L into a ViT-B, our method achieves 84.0% ImageNet top-1 accuracy, outperforming the baseline of directly distilling a fine-tuned ViT-L by 1.2%. More intriguingly, our method can robustly distill knowledge from teacher models even with extremely high masking ratios: e.g., with 95% masking ratio where merely TEN patches are visible during distillation, our ViT-B competitively attains a top-1 ImageNet accuracy of 83.6%; surprisingly, it can still secure 82.4% top-1 ImageNet accuracy by aggressively training with just FOUR visible patches (98% masking ratio). The code and models are publicly available at https://github.com/UCSC-VLAA/DMAE.

View on arXivView PDF

Code Implementations(1)

UCSC-VLAA/DMAEOfficial100%

[CVPR 2023] This repository includes the official implementation our paper "Masked Autoencoders Enable Efficient Knowledge Distillers"

1096Python, ShellAug 22, 20223 years agoNOASSERTION

Similar Papers

Cite this paper

@article{bai2022masked,
  title  = {Masked Autoencoders Enable Efficient Knowledge Distillers},
  author = {Yutong Bai and Zeyu Wang and Junfei Xiao and Chen Wei and Huiyu Wang and Alan Yuille and Yuyin Zhou and Cihang Xie},
  year   = {2022},
  eprint = {2208.12256},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.12256}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.12256.svg)](https://codeofpaper.com/paper/2208.12256)

Discussion