TinyMIM: An Empirical Study of Distilling MIM Pre-trained Models
Sucheng Ren, Fangyun Wei, Zheng Zhang, Han Hu
Abstract
Masked image modeling (MIM) performs strongly in pretraining large vision Transformers (ViTs). However, small models that are critical for real-world applications cannot or only marginally benefit from this pre-training approach. In this paper, we explore distillation techniques to transfer the success of large MIM-based pre-trained models to smaller ones. We systematically study different options in the distillation framework, including distilling targets, losses, input, network regularization, sequential distillation, etc, revealing that: 1) Distilling token relations is more effective than CLS token-and feature-based distillation; 2) An intermediate layer of the teacher network as target perform better than that using the last layer when the depth of the student mismatches that of the teacher; 3) Weak regularization is preferred; etc. With these findings, we achieve significant fine-tuning accuracy improvements over the scratch MIM pre-training on ImageNet-1K classification, using all the ViT-Tiny, ViT-Small, and ViTbase models, with +4.2%/+2.4%/+1.4% gains, respectively. Our TinyMIM model of base size achieves 52.2 mIoU in AE20K semantic segmentation, which is +4.1 higher than the MAE baseline. Our TinyMIM model of tiny size achieves 79.6% top-1 accuracy on ImageNet-1K image classification, which sets a new record for small vision models of the same size and computation budget. This strong performance suggests an alternative way for developing small vision Transformer models, that is, by exploring better training methods rather than introducing inductive biases into architectures as in most previous works. Code is available at https://github.com/OliverRensu/TinyMIM .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
21 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- How Well Do Supervised 3D Models Transfer to Medical Imaging Tasks? cites Learning Transferable Visual Models From Natural Language Supervision
- UltraPixel: Advancing Ultra High-Resolution Image Synthesis to New Peaks cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- REPA Works Until It Doesn't: Early-Stopped, Holistic Alignment Supercharges Diffusion Training cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- REPA Works Until It Doesn't: Early-Stopped, Holistic Alignment Supercharges Diffusion Training cites Learning Transferable Visual Models From Natural Language Supervision
- SG-Former: Self-guided Transformer with Evolving Token Reallocation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- SG-Former: Self-guided Transformer with Evolving Token Reallocation cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- SG-Former: Self-guided Transformer with Evolving Token Reallocation cites Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Learning Transferable Visual Models From Natural Language Supervision
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
- Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling White-Box Transformers for Vision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling White-Box Transformers for Vision cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Scaling White-Box Transformers for Vision cites Learning Transferable Visual Models From Natural Language Supervision
- Scaling White-Box Transformers for Vision cites Training data-efficient image transformers & distillation through attention
Cited by top-tier papers21
- UltraPixel: Advancing Ultra High-Resolution Image Synthesis to New PeaksJingjing Ren, Wenbo Li, Haoyu Chen, Renjing Pei et al.NeurIPS 2024 · 74 citations
- SG-Former: Self-guided Transformer with Evolving Token ReallocationSucheng Ren, Xingyi Yang, Songhua Liu, Xinchao WangICCV 2023 · 70 citations
- REPA Works Until It Doesn't: Early-Stopped, Holistic Alignment Supercharges Diffusion TrainingZiqiao Wang, Wangbo Zhao, Yuhao Zhou, Zekai Li et al.NeurIPS 2025 · 37 citations
- How Well Do Supervised 3D Models Transfer to Medical Imaging Tasks?Wenxuan Li, Alan L. Yuille, Zongwei ZhouICLR 2024 · 21 citations
- Scaling White-Box Transformers for VisionJinrui Yang, Xianhang Li, Druv Pai, Yuyin Zhou et al.NeurIPS 2024 · 20 citations
Builds on29
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le et al.ICCV 2019 · 9,163 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
Related papers
- Masked Image Modeling with Denoising ContrastKun Yi, Yixiao Ge, Xiaotong Li, Shusheng Yang et al.ICLR 2023 · 8 citations
- Asymmetric Masked Distillation for Pre-Training Small Foundation ModelsZhiyu Zhao, Bingkun Huang, Sen Xing, Gangshan Wu et al.CVPR 2024 · 6 citations
- All Tokens Matter: Token Labeling for Training Better Vision TransformersZihang Jiang, Qibin Hou, Li Yuan, Daquan Zhou et al.NeurIPS 2021 · 252 citations
- Generic-to-Specific Distillation of Masked AutoencodersWei Huang, Zhiliang Peng, Li Dong, Furu Wei et al.CVPR 2023
- Masked Image Residual Learning for Scaling Deeper Vision TransformersGuoxi Huang, Hongtao Fu, Adrian G. BorsNeurIPS 2023 · 10 citations
