《電子技術(shù)應(yīng)用》
您所在的位置:首頁 > 人工智能 > 设计应用 > 一种多教师模型知识蒸馏深度神经网络模型压缩算法
一种多教师模型知识蒸馏深度神经网络模型压缩算法
2023年电子技术应用第8期
顾明珠1,2,明瑞成2,邱创一1,2,王新文1,2
(1.福州大学 先进制造学院,福建 泉州 362000;2.中国科学院海西研究院泉州装备制造研究中心,福建 泉州 362000)
摘要: 为了能将庞大的深度学习模型压缩后部署到算力和存储能力有限的设备中时尽可能减小精度损失,对知识蒸馏模型压缩方法进行研究,提出了一种改进后带筛选的多教师模型知识蒸馏压缩算法。利用多教师模型的集成优势,以各教师模型的预测交叉熵为筛选的量化标准筛选出表现更好的教师模型对学生进行指导,并让学生模型从教师模型的特征层开始提取信息,同时让表现更好的教师模型在指导中更具有话语权。在CIFAR100数据集上的VGG13等分类模型实验结果表明,与其他压缩算法相比在最终得到的学生模型大小相同的情况下,精度上有着更好的表现。
中圖分類號:TP399 文獻(xiàn)標(biāo)志碼:A DOI: 10.16157/j.issn.0258-7998.233812
中文引用格式: 顧明珠,明瑞成,邱創(chuàng)一,等. 一種多教師模型知識蒸餾深度神經(jīng)網(wǎng)絡(luò)模型壓縮算法[J]. 電子技術(shù)應(yīng)用,2023,49(8):7-12.
英文引用格式: Gu Mingzhu,Ming Ruicheng,Qiu Chuangyi,et al. A multi-teacher knowledge distillation model compression algorithm for deep neural network[J]. Application of Electronic Technique,2023,49(8):7-12.
A multi-teacher knowledge distillation model compression algorithm for deep neural network
Gu Mingzhu1,2,Ming Ruicheng2,Qiu Chuangyi1,2,Wang Xinwen1,2
(1.School of Advanced Manufacturing, Fuzhou University, Quanzhou 362000, China; 2.Quanzhou Institute of Equipment Manufacturing,Haixi Institutes Chinese Academy of Sciences,Quanzhou 362000, China)
Abstract: In order to minimize the accuracy loss when compressing huge deep learning models and deploying them to devices with limited computing power and storage capacity, a knowledge distillation model compression method is investigated and an improved multi-teacher model knowledge distillation compression algorithm with filtering is proposed. Taking advantage of the integration of multi-teacher models, the better-performing teacher models are screened for student instruction using the predicted cross-entropy of each teacher model as the quantitative criterion for screening, and the student models are allowed to extract information starting from the feature layer of the teacher models, while the better-performing teacher models are allowed to have more say in the instruction. The experimental results of classification models such as VGG13 on the CIFAR100 dataset show that the multi-teacher model compression method in this paper has better performance in terms of accuracy compared with other compression algorithms with the same size of the final obtained student models.
Key words : model compression;distillation of knowledge;multi-teacher model;cross entropy;feature layer

0 引言

隨著人工智能技術(shù)發(fā)展,要將越來越龐大的的模型部署到實(shí)際的工業(yè)社會中時(shí),相應(yīng)硬件的算力要求和存儲要求成為了最大障礙。因此,為加快人工智能技術(shù)在社會生活和工業(yè)的廣泛使用,越來越多的學(xué)者們對深度學(xué)習(xí)模型進(jìn)行輕量化壓縮進(jìn)行研究[1],而知識蒸餾方法已然成為比較主流的模型輕量化方法[2]。

知識蒸餾是指利用已經(jīng)訓(xùn)練好的大型深度學(xué)習(xí)模型輔助訓(xùn)練出一個(gè)小型模型,其中大型模型稱為教師模型,起到監(jiān)督和輔助小型模型訓(xùn)練的作用。小型模型稱為學(xué)生模型,接受來自教師模型的知識,并最終用于實(shí)際部署。2015年Hinton[3]首次提出了知識蒸餾這一概念以來,研究者們開始對壓縮后如何保證學(xué)生模型精度這一問題進(jìn)行研究。知識蒸餾從教師模型規(guī)模分為單教師模型的蒸餾和多教師模型知識蒸餾兩類。單教師模型即只使用一個(gè)教師模型對學(xué)生模型進(jìn)行蒸餾,如Romero[4]將學(xué)生模型的網(wǎng)絡(luò)設(shè)計(jì)成較細(xì)且層數(shù)較深的形狀,并且將學(xué)生模型和教師模型的特征層連接,讓學(xué)生模型從教師模型的特征層提層知識。Chen[5]等在蒸餾中加入GAN結(jié)構(gòu),模擬原始數(shù)據(jù)集擴(kuò)大數(shù)據(jù)量提供給新的模型進(jìn)行知識蒸餾。Liu[6]等人將NAS引入知識蒸餾,根據(jù)教師模型結(jié)構(gòu)從NAS中選擇最契合的學(xué)生網(wǎng)絡(luò)與之匹配以達(dá)到最佳蒸餾效果,但NAS需要巨大內(nèi)存使該方法難以大面積推廣。Dai[7]等提出利用教師模型和學(xué)生模型預(yù)測實(shí)例的差異,提出實(shí)例差異的評估指標(biāo),并利用可區(qū)分的實(shí)例進(jìn)行蒸餾。知識蒸餾中學(xué)生網(wǎng)絡(luò)的知識大部分來源于教師模型,因此由單個(gè)教師模型知識蒸餾得到的學(xué)生模型精度上限受限于對應(yīng)的教師模型,難以有很大提升。



本文詳細(xì)內(nèi)容請下載:http://m.ihrv.cn/resource/share/2000005484




作者信息:

顧明珠1,2,明瑞成2,邱創(chuàng)一1,2,王新文1,2

(1.福州大學(xué) 先進(jìn)制造學(xué)院,福建 泉州 362000;2.中國科學(xué)院海西研究院泉州裝備制造研究中心,福建 泉州 362000)

微信圖片_20210517164139.jpg

此內(nèi)容為AET網(wǎng)站原創(chuàng),未經(jīng)授權(quán)禁止轉(zhuǎn)載。

相關(guān)內(nèi)容