作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (3): 105-112. doi: 10.19678/j.issn.1000-3428.0064206

• 人工智能与模式识别 • 上一篇    下一篇

基于中间图特征提取的卷积网络双标准剪枝

程小辉1,2, 李钰1, 康燕萍1,2   

  1. 1. 桂林理工大学 信息科学与工程学院, 广西 桂林 541006;
    2. 广西嵌入式技术与智能系统重点实验室, 广西 桂林 541006
  • 收稿日期:2022-03-17 修回日期:2022-05-15 发布日期:2022-05-04
  • 作者简介:程小辉(1961—),男,教授、博士生导师,主研方向为嵌入式系统、物联网、人工智能;李钰,硕士研究生;康燕萍(通信作者),实验师、硕士。
  • 基金资助:
    国家自然科学基金(61662017,61862019);广西自然科学基金(2018GXNSFAA281235);广西科技基地和人才专项(2018AD19136);广西中青年教师基础能力提升项目(2018KY0248,2020KY06026)。

Double Standard Pruning of Convolution Network Based on Feature Extraction of Intermediate Graph

CHENG Xiaohui1,2, LI Yu1, KANG Yanping1,2   

  1. 1. College of Information Science and Engineering, Guilin University of Technology, Guilin 541006, Guangxi, China;
    2. Guangxi Key Laboratory of Embedded Technology and Intelligent System, Guilin 541006, Guangxi, China
  • Received:2022-03-17 Revised:2022-05-15 Published:2022-05-04

摘要: 卷积神经网络(CNN)在计算和存储上存在大量开销,为了使CNN能够在算力和存储能力较弱的嵌入式等端设备上进行部署和运行,提出一种基于中间图特征提取的卷积核双标准剪枝方法。在卷积层后插入中间图互信息特征提取框架,分析卷积核的特征提取能力,结合批量归一化层的缩放因子对卷积核的综合重要性进行评估,获取更为稀疏的CNN模型。针对全连接层存在大量冗余节点的问题,提出一种基于节点相似度与K-means++聚类的全连接层剪枝方法,聚类相似度较高的节点,并对剪枝后的连接层权重进行融合,在一定程度上弥补因剪枝所造成的精度损失。在CIFAR10和CIFAR100数据集上的实验结果表明,使用该剪枝方法对ResNet56网络进行剪枝,在损失0.19%分类精度的情况下能够剪掉48.2%的参数量以及46.7%的浮点运算量,对于VGG16网络,能够剪掉94.5%的参数量以及64.4%的浮点运算量,分类精度仅下降0.01%。与VCNNP、PF等剪枝方法相比,所提剪枝方法能够在保持模型准确率几乎不变的情况下,对CNN的参数量和计算量进行更大比例的裁剪。

关键词: 深度学习, 模型剪枝, 卷积神经网络, 互信息, 节点相似度, K-means++聚类, 中间特征

Abstract: Convolutional Neural Network(CNN) require a considerable amount of overhead in terms of computation and storage.To deploy and run a CNN on embedded devices with a poor computing power and storage capacity, this study proposes a convolution kernel double standard pruning method based on the feature extraction of an intermediate graph.In addition, to obtain a sparser CNN model, this study inserted the mutual information feature extraction framework of the intermediate graph after the convolution layer, analyzed the feature extraction ability of the convolution kernel, and evaluated the comprehensive importance of the convolution kernel combined with the scaling factor of the Batch Normalization(BN) layer.Addressing the problem the fully connected layer containing numerous redundant nodes, a fully connected layer pruning method based on node similarity and K-means++ clustering is proposed.Nodes with high similarity are clustered, and the weight of the connection layer after pruning is fused to compensate for the accuracy loss caused by pruning to a certain extent.Experiments on the CIFAR10 and CIFAR100 datasets show that this pruning method can prune 48.2% of the parameters and 46.7% of the floating-point operations of the ResNet56 network at a classification accuracy loss of 0.19%.For the VGG16 network, 94.5% of the parameters and 64.4% of the floating-point operations can be pruned, and the classification accuracy only decreases by 0.01%.Compared with pruning methods such as VCNNP and PF, the proposed pruning method can prune the parameters and computation of a CNN in larger proportions while maintaining the same model accuracy.

Key words: deep learning, model pruning, Convolutional Neural Network(CNN), mutual information, node similarity, K-means++ clustering, intermediate features

中图分类号: