Zhang Yuxin, Lin Mingbao, Lin Chia-Wen, Chen Jie, Wu Yongjian, Tian Yonghong, Ji Rongrong
IEEE Trans Neural Netw Learn Syst. 2023 Oct;34(10):7946-7955. doi: 10.1109/TNNLS.2022.3147269. Epub 2023 Oct 5.
Channel pruning has been long studied to compress convolutional neural networks (CNNs), which significantly reduces the overall computation. Prior works implement channel pruning in an unexplainable manner, which tends to reduce the final classification errors while failing to consider the internal influence of each channel. In this article, we conduct channel pruning in a white box. Through deep visualization of feature maps activated by different channels, we observe that different channels have a varying contribution to different categories in image classification. Inspired by this, we choose to preserve channels contributing to most categories. Specifically, to model the contribution of each channel to differentiating categories, we develop a class-wise mask for each channel, implemented in a dynamic training manner with respect to the input image's category. On the basis of the learned class-wise mask, we perform a global voting mechanism to remove channels with less category discrimination. Lastly, a fine-tuning process is conducted to recover the performance of the pruned model. To our best knowledge, it is the first time that CNN interpretability theory is considered to guide channel pruning. Extensive experiments on representative image classification tasks demonstrate the superiority of our White-Box over many state-of-the-arts (SOTAs). For instance, on CIFAR-10, it reduces 65.23% floating point operations per seconds (FLOPs) with even 0.62% accuracy improvement for ResNet-110. On ILSVRC-2012, White-Box achieves a 45.6% FLOP reduction with only a small loss of 0.83% in the top-1 accuracy for ResNet-50. Code is available at https://github.com/zyxxmu/White-Box.
长期以来,人们一直在研究通道剪枝以压缩卷积神经网络(CNN),这可显著减少整体计算量。先前的工作以一种无法解释的方式实现通道剪枝,这种方式往往会减少最终的分类错误,但却没有考虑每个通道的内部影响。在本文中,我们在白盒环境下进行通道剪枝。通过对不同通道激活的特征图进行深度可视化,我们观察到不同通道在图像分类中对不同类别有不同的贡献。受此启发,我们选择保留对大多数类别有贡献的通道。具体而言,为了对每个通道在区分类别方面的贡献进行建模,我们为每个通道开发了一个类别掩码,并根据输入图像的类别以动态训练的方式来实现。基于学习到的类别掩码,我们执行全局投票机制以去除类别区分能力较弱的通道。最后,进行微调过程以恢复剪枝后模型的性能。据我们所知,这是首次考虑将CNN可解释性理论用于指导通道剪枝。在代表性图像分类任务上的大量实验证明了我们的白盒方法优于许多现有技术(SOTA)。例如,在CIFAR - 10数据集上,对于ResNet - 110,它每秒减少65.23%的浮点运算量(FLOPs),同时准确率还提高了0.62%。在ILSVRC - 2012数据集上,对于ResNet - 50,白盒方法实现了45.6%的FLOP减少,而top - 1准确率仅小幅下降0.83%。代码可在https://github.com/zyxxmu/White - Box获取。