Skip to main content
QUICK REVIEW

[论文解读] Power-of-Two Quantization for Low Bitwidth and Hardware Compliant Neural Networks

Dominika Przewłocka-Rus, Syed Shakib Sarwar|arXiv (Cornell University)|Mar 9, 2022
Advanced Memory and Neural Computing被引用 15
一句话总结

本文提出了一种用于低比特宽、硬件兼容神经网络的两的幂(PoT)量化方法,采用一种新颖的量化感知训练(QAT)算法。通过将权重表示为2的幂,该方法将计算成本较高的乘法运算替换为高效的位移操作,实现了与全精度模型相当的最先进准确率,同时在ASIC设计中相比8位均匀量化,将能耗降低至1/6,面积减少1.7倍。

ABSTRACT

Deploying Deep Neural Networks in low-power embedded devices for real time-constrained applications requires optimization of memory and computational complexity of the networks, usually by quantizing the weights. Most of the existing works employ linear quantization which causes considerable degradation in accuracy for weight bit widths lower than 8. Since the distribution of weights is usually non-uniform (with most weights concentrated around zero), other methods, such as logarithmic quantization, are more suitable as they are able to preserve the shape of the weight distribution more precise. Moreover, using base-2 logarithmic representation allows optimizing the multiplication by replacing it with bit shifting. In this paper, we explore non-linear quantization techniques for exploiting lower bit precision and identify favorable hardware implementation options. We developed the Quantization Aware Training (QAT) algorithm that allowed training of low bit width Power-of-Two (PoT) networks and achieved accuracies on par with state-of-the-art floating point models for different tasks. We explored PoT weight encoding techniques and investigated hardware designs of MAC units for three different quantization schemes - uniform, PoT and Additive-PoT (APoT) - to show the increased efficiency when using the proposed approach. Eventually, the experiments showed that for low bit width precision, non-uniform quantization performs better than uniform, and at the same time, PoT quantization vastly reduces the computational complexity of the neural network.

研究动机与目标

  • 为解决低比特宽神经网络中因均匀量化(尤其低于8位时)导致的准确率下降问题。
  • 探索非均匀量化技术——特别是两的幂(PoT)和加法型PoT(APoT)——以更好地保留网络权重的非均匀分布特性。
  • 为FPGA和ASIC平台设计并评估基于PoT量化方法的硬件高效乘累加(MAC)单元。
  • 证明PoT量化可在不损失模型准确率的前提下,显著降低内存、功耗和面积使用。

提出的方法

  • 提出一种基于STE的量化感知训练(QAT)算法,用于训练采用两的幂(PoT)权重的深度神经网络。
  • 采用动态定点缩放(FSR)以提升准确率,尤其在ImageNet模型中表现更优。
  • 设计无需乘法器的MAC单元,通过位移操作替代PoT和APoT权重的乘法运算。
  • 在5nm工艺下,于FPGA和ASIC平台上对三种MAC单元设计——均匀、PoT和APoT——进行综合与对比。
  • 采用综合后分析评估不同量化方案下的面积、功耗和能效表现。
  • 对比8x8均匀、4x8均匀、PoT和APoT MAC单元的资源使用(LUTs、FFs、DSPs)与功耗。

实验结果

研究问题

  • RQ1两的幂(PoT)量化是否能在低比特宽神经网络中实现最先进准确率,同时支持硬件高效的推理?
  • RQ2在FPGA和ASIC平台上,PoT量化与均匀量化及APoT量化相比,在硬件资源使用和能效方面表现如何?
  • RQ3所提出的QAT算法在将所有层量化至4位或更低精度时,能在多大程度上保持模型准确率?
  • RQ4在MAC单元中,用位移操作替代乘法是否能显著降低DNN加速器的功耗和面积?
  • RQ5PoT量化是否通过降低权重位宽和DRAM事务数,减少内存带宽和漏电功耗?

主要发现

  • 在5nm ASIC综合中,采用4位PoT量化时,所提出的MAC单元相比8x8均匀MAC单元,能耗降低6倍,面积减少1.7倍。
  • PoT MAC单元的功耗仅为4x8均匀MAC单元的2倍,证明用位移操作替代乘法可显著降低能耗。
  • 在FPGA上,PoT设计使用39个LUT和25个FF,相比4x8均匀MAC(46个LUT和27个FF)展现出更高的面积效率。
  • APoT MAC单元使用55个LUT和49个FF,资源需求约为PoT单元的两倍,尽管其准确率更高。
  • 所提出的QAT算法结合动态FSR,在ImageNet上实现的准确率高于DeepShift,优于现有4位PoT网络工作。
  • 由于权重位宽降低,内存带宽和漏电功耗减少,从而加速推理并提升能效。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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