Skip to main content
QUICK REVIEW

[论文解读] Differentiable Soft Quantization: Bridging Full-Precision and Low-Bit Neural Networks

Ruihao Gong, Xianglong Liu|arXiv (Cornell University)|Aug 14, 2019
Advanced Neural Network Applications参考文献 37被引用 60
一句话总结

DSQ 引入一种可微分、演化的软量化,桥接全精度网络与低比特网络,在 1–4 位量化下提升训练稳定性和准确性,并实现更快的 ARM 部署。

ABSTRACT

Hardware-friendly network quantization (e.g., binary/uniform quantization) can efficiently accelerate the inference and meanwhile reduce memory consumption of the deep neural networks, which is crucial for model deployment on resource-limited devices like mobile phones. However, due to the discreteness of low-bit quantization, existing quantization methods often face the unstable training process and severe performance degradation. To address this problem, in this paper we propose Differentiable Soft Quantization (DSQ) to bridge the gap between the full-precision and low-bit networks. DSQ can automatically evolve during training to gradually approximate the standard quantization. Owing to its differentiable property, DSQ can help pursue the accurate gradients in backward propagation, and reduce the quantization loss in forward process with an appropriate clipping range. Extensive experiments over several popular network structures show that training low-bit neural networks with DSQ can consistently outperform state-of-the-art quantization methods. Besides, our first efficient implementation for deploying 2 to 4-bit DSQ on devices with ARM architecture achieves up to 1.7$ imes$ speed up, compared with the open-source 8-bit high-performance inference framework NCNN. [31]

研究动机与目标

  • 动机:由于离散性和梯度不匹配,训练低比特网络的挑战。
  • 提出一种可微分的量化函数,在训练过程中逐步逼近标准量化。
  • 在剪裁误差和舍入误差之间取得平衡,以降低量化损失。
  • 实现与硬件友好兼容的部署,提供高效的 2–4 位内核。
  • 提供与二值量化和均匀量化兼容的灵活框架。

提出的方法

  • 使用分段 tanh 基函数定义一个可微分的渐近量化器,以逼近标准量化。
  • 引入特征变量 alpha 来控制 DSQ 的逼近质量,并引入一种演化训练策略,在训练过程中优化 alpha。
  • 将裁剪上下界 (l 和 u) 与 alpha 共同优化,以平衡裁剪误差和舍入误差。
  • 给出反向传播方程和用于训练支持 DSQ 的网络的算法。
  • 在 ARM NEON 上演示硬件高效的 2–4 位 GEMM 内核用于部署。

实验结果

研究问题

  • RQ1如何使量化可微分,以在训练过程中提供准确的梯度?
  • RQ2一个演化中的量化函数是否能在不破坏训练稳定性的前提下,在全精度与低比特网络之间架桥?
  • RQ3应如何管理裁剪边界与逼近强度,以在裁剪误差和舍入误差之间取得平衡?
  • RQ4在 CIFAR-10 和 ImageNet 的常见网络架构上,DSQ 能带来怎样的性能提升?
  • RQ5DSQ 是否兼容二值量化和均匀量化以及现有的量化方法?

主要发现

  • DSQ 在 CIFAR-10 和 ImageNet 上持续提升了超过最先进量化方法的准确性。
  • alpha 的演化有助于 DSQ 逐步逼近标准量化,改善收敛性与稳定性。
  • 裁剪值与 alpha 的联合优化平衡了裁剪误差与舍入误差,降低了量化损失。
  • DSQ 提升 1/1 位量化的性能,并能与如 PACT 等方法互补,达到更高的 top-1/top-5 准确率。
  • 高效的 2–4 位 ARM NEON 内核实现了更快的推理,超越现有的 ARM 硬件开源框架。

更好的研究,从现在开始

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

无需绑定信用卡

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