节点文献
基于三值向二值演化的BNN剪枝方法
BNN Pruning Method Based on Evolution from Ternary to Binary
【摘要】 针对目前BNN(Binarized Neural Network)剪枝方法存在剪枝比例低、识别准确率显著下降以及依赖训练后微调的问题,提出了一种基于三值向二值演化的滤波器级的BNN剪枝方法,命名为ETB(Evolution from Ternary to Binary)。ETB是基于学习的,通过在BNN的量化函数中引入可训练的量化阈值,使权重和激活值逐渐从三值演化到二值或零,旨在使网络在训练期间自动识别不重要的结构。此外,一个剪枝率调节算法也被设计用于调控网络的剪枝率。训练后,全零滤波器和对应的输出通道可被直接裁剪而获得精简的BNN,无需微调。为证明提出方法的可行性和其提升BNN推理效率而不牺牲准确率的潜力,在CIFAR-10上进行实验:在CIFAR-10数据集上,ETB对VGG-Small模型进行了46.3%的剪枝,模型大小压缩至0.34 MByte,准确率为89.97%,并在ResNet-18模型上进行了30.01%的剪枝,模型大小压缩至1.33 MByte,准确率为90.79%。在准确率和参数量方面,对比一些现有的BNN剪枝方法,ETB具有一定的优势。
【Abstract】 BNNs(Binarized Neural Networks) are popular due to their extremely low memory requirements. While BNNs can be further compressed through pruning techniques, existing BNN pruning methods suffer from low pruning ratios, significant accuracy degradation, and reliance depending on fine-tuning after training. To overcome these limitations, a filter-level BNN pruning method is proposed based on evolution from ternary to binary, named ETB(Evolution from Terry to Binary). ETB is learning-based, and by introducing trainable quantization thresholds into the quantization function of BNNs, it makes the weights and activation values gradually evolve from ternary to binary or zero, aiming to enable the network to automatically identify unimportant structures during training. And a pruning ratio adjustment algorithm is also designed to regulate the pruning rate of the network. After training, all zero filters and corresponding output channels can be directly pruned to obtain a simplified BNN without fine-tuning. To demonstrate the feasibility of the proposed method and the potential for improving BNN inference efficiency without sacrificing accuracy, experiments are conducted on CIFAR-10. ETB is pruned the VGG-Small model by 46.3%, compressing the model size to 0.34 MB, with an accuracy of 89.97%. The ResNet-18 model is also pruned by 30.01%, compressing the model size to 1.33 MB, with an accuracy of 90.79%. Compared with some existing BNN pruning methods in terms of accuracy and parameter quantity, ETB has certain advantages.
【Key words】 binarized neural network; pruning; trainable threshold; evolution;
- 【文献出处】 吉林大学学报(信息科学版) ,Journal of Jilin University(Information Science Edition) , 编辑部邮箱 ,2024年02期
- 【分类号】TP183
- 【下载频次】4