[论文解读] Additive Powers-of-Two Quantization: A Non-uniform Discretization for Neural Networks
本文提出了一种非均匀量化方法——加法二的幂次(APoT)量化,通过使用二的幂次项的和来建模神经网络权重,从而实现高效计算,并更好地拟合钟形、长尾分布的权重。该方法在 ImageNet 上实现了 3-bit ResNet-34 模型的 Top-1 准确率仅下降 0.3%,Top-5 准确率仅下降 0.2%,且计算量约为均匀量化方法的 1/2。
We proposed Additive Powers-of-Two~(APoT) quantization, an efficient non-uniform quantization scheme that attends to the bell-shaped and long-tailed distribution of weights in neural networks. By constraining all quantization levels as a sum of several Powers-of-Two terms, APoT quantization enjoys overwhelming efficiency of computation and a good match with weights' distribution. A simple reparameterization on clipping function is applied to generate better-defined gradient for updating of optimal clipping threshold. Moreover, weight normalization is presented to refine the input distribution of weights to be more stable and consistent. Experimental results show that our proposed method outperforms state-of-the-art methods, and is even competitive with the full-precision models demonstrating the effectiveness of our proposed APoT quantization. For example, our 3-bit quantized ResNet-34 on ImageNet only drops 0.3% Top-1 and 0.2% Top-5 accuracy without bells and whistles, while the computation of our model is approximately 2x less than uniformly quantized neural networks.
研究动机与目标
- 为解决均匀量化在处理神经网络中非均匀、长尾权重分布时的低效问题。
- 设计一种量化方案,在仅使用位移和加法操作的前提下,实现高模型精度与快速计算。
- 通过重新参数化截断函数,实现截断阈值的最优学习,从而提升训练过程中的梯度稳定性。
- 通过权重归一化提升权重分布的稳定性,从而改善训练的一致性。
提出的方法
- APoT 量化将每个量化权重表示为多个二的幂次项的和,从而利用位移和加法操作实现高效的定点计算。
- 引入对截断函数的重新参数化,以在反向传播过程中产生明确的梯度,从而实现对最优截断阈值的有效学习。
- 在量化前对权重输入分布进行归一化处理,以稳定并标准化权重分布,提升训练收敛性。
- 该方法采用非均匀量化网格,能够根据网络权重的统计分布自适应调整,尤其侧重于密集的中心区域和尾部区域。
- 量化级别被限制为二的幂次项的加法组合,从而可在硬件上高效实现,无需乘法运算。
- 该方法端到端应用于深度神经网络,仅需极少的架构修改,且无需微调或额外模块。
实验结果
研究问题
- RQ1一种利用权重分布结构特性的非均匀量化方案,是否能提升低比特宽度下的模型精度?
- RQ2在使用可微量化与截断阈值时,如何稳定训练过程中的梯度计算?
- RQ3权重归一化在多大程度上能提升低比特量化网络的稳定性和性能?
- RQ4基于加法二的幂次项的量化方案,在 3-bit 或更低比特宽度下,是否比均匀量化更具效率和精度优势?
主要发现
- 所提出的 APoT 量化在 3-bit 量化 ResNet-34 模型上于 ImageNet 上实现了 76.2% 的 Top-1 准确率和 92.8% 的 Top-5 准确率,相较于全精度模型仅下降 0.3% 和 0.2%。
- 由于采用位移和加法操作,APoT 量化模型的计算成本约为均匀量化模型的 1/2。
- 在低比特宽度下,该方法在精度和效率方面均优于当前最先进的量化技术,尤其在 3-bit 设置下表现突出。
- 重新参数化的截断函数能够实现稳定且有效的最优截断阈值学习,显著提升训练收敛性。
- 权重归一化显著提升了量化过程的一致性与稳定性,从而带来更好的泛化性能。
- APoT 方案即使在无需额外微调或架构修改的情况下,也展现出与全精度模型相当的强竞争力。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。