[论文解读] Bi-Real Net: Enhancing the Performance of 1-bit CNNs With Improved Representational Capability and Advanced Training Algorithm
本文提出Bi-Real Net,一种1-bit卷积神经网络,通过引入残差快捷连接(将1-bit卷积后的实值激活(即符号函数前)连接至下一块),增强了表征能力。结合一种新型训练算法,包括对符号函数更紧密的导数近似、基于幅值的权重梯度以及基于截断的预训练,Bi-Real Net在34层网络下于ImageNet上实现了62.2%的top-1准确率,相比最先进1-bit模型最高提升10%,同时保持极低的计算开销和显著的内存节省。
In this work, we study the 1-bit convolutional neural networks (CNNs), of which both the weights and activations are binary. While being efficient, the classification accuracy of the current 1-bit CNNs is much worse compared to their counterpart real-valued CNN models on the large-scale dataset, like ImageNet. To minimize the performance gap between the 1-bit and real-valued CNN models, we propose a novel model, dubbed Bi-Real net, which connects the real activations (after the 1-bit convolution and/or BatchNorm layer, before the sign function) to activations of the consecutive block, through an identity shortcut. Consequently, compared to the standard 1-bit CNN, the representational capability of the Bi-Real net is significantly enhanced and the additional cost on computation is negligible. Moreover, we develop a specific training algorithm including three technical novelties for 1- bit CNNs. Firstly, we derive a tight approximation to the derivative of the non-differentiable sign function with respect to activation. Secondly, we propose a magnitude-aware gradient with respect to the weight for updating the weight parameters. Thirdly, we pre-train the real-valued CNN model with a clip function, rather than the ReLU function, to better initialize the Bi-Real net. Experiments on ImageNet show that the Bi-Real net with the proposed training algorithm achieves 56.4% and 62.2% top-1 accuracy with 18 layers and 34 layers, respectively. Compared to the state-of-the-arts (e.g., XNOR Net), Bi-Real net achieves up to 10% higher top-1 accuracy with more memory saving and lower computational cost. Keywords: binary neural network, 1-bit CNNs, 1-layer-per-block
研究动机与目标
- 为解决1-bit CNN在大规模数据集(如ImageNet)上出现的严重准确率下降问题,标准二值化模型在性能上远逊于实值网络。
- 在不引入显著计算或内存开销的前提下,增强1-bit CNN的表征能力。
- 设计一种专用于1-bit网络的训练算法,克服符号函数等非可微操作带来的挑战。
- 在保持二值推理效率优势的同时,实现1-bit CNN的最先进性能。
- 证明:在标准1-bit网络中常被丢弃的实值中间特征,若通过残差连接妥善保留,可显著提升模型准确率。
提出的方法
- 引入一种残差快捷连接,将1-bit卷积和批量归一化后的实值激活(即符号函数前)直接连接至下一块的输入,从而保留更丰富的特征表示。
- 提出一种分段多项式近似方法来逼近符号函数,以实现更精确的梯度反向传播,替代先前工作中使用的精度较低的阶跃函数导数。
- 通过在梯度计算中引入实值激活的幅值,设计一种基于幅值的梯度更新方法,提升优化稳定性。
- 在全精度模型的预训练阶段使用截断函数(而非ReLU)进行初始化,以更好地初始化Bi-Real Net,从而在二值化设置中实现更优收敛。
- 采用混合网络结构,仅保留第一层、最后一层以及1×1快捷连接为实值,最大限度减少内存与计算成本,同时保留关键信息。
- 采用两阶段训练流程:先使用截断激活函数对全精度网络进行预训练,再利用所提出的梯度与近似技术对二值化网络进行微调。
实验结果
研究问题
- RQ1是否能在不增加计算或内存成本的前提下,显著提升1-bit CNN的表征能力?
- RQ2在反向传播中,如何对非可微的符号函数进行近似,以实现1-bit网络的有效训练?
- RQ3在1-bit CNN优化中,将激活幅值引入权重梯度计算会产生何种影响?
- RQ4使用截断函数而非ReLU进行预训练,是否能带来更优的初始化与性能表现?
- RQ5在ImageNet上,所提出的Bi-Real Net架构与最先进1-bit模型相比,在准确率、内存使用和计算效率方面表现如何?
主要发现
- 18层的Bi-Real Net在ImageNet上达到56.4%的top-1准确率,相比先前1-bit模型最高实现10%的相对提升。
- 34层的Bi-Real Net达到62.2%的top-1准确率,展现出强大的可扩展性与相较于现有1-bit网络的显著性能优势。
- 与全精度ResNet相比,Bi-Real Net将内存使用量减少11.1倍(18层)和15.97倍(34层),额外开销可忽略不计。
- 得益于高效的XNOR与位计数操作,模型在18层时实现11.06倍速度提升,34层时达18.99倍速度提升。
- 所提出的符号函数导数近似方法相比先前使用阶跃函数导数的方法,实现了更稳定、更有效的反向传播。
- 幅值感知梯度与基于截断的预训练在消融实验中被验证对收敛性和最终准确率有显著贡献。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。