[论文解读] AdaBin: Improving Binary Neural Networks with Adaptive Binary Sets
AdaBin 提出了一种用于二值神经网络(BNNs)的新型自适应二值量化方法,通过学习最优的实值二元集合 \{b₁, b₂\} 替代固定的 \{-1, +1\} 来表示权重和激活值,其中权重采用统计均衡化方法,激活值采用基于梯度的优化方法。该方法实现了最先进性能,在 ResNet-18 上达到 ImageNet 的 66.4% Top-1 准确率,在 SSD300 上达到 PASCAL VOC 的 69.4 mAP。
This paper studies the Binary Neural Networks (BNNs) in which weights and activations are both binarized into 1-bit values, thus greatly reducing the memory usage and computational complexity. Since the modern deep neural networks are of sophisticated design with complex architecture for the accuracy reason, the diversity on distributions of weights and activations is very high. Therefore, the conventional sign function cannot be well used for effectively binarizing full-precision values in BNNs. To this end, we present a simple yet effective approach called AdaBin to adaptively obtain the optimal binary sets $\{b_1, b_2\}$ ($b_1, b_2\in \mathbb{R}$) of weights and activations for each layer instead of a fixed set ( extit{i.e.}, $\{-1, +1\}$). In this way, the proposed method can better fit different distributions and increase the representation ability of binarized features. In practice, we use the center position and distance of 1-bit values to define a new binary quantization function. For the weights, we propose an equalization method to align the symmetrical center of binary distribution to real-valued distribution, and minimize the Kullback-Leibler divergence of them. Meanwhile, we introduce a gradient-based optimization method to get these two parameters for activations, which are jointly trained in an end-to-end manner. Experimental results on benchmark models and datasets demonstrate that the proposed AdaBin is able to achieve state-of-the-art performance. For instance, we obtain a 66.4% Top-1 accuracy on the ImageNet using ResNet-18 architecture, and a 69.4 mAP on PASCAL VOC using SSD300. The PyTorch code is available at \url{https://github.com/huawei-noah/Efficient-Computing/tree/master/BinaryNetworks/AdaBin} and the MindSpore code is available at \url{https://gitee.com/mindspore/models/tree/master/research/cv/AdaBin}.
研究动机与目标
- 解决因固定二元集合 \{-1, +1\} 与多样的权重和激活值分布不匹配而导致的 BNN 准确率严重下降问题。
- 克服符号函数在处理具有复杂非对称分布的层间特征时的局限性。
- 通过学习更匹配全精度分布的最优实值二元集合 \{b₁, b₂\},提升 BNN 的表征能力。
- 在保持 XNOR 和 BitCount 操作的前提下,实现权重和激活值自适应二元集合的端到端训练,同时保持硬件效率。
- 缩小 BNN 与全精度网络在复杂视觉任务(如目标检测和分割)中的性能差距。
提出的方法
- 提出一种新的二值量化函数,利用 1 位值的中心位置和距离,替代固定的符号函数。
- 对于权重,采用一种均衡化方法,将二元分布的对称中心与实值分布对齐,并通过最小化 Kullback-Leibler 散度(KLD)推导出中心和距离的解析解。
- 对于激活值,引入基于梯度的优化方法,使用可学习的中心和距离参数,初始化方式为符号函数,并实现端到端联合训练。
- 引入类似 Maxout 的非线性结构,引入可学习的缩放因子 \gamma⁺ 和 \gamma⁻,在不增加位宽的前提下提升激活值的表征能力。
- 通过确保最终的二值操作仍为 XNOR 和 BitCount 操作,保持硬件效率,实现约 64 倍加速和约 32 倍内存减少。
- 利用 KLD 最小化和统计对齐方法,确保学习到的二元集合保留原始全精度张量的统计特性。
实验结果
研究问题
- RQ1使用可学习的自适应二元集合 \{b₁, b₂\} 替代固定的 \{-1, +1\} 是否能提升 BNN 的表征能力?
- RQ2对权重和激活值采用自适应中心和距离学习,是否能显著提升 BNN 在 ImageNet 和 PASCAL VOC 等复杂数据集上的性能?
- RQ3AdaBin 在目标检测和分类任务中,能在多大程度上缩小 BNN 与全精度模型之间的准确率差距?
- RQ4结合权重的 KLD 最小化与均衡化方法,以及激活值的基于梯度的优化方法,是否能在不同网络架构上持续带来性能增益?
- RQ5所提出的方法是否能在显著提升准确率的同时,保持硬件效率(XNOR 和 BitCount)?
主要发现
- AdaBin 在使用 ResNet-18 时,ImageNet 上达到 66.4% 的 Top-1 准确率,显著优于之前最先进 BNN 方法。
- 在 PASCAL VOC 上使用 SSD300 时,AdaBin 达到 69.4 mAP,较 XNOR-Net 提升 13.8 mAP,较 Bi-Real Net 提升 5.6 mAP。
- 消融实验表明,结合 AdaBin 的权重均衡化与激活值优化,使 CIFAR-10 上的准确率相比基线 BNN 提升 2%。
- 带有可学习 \gamma⁺ 和 \gamma⁻ 的 Maxout 激活函数分别带来 9.6% 和 9.7% 的准确率提升,两者同时使用时达到最佳结果(CIFAR-10 上为 88.2%)。
- 采用残差连接结构的 AdaBin 表现优于 4 位量化方法(如 TWN 和 DoReFa),表明自适应二值化可超越多比特基线。
- 该方法保持了理论上的 60.85 倍加速和 31 倍内存节省,证实其与高效硬件部署的兼容性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。