A Knowledge- Distillation - Integrated Pruning Method for Vision Transformer

Bangguo Xu, Tiankui Zhang, Yapeng Wang, Zeren Chen
{"title":"A Knowledge- Distillation - Integrated Pruning Method for Vision Transformer","authors":"Bangguo Xu, Tiankui Zhang, Yapeng Wang, Zeren Chen","doi":"10.1109/ISCIT55906.2022.9931309","DOIUrl":null,"url":null,"abstract":"Vision transformers (ViTs) have made remarkable achievements in various computer vision applications such as image classification, object detection, and image segmentation. Since the self-attention mechanism introduced by itself can model the relationship between all pixels of the input image, the performance of the ViTs model is significantly improved compared to the traditional CNN network. However, their storage, runtime memory and computing requirements hinder their deployment on edge devices. This paper proposes a ViT pruning method with knowledge distillation, which can prune the ViT model and avoid the performance loss of the model after pruning. Based on the idea that knowledge distillation can make the student model improve the performance of the model by learning the unique knowledge of the teacher model, the convolution neural network (CNN) which has the unique ability of parameter sharing and local receptive field is used as a teacher model to guide the training of the ViT model and enable the ViT model to obtain the same ability. In addition, some important parts may be cut during pruning, resulting in irreversible loss of model performance. To solve this problem, this paper designs the importance score learning module to guide the pruning work, and determines that the pruning work removes the unimportant parts of the model. Finally, this paper compares the pruned model with other methods in terms of accuracy, Floating Point Operations(FLOPs) and model parameters on ImageNet-1k.","PeriodicalId":325919,"journal":{"name":"2022 21st International Symposium on Communications and Information Technologies (ISCIT)","volume":"28 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-09-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 21st International Symposium on Communications and Information Technologies (ISCIT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISCIT55906.2022.9931309","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Vision transformers (ViTs) have made remarkable achievements in various computer vision applications such as image classification, object detection, and image segmentation. Since the self-attention mechanism introduced by itself can model the relationship between all pixels of the input image, the performance of the ViTs model is significantly improved compared to the traditional CNN network. However, their storage, runtime memory and computing requirements hinder their deployment on edge devices. This paper proposes a ViT pruning method with knowledge distillation, which can prune the ViT model and avoid the performance loss of the model after pruning. Based on the idea that knowledge distillation can make the student model improve the performance of the model by learning the unique knowledge of the teacher model, the convolution neural network (CNN) which has the unique ability of parameter sharing and local receptive field is used as a teacher model to guide the training of the ViT model and enable the ViT model to obtain the same ability. In addition, some important parts may be cut during pruning, resulting in irreversible loss of model performance. To solve this problem, this paper designs the importance score learning module to guide the pruning work, and determines that the pruning work removes the unimportant parts of the model. Finally, this paper compares the pruned model with other methods in terms of accuracy, Floating Point Operations(FLOPs) and model parameters on ImageNet-1k.
视觉变压器知识精馏集成剪枝方法
视觉变压器在图像分类、目标检测、图像分割等各种计算机视觉应用中取得了令人瞩目的成就。由于自身引入的自注意机制可以对输入图像的所有像素之间的关系进行建模,因此与传统的CNN网络相比,ViTs模型的性能得到了显著提高。然而,它们的存储、运行时内存和计算需求阻碍了它们在边缘设备上的部署。本文提出了一种基于知识蒸馏的ViT剪枝方法,可以对ViT模型进行剪枝,避免剪枝后模型的性能损失。基于知识蒸馏可以使学生模型通过学习教师模型的独特知识来提高模型的性能的思想,利用具有参数共享和局部接受场独特能力的卷积神经网络(CNN)作为教师模型来指导ViT模型的训练,使ViT模型获得相同的能力。此外,在剪枝过程中可能会有一些重要的部件被剪断,导致模型性能的不可逆损失。针对这一问题,本文设计了重要性分数学习模块来指导剪枝工作,并确定剪枝工作将去掉模型中不重要的部分。最后,在ImageNet-1k平台上,将剪叶模型与其他方法在精度、浮点运算(FLOPs)和模型参数方面进行了比较。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信