贪心剪枝:无需搜索的自动剪枝算法
GreedyPruner: Automatic Pruning Algorithm without Searching
DOI: 10.12677/SEA.2021.104064, PDF,    科研立项经费支持
作者: 王 勇*, 戚浩金:国网宁波供电公司,信息通信分公司,浙江 宁波;刘 宇, 琚小明#:华东师范大学,软件工程学院,上海
关键词: 神经网络模型修剪自动剪枝超网络贪心训练Neural Network Model Pruning Automatic Pruning SuperNet Greedy Training
摘要: 运行功能强大的神经网络需要消耗大量的存储空间和计算资源,这对资源有限的移动设备和嵌入式设备是无法接受的。针对这个问题,本文基于贪心策略提出了一个高效的GreedyPruner算法用来自动修剪网络模型。该算法首先预训练一个超网络,这个超网络可以预测任意给定网络结构的性能;其次,引入精度队列和压缩池分别保存性能较好和剪枝率较高的网络结构,提出贪心训练策略对超网络进行二次训练,将训练空间从全体解空间贪婪地转移到精度队列和压缩池中;最后,取精度队列和压缩池中的最优网络结构进行权值微调,得到修剪后的网络模型。实验结果表明,GreedyPruner可以在网络性能几乎不变的情况下,大幅压缩模型的参数和运算量,压缩后的网络模型更有利于部署在移动设备和嵌入式设备中。
Abstract: A powerful neural network needs to consume a lot of storage space and computing resources, which is unacceptable for mobile devices and embedded devices with limited resources. In response to this problem, this paper proposes an efficient GreedyPruner algorithm based on the greedy strate-gy to automatically prune the network model. The algorithm first pretrains a SuperNet, which can predict the performance of any given network structure; secondly, the precision queue and the compression pool are introduced to preserve the network structure with better performance and higher pruning rate respectively, and the greedy training strategy is proposed to train the SuperNet work twice, and the training space is greedily transferred from the whole solution space to the precision queue and the compression pool; finally, take the optimal network structure in the precision queue and the compression pool to fine-tune the weights to obtain the pruned network model. Experimental results show that GreedyPruner can greatly compress the parameters and calculations of the model while the network performance is almost unchanged. The compressed network model is more conducive to deployment on mobile devices and embedded devices.
文章引用:王勇, 戚浩金, 刘宇, 琚小明. 贪心剪枝:无需搜索的自动剪枝算法[J]. 软件工程与应用, 2021, 10(4): 595-605. https://doi.org/10.12677/SEA.2021.104064

参考文献

[1] Han, S., Pool, J., Tran, J., et al. (2015) Learning both Weights and Connections for Efficient Neural Networks. NIPS15: Proceedings of the 28th International Conference on Neural Information Processing Systems, Vol. 1, December 2015, 1135-1143.
[2] Han, S., Mao, H. and Dally, W.J. (2015) Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding.
[3] Li, H., Kadav, A., Durdanovic, I., et al. (2016) Pruning Filters for Efficient ConvNet. International Conference on Learning Representations 2017, Toulon, France, 24-26 April 2017.
[4] Liu, Z., Li, J., Shen, Z., et al. (2017) Learning Efficient Convolutional Networks through Network Slim-ming. Proceedings of the IEEE International Conference on Computer Vision, Venice, 22-29 October 2017, 2736-2744. [Google Scholar] [CrossRef
[5] Luo, J.H., Wu, J. and Lin, W. (2017) Thinet: A Filter Level Pruning Method for Deep Neural Network Compression. Proceedings of the IEEE International Conference on Computer Vision, Venice, 22-29 October 2017, 5058-5066. [Google Scholar] [CrossRef
[6] He, Y., Zhang, X. and Sun, J. (2017) Channel Pruning for Accelerat-ing Very Deep Neural Networks. Proceedings of the IEEE International Conference on Computer Vision, Venice, 22-29 October 2017, 1389-1397. [Google Scholar] [CrossRef
[7] He, Y., Lin, J., Liu, Z., et al. (2018) AMC: Automl for Model Com-pression and Acceleration on Mobile Devices. Proceedings of the European Conference on Computer Vision (ECCV), Munich, 8-14 September 2018, 784-800. [Google Scholar] [CrossRef
[8] Liu, N., Ma, X., Xu, Z., et al. (2020) AutoCompress: An Au-tomatic DNN Structured Pruning Framework for Ultra-High Compression Rates. Proceedings of the AAAI Conference on Artificial Intelligence, 34, 4876-4883. [Google Scholar] [CrossRef
[9] Boyd, S., Parikh, N., Chu, E., et al. (2011) Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers. Now Foundations and Trends. [Google Scholar] [CrossRef
[10] Zhang, T., Zhang, K., Ye, S., et al. (2018) ADAM-ADMM: A Uni-fied, Systematic Framework of Structured Weight Pruning for DNNS.
[11] Lin, S., Ji, R., Yan, C., et al. (2019) To-wards Optimal Structured CNN Pruning via Generative Adversarial Learning. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, 15-20 June 2019, 2790-2799. [Google Scholar] [CrossRef
[12] Goodfellow, I.J., Pouget-Abadie, J., Mirza, M., et al. (2014) Gen-erative Adversarial Networks.
[13] Liu, Z., Mu, H., Zhang, X., et al. (2019) Metapruning: Meta Learning for Automatic Neural Network Channel Pruning. Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, 27-28 October 2019, 3296-3305. [Google Scholar] [CrossRef
[14] You, S., Huang, T., Yang, M., et al. (2020) Greedynas: Towards Fast One-Shot NAS with Greedy Supernet. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, 13-19 June 2020, 1999-2008. [Google Scholar] [CrossRef
[15] Lin, M., Ji, R., Zhang, Y., et al. (2020) Channel Pruning via Automatic Structure Search. Proceedings of the Twen-ty-Ninth International Joint Conference on Artificial Intelligence, 673-679. [Google Scholar] [CrossRef