用强预训练ViT做教师,实现跨架构知识蒸馏的高效提升
ScaleKD: Strong Vision Transformers Could Be Excellent Teachers
- 设计跨注意力投影等三组件,解决特征范式、规模与知识密度差异
- 在ImageNet-1K上使多种学生模型性能提升2.6%至5.5%以上
- 适合需快速部署的模型场景,可减少99.5%训练样本需求
本文探讨了强预训练视觉变换器(ViT)能否作为具备可扩展性的教师模型,推动跨架构知识蒸馏研究,基于大规模数据集评估。为实现此目标,分析强调需解决特征计算范式、模型规模与知识密度差异问题。为此,提出简单有效的蒸馏方法ScaleKD,包含跨注意力投影、双视角特征模仿和教师参数感知三个组件。该方法可训练涵盖CNN、MLP及ViT等多种架构的学生模型,在ImageNet-1K上从零训练获得75.15%至85.53%的顶级准确率,相较各自独立训练提升3.05%至3.73%。当教师模型或其预训练数据集增大时,性能增益持续扩大。学生模型在MS-COCO和ADE20K下游任务中表现良好。更重要的是,若已有强预训练ViT,ScaleKD可替代耗时的预训练流程,将所需训练样本减少最多195倍。
原文摘要 · Abstract (English)
In this paper, we question if well pre-trained vision transformer (ViT) models could be used as teachers that exhibit scalable properties to advance cross architecture knowledge distillation (KD) research, in the context of using large-scale datasets for evaluation. To make this possible, our analysis underlines the importance of seeking effective strategies to align (1) feature computing paradigm differences, (2) model scale differences, and (3) knowledge density differences. By combining three coupled components namely cross attention projector, dual-view feature mimicking and teacher parameter perception tailored to address the above problems, we present a simple and effective KD method, called ScaleKD. Our method can train student backbones that span across a variety of convolutional neural network (CNN), multi-layer perceptron (MLP), and ViT architectures on image classification datasets, achieving state-of-the-art distillation performance. For instance, taking a well pre-trained Swin-L as the teacher model, our method gets 75.15%|82.03%|84.16%|78.63%|81.96%|83.93%|83.80%|85.53% top-1 accuracies for MobileNet-V1|ResNet-50|ConvNeXt-T|Mixer-S/16|Mixer-B/16|ViT-S/16|Swin-T|ViT-B/16 models trained on ImageNet-1K dataset from scratch, showing 3.05%|3.39%|2.02%|4.61%|5.52%|4.03%|2.62%|3.73% absolute gains to the individually trained counterparts. Intriguingly, when scaling up the size of teacher models or their pre-training datasets, our method showcases the desired scalable properties, bringing increasingly larger gains to student models. The student backbones trained by our method transfer well on downstream MS-COCO and ADE20K datasets. More importantly, our method could be used as a more efficient alternative to the time-intensive pre-training paradigm for any target student model if a strong pre-trained ViT is available, reducing the amount of viewed training samples up to 195x.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。