平衡幅度和相似度的滤波器剪枝算法
Balancing Magnitude and Similarity for Filter Pruning Algorithm
DOI: 10.12677/mos.2025.141034, PDF,   
作者: 闫雅茹:上海理工大学光电信息与计算机工程学院,上海
关键词: 滤波器剪枝深度神经网络幅度相似度Filter Pruning Deep Neural Network (DNN) Magnitude Similarity
摘要: 深度神经网络在计算机视觉任务中广泛应用,但是大规模参数计算导致的高复杂性限制了其在资源有限环境中的部署。本文提出了一种平衡幅度和相似度的滤波器剪枝方法(MASFIP)。在每次剪枝迭代中,通过缩放因子 α 选择每层临时剪枝的滤波器。根据网络损失进行永久性剪枝,达到预定的浮点运算量后,采取少量的再训练步骤缓解模型精度的急剧下降。在CIFAR-10和CIFAR-100数据集上对VGGNet-16和ResNet模型进行剪枝实验,结果表明在CIFAR-10数据集上,MASFIP分别从VGGNet-16和ResNet-56中删除了60.6%和52.9%的FLOPs,精度提高了0.16%和0.14%。在CIFAR-100数据集上,从ResNet-56中删除了39.1%的FLOPs,仅导致0.05%的精度下降。
Abstract: There are extensive applications of Deep Neural Network (DNN) in the field of computer vision tasks. However, the high complexity resulting from the computing large-scale parameters of DNN would hinder its deployment in resource-constrained environments. We propose a filter pruning method, named Balancing Magnitude and Similarity for Filter Pruning (MASFIP), to address this challenge. During each pruning iteration, filters for temporary pruning are selected using a scaling factor α . Permanent pruning is then performed based on network loss. Upon reaching the designated floating-point operations, a small number of retraining steps are taken to alleviate the sharp decline in model accuracy. Experimental pruning on VGGNet-16 and ResNet models on CIFAR-10 and CIFAR-100 datasets reveals that, on CIFAR-10, MASFIP removes 60.6% and 52.9% of FLOPs from VGGNet-16 and ResNet-56 respectively, resulting in accuracy improvements of 0.16% and 0.14%. On CIFAR-100, pruning from ResNet-56 leads to a reduction of 39.1% in FLOPs with only a marginal accuracy drop of 0.05%.
文章引用:闫雅茹. 平衡幅度和相似度的滤波器剪枝算法[J]. 建模与仿真, 2025, 14(1): 353-365. https://doi.org/10.12677/mos.2025.141034

参考文献

[1] Huang, S., Pareek, A., Jensen, M., Lungren, M.P., Yeung, S. and Chaudhari, A.S. (2023) Self-Supervised Learning for Medical Image Classification: A Systematic Review and Implementation Guidelines. NPJ Digital Medicine, 6, Article No. 74. [Google Scholar] [CrossRef] [PubMed]
[2] Liu, Z., Gu, C., Xie, Y., Zhang, H. and Pei, S. (2023) Realistic Sketch Face Generation via Sketch-Guided Incomplete Restoration. 2023 IEEE 29th International Conference on Parallel and Distributed Systems (ICPADS), Ocean Flower Island, 17-21 December 2023, 32-37. [Google Scholar] [CrossRef
[3] Amit, Y., Felzenszwalb, P. and Girshick, R. (2021) Object Detection. In: Computer Vision, Springer, 875-883. [Google Scholar] [CrossRef
[4] Liu, W., Kang, G., Huang, P., Chang, X., Yu, L., Qian, Y., et al. (2020) Argus: Efficient Activity Detection System for Extended Video Analysis. 2020 IEEE Winter Applications of Computer Vision Workshops (WACVW), Snowmass, 1-5 March 2020, 126-133. [Google Scholar] [CrossRef
[5] Pei, S., Wu, Y. and Qiu, M. (2020) Neural Network Compression and Acceleration by Federated Pruning. In: Lecture Notes in Computer Science, Springer, 173-183. [Google Scholar] [CrossRef
[6] Pei, S., Luo, J. and Liang, S. (2022) DRP: Discrete Rank Pruning for Neural Network. In: Lecture Notes in Computer Science, Springer, 168-179. [Google Scholar] [CrossRef
[7] 陈胤杰, 裴颂文. 面向FPGA的二值神经网络模型压缩方法研究[J]. 小型微型计算机系统, 2024, 45(6): 1356-1362.
[8] Shang, Y., Yuan, Z., Xie, B., Wu, B. and Yan, Y. (2023) Post-Training Quantization on Diffusion Models. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 17-24 June 2023, 1972-1981. [Google Scholar] [CrossRef
[9] Phuong, M. and Lampert, C. (2019) Towards Understanding Knowledge Distillation. International Conference on Machine Learning, Long Beach, 9-15 June 2019, 5142-5151.
[10] Phan, A., Sobolev, K., Sozykin, K., Ermilov, D., Gusak, J., Tichavský, P., et al. (2020) Stable Low-Rank Tensor Decomposition for Compression of Convolutional Neural Network. In: Lecture Notes in Computer Science, Springer, 522-539. [Google Scholar] [CrossRef
[11] Zhang, T., Ye, S., Zhang, K., Tang, J., Wen, W., Fardad, M., et al. (2018) A Systematic DNN Weight Pruning Framework Using Alternating Direction Method of Multipliers. In: Lecture Notes in Computer Science, Springer, 191-207. [Google Scholar] [CrossRef
[12] He, Y., Kang, G., Dong, X., Fu, Y. and Yang, Y. (2018) Soft Filter Pruning for Accelerating Deep Convolutional Neural Networks. Proceedings of the 27th International Joint Conference on Artificial Intelligence, Stockholm, 13-19 July 2018, 2234-2240. [Google Scholar] [CrossRef
[13] Ghimire, D., Lee, K. and Kim, S. (2023) Loss-Aware Automatic Selection of Structured Pruning Criteria for Deep Neural Network Acceleration. Image and Vision Computing, 136, Article 104745. [Google Scholar] [CrossRef
[14] Shi, X., Ding, J., Hao, Z., et al. (2024) Towards Energy Efficient Spiking Neural Networks: An Unstructured Pruning Framework. The 12th International Conference on Learning Representations, Vienna Austria, 7-11 May 2024, 1-12.
[15] Liao, Z., Quétu, V., Nguyen, V. and Tartaglione, E. (2023) Can Unstructured Pruning Reduce the Depth in Deep Neural Networks? 2023 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Paris, 2-3 October 2023, 1402-1406. [Google Scholar] [CrossRef
[16] Wang, H. and Zhang, W. (2024) Unstructured Pruning and Low Rank Factorisation of Self-Supervised Pre-Trained Speech Models. IEEE Journal of Selected Topics in Signal Processing, 1-14. [Google Scholar] [CrossRef
[17] Fang, G., Ma, X., Song, M., Bi Mi, M. and Wang, X. (2023) Depgraph: Towards Any Structural Pruning. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 17-24 June 2023, 16091-16101. [Google Scholar] [CrossRef
[18] Yan, Y.-C., Guo, R.-Z. and Yang, J.-X. (2021) Model Pruning Based on Weight Dependency for Convolutional Neural Network. Journal of Chinese Computer Systems, 42, 1500-1504.
[19] Liu, Z., Sun, M., Zhou, T., et al. (2019) Rethinking the Value of Network Pruning. International Conference on Learning Representations, United States, 6-9 May 2019, 113-133.
[20] Luo, J., Wu, J. and Lin, W. (2017). ThiNet: A Filter Level Pruning Method for Deep Neural Network Compression. 2017 IEEE International Conference on Computer Vision (ICCV), Venice, 22-29 October 2017, 5058-5066.[CrossRef
[21] Gao, S., Huang, F., Cai, W. and Huang, H. (2021) Network Pruning via Performance Maximization. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 20-25 June 2021, 9266-9276. [Google Scholar] [CrossRef
[22] Jiang, D., Cao, Y. and Yang, Q. (2022) On the Channel Pruning Using Graph Convolution Network for Convolutional Neural Network Acceleration. Proceedings of the 31st International Joint Conference on Artificial Intelligence, Vienna, 23-29 July 2022, 3107-3113. [Google Scholar] [CrossRef
[23] Lin, M., Ji, R., Wang, Y., Zhang, Y., Zhang, B., Tian, Y., et al. (2020) HRank: Filter Pruning Using High-Rank Feature Map. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 1526-1535. [Google Scholar] [CrossRef
[24] Mondal, M., Das, B., Roy, S.D., Singh, P., Lall, B. and Joshi, S.D. (2022) Adaptive CNN Filter Pruning Using Global Importance Metric. Computer Vision and Image Understanding, 222, Article 103511. [Google Scholar] [CrossRef
[25] Ghimire, D. and Kim, S. (2022) Magnitude and Similarity Based Variable Rate Filter Pruning for Efficient Convolution Neural Networks. Applied Sciences, 13, Article 316. [Google Scholar] [CrossRef
[26] Molchanov, P., Tyree, S., Karras, T., et al. (2017) Pruning Convolutional Neural Networks for Resource Efficient Inference. International Conference on Learning Representations, Toulon, 24-26 April 2017, 30-46.
[27] He, Y., Liu, P., Zhu, L. and Yang, Y. (2023) Filter Pruning by Switching to Neighboring CNNs with Good Attributes. IEEE Transactions on Neural Networks and Learning Systems, 34, 8044-8056. [Google Scholar] [CrossRef] [PubMed]
[28] Li, H., Kadav, A., Durdanovic, I., et al. (2017) Pruning Filters for Efficient ConvNets. International Conference on Learning Representations, Toulon, 24-26 April 2017, 1683-1695.
[29] Zhu, J. and Pei, J. (2019) Filter Pruning via Structural Similarity Index for Deep Convolutional Neural Networks Acceleration. 2019 IEEE 14th International Conference on Intelligent Systems and Knowledge Engineering (ISKE), Dalian, 14-16 November 2019, 730-734. [Google Scholar] [CrossRef
[30] He, Y., Liu, P., Wang, Z., Hu, Z. and Yang, Y. (2019) Filter Pruning via Geometric Median for Deep Convolutional Neural Networks Acceleration. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, 15-20 June 2019, 4335-4344. [Google Scholar] [CrossRef
[31] Lee, M.K., Lee, S., Lee, S.H. and Song, B.C. (2020) Channel Pruning via Gradient of Mutual Information for Light-Weight Convolutional Neural Networks. 2020 IEEE International Conference on Image Processing (ICIP), Abu Dhabi, 25-28 October 2020, 1751-1755. [Google Scholar] [CrossRef
[32] Liu, Z., Li, J., Shen, Z., Huang, G., Yan, S. and Zhang, C. (2017) Learning Efficient Convolutional Networks through Network Slimming. 2017 IEEE International Conference on Computer Vision (ICCV), Venice, 22-29 October 2017, 2755-2763. [Google Scholar] [CrossRef
[33] Dong, X., Huang, J., Yang, Y. and Yan, S. (2017) More Is Less: A More Complicated Network with Less Inference Complexity. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, 21-26 July 2017, 1895-1903. [Google Scholar] [CrossRef
[34] Chen, S. and Zhao, Q. (2019) Shallowing Deep Networks: Layer-Wise Pruning Based on Feature Representations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41, 3048-3056. [Google Scholar] [CrossRef] [PubMed]