Skip to main content
QUICK REVIEW

[论文解读] Additive Powers-of-Two Quantization: An Efficient Non-uniform Discretization for Neural Networks

Yuhang Li, Xin Dong|arXiv (Cornell University)|Sep 28, 2019
Neural Networks and Applications参考文献 25被引用 120
一句话总结

本文提出 APoT,一种非均匀量化,其中量化级别是若干二的幂项之和,并配以重新参数化裁剪函数和权重归一化,在权重与激活量化方面实现具有显著硬件效率的竞争性精度。

ABSTRACT

We propose Additive Powers-of-Two~(APoT) quantization, an efficient non-uniform quantization scheme for the bell-shaped and long-tailed distribution of weights and activations in neural networks. By constraining all quantization levels as the sum of Powers-of-Two terms, APoT quantization enjoys high computational efficiency and a good match with the distribution of weights. A simple reparameterization of the clipping function is applied to generate a better-defined gradient for learning the clipping threshold. Moreover, weight normalization is presented to refine the distribution of weights to make the training 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 4-bit quantized ResNet-50 on ImageNet achieves 76.6% top-1 accuracy without bells and whistles; meanwhile, our model reduces 22% computational cost compared with the uniformly quantized counterpart. The code is available at https://github.com/yhhhli/APoT_Quantization.

研究动机与目标

  • 解决权重/激活分布(钟形、长尾)与均匀量化之间的不匹配。
  • 通过将级别表示为少量幂项之和,开发一种对硬件友好的非均匀量化。
  • 通过重新参数化裁剪函数(RCF)提高训练稳定性和裁剪阈值学习。
  • 在量化前进行权重归一化以稳定分布和训练。
  • 在 ImageNet 和 CIFAR-10 上展示具有较高或具有竞争力的精度,同时降低计算量。

提出的方法

  • 定义 APoT 量化,其中每个量化级别是多个幂项之和,从而实现非均匀但对硬件友好的级别。
  • 使用基位宽 k 和加法项数 n(b = kn)生成所有 2^b 个级别,其为幂项之和。
  • 提出重新参数化裁剪函数(RCF),在训练过程中为裁剪阈值 α 提供更准确的梯度。
  • 在量化前应用权重归一化(零均值、单位方差),以稳定分布和训练。
  • 通过带 STE 的 SGD 优化裁剪阈值 α,以投影并利用 RCF 传播有信息的梯度。
  • 对权重和激活使用 APoT 进行量化,使快速移位加法乘法成为可能,相较于均匀量化实现约 2 倍速度提升。

实验结果

研究问题

  • RQ1APoT 量化是否可以在标准 CNN 上达到或超过均匀/PoT 量化的精度?
  • RQ2RCF 是否比直通近似(straight-through estimates)提供更有信息的梯度信号用于裁剪阈值?
  • RQ3权重归一化是否改善 APoT 量化网络的训练稳定性和最终性能?
  • RQ4在保持精度的同时,APoT 在 ImageNet 和 CIFAR-10 上能在多大程度上降低计算成本?

主要发现

  • 在 ImageNet 上,4-bit ResNet-50 达到 76.6% Top-1 精度,同时计算成本降低(约比均匀量化低 22%)。
  • APoT 在 ImageNet 和 CIFAR-10 上与最先进的量化方法相比,达到具有竞争力甚至更优的精度。
  • 由于 PoT 组件上的移位加法操作,APoT 的乘法速度大约是均匀量化的 2 倍。
  • APoT、重新参数化裁剪函数与权重归一化的组合提供了稳定的训练与鲁棒的量化性能。
  • 在某些配置下,ImageNet 上的 5-bit APoT 量化在 Top-1 精度方面甚至超越了一些全精度基线(如消融结果所述)。
  • 消融研究表明,去除权重归一化或使用非 APoT 量化器会降低精度,尤其在较低比特宽度时。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。