arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.01296cs.CV
收藏

TinyMIM:提取MIM预训练模型的实证研究

TinyMIM: An Empirical Study of Distilling MIM Pre-trained Models

Microsoft Research Asia(微软亚洲研究院)

Sucheng Ren, Fangyun Wei, Zheng Zhang, Han Hu

摘要:

掩码图像建模(MIM)在预训练大型视觉Transformer(ViTs)中表现强劲。然而,对于现实世界的应用程序至关重要的小模型不能或只能从这种预训练方法中获益。在本文中,我们探索了蒸馏技术,将基于MIM的大型预训练模型的成功转移到较小的模型中。我们系统地研究了蒸馏框架中的不同方案,包括蒸馏目标、损失、输入、网络正则化、顺序蒸馏等,发现:1)蒸馏标记关系比基于CLS标记和特征的蒸馏更有效;(二)当学生网络的深度与教师网络的深度不匹配时,教师网络的中间层作为目标比使用最后一层的效果更好。教师;有了这些发现,我们在ImageNet-1 K分类上使用所有ViT-Tiny,ViT-Small和ViT-base模型,分别获得了+4.2%/+2.4%/+1.4%的增益,比scratch MIM预训练的精度有了显着的微调提高。我们的TinyMIM模型在AE 20 K语义分割中实现了52.2 mIoU,比MAE基线高出+4.1。我们的TinyMIM小尺寸模型在ImageNet-1 K图像分类上达到了79.6%的top-1准确率,创下了相同尺寸和计算预算的小型视觉模型的新纪录。这种强大的性能表明了开发小型视觉Transformer模型的另一种方法,即通过探索更好的训练方法,而不是像大多数以前的作品那样将归纳偏差引入架构。代码可在https://github.com/OliverRensu/TinyMIM上获得。

英文摘要:

Masked image modeling (MIM) performs strongly in pre-training 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 ViT-base 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑