AUSN:深度神经网络自适应叠加非均匀分布的近似均匀量化
AUSN: Approximately Uniform Quantization by Adaptively Superimposing Non-uniform Distribution for Deep Neural Networks
摘要:
量化对于简化边缘应用中的DNN推理至关重要。然而,现有的均匀和非均匀量化方法表现出表示范围和表示分辨率之间的固有冲突,从而导致未充分利用的位宽或显著的精度下降。此外,这些方法遇到三个缺点:i)缺乏量化误差源的深入分析的定量度量; ii)对基于CNN的图像分类任务的关注有限; iii)不了解实际硬件和通过降低位宽减少的能耗。在本文中,我们首先定义了两个定量指标,即,限幅误差和舍入误差,分析量化误差分布。我们观察到,边界误差和舍入误差在不同的层、模型和任务之间有很大的差异。因此,我们提出了一种新的量化方法来确定权重和激活。其核心思想是通过自适应叠加多个非均匀量化值来近似均匀量化,即AUSN。AUSN由一个无解码器的编码方案组成,该方案有效地利用了位宽,一个叠加量化算法,可以使编码方案适应不同的DNN层,模型和任务,而无需额外的硬件设计工作,以及一个舍入方案,可以消除众所周知的位宽溢出和重新量化问题。理论分析(见附录A)和对不同任务的DNN模型的精度评估表明了AUSN的有效性和通用性。在FPGA上的综合结果(见附录B)表明,$2\times$降低了能量消耗,$2\times$到$4\times$减少了硬件资源。
英文摘要:
Quantization is essential to simplify DNN inference in edge applications. Existing uniform and non-uniform quantization methods, however, exhibit an inherent conflict between the representing range and representing resolution, and thereby result in either underutilized bit-width or significant accuracy drop. Moreover, these methods encounter three drawbacks: i) the absence of a quantitative metric for in-depth analysis of the source of the quantization errors; ii) the limited focus on the image classification tasks based on CNNs; iii) the unawareness of the real hardware and energy consumption reduced by lowering the bit-width. In this paper, we first define two quantitative metrics, i.e., the Clipping Error and rounding error, to analyze the quantization error distribution. We observe that the boundary- and rounding- errors vary significantly across layers, models and tasks. Consequently, we propose a novel quantization method to quantize the weight and activation. The key idea is to Approximate the Uniform quantization by Adaptively Superposing multiple Non-uniform quantized values, namely AUSN. AUSN is consist of a decoder-free coding scheme that efficiently exploits the bit-width to its extreme, a superposition quantization algorithm that can adapt the coding scheme to different DNN layers, models and tasks without extra hardware design effort, and a rounding scheme that can eliminate the well-known bit-width overflow and re-quantization issues. Theoretical analysis~(see Appendix A) and accuracy evaluation on various DNN models of different tasks show the effectiveness and generalization of AUSN. The synthesis~(see Appendix B) results on FPGA show $2\times$ reduction of the energy consumption, and $2\times$ to $4\times$ reduction of the hardware resource.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。