[论文解读] Convolutional Neural Networks using Logarithmic Data Representation
本论文引入对数域表示,将权重和激活量量化到仅3–4位,尽量接近浮点精度,且显著减少乘法器,并演示了基于对数的端到端训练。
Recent advances in convolutional neural networks have considered model complexity and hardware efficiency to enable deployment onto embedded systems and mobile devices. For example, it is now well-known that the arithmetic operations of deep networks can be encoded down to 8-bit fixed-point without significant deterioration in performance. However, further reduction in precision down to as low as 3-bit fixed-point results in significant losses in performance. In this paper we propose a new data representation that enables state-of-the-art networks to be encoded to 3 bits with negligible loss in classification performance. To perform this, we take advantage of the fact that the weights and activations in a trained network naturally have non-uniform distributions. Using non-uniform, base-2 logarithmic representation to encode weights, communicate activations, and perform dot-products enables networks to 1) achieve higher classification accuracies than fixed-point at the same resolution and 2) eliminate bulky digital multipliers. Finally, we propose an end-to-end training procedure that uses log representation at 5-bits, which achieves higher final test accuracy than linear at 5-bits.
研究动机与目标
- 通过利用权重/激活分布中的非均匀性来推动低精度CNN的研究。
- 提出对数域表示用于激活、权重和点积,以降低硬件复杂性。
- 展示在与定点基线相比下,3–4位量化下的准确性提升或达到可比水平。
- 探索不同的对数底数(如 base-2、base-√2)以在动态范围和精度之间取得平衡。
- 给出使用对数域表示和量化梯度的端到端训练过程。
提出的方法
- 在对数域中表示点积,以用位移替代乘法器(两种变体:单操作数对数和双操作数对数)。
- 通过 LogQuant 层在 log2 空间对激活和权重进行量化;与等效比特宽度的线性量化进行比较。
- 在对数域中使用累加策略,利用 log(1+x)≈x 对小x近似以求和。
- 将运算推广到不同底数(base-2 和 base-√2),以以更细的粒度捕捉更宽的动态范围。
- 开发包含梯度的对数域表示的端到端训练方法(Algorithm 1)。
- 在 AlexNet 与 VGG16 的 ILSVRC-2012 上以及在 CIFAR-10 上使用一个 5-bit 对数网络进行评估。
实验结果
研究问题
- RQ13-bit 对数域表示的激活和权重是否能够在 ImageNet 模型上达到与 32-bit 浮点网近似的 top-5 准确率?
- RQ2在 AlexNet 和 VGG16 上,对数域量化在准确性和鲁棒性方面与线性量化相比如何?
- RQ3相对于 base-2,基于 base-√2 的对数表示在捕捉较大动态范围且实现更细粒度方面是否具有实际优势?
- RQ4包括量化梯度在内的对数域量化的端到端训练是否可行,并且不会造成显著性能损失?
- RQ5在对数域量化卷积层与全连接权重时,网络规模与精度之间有哪些权衡?
主要发现
- 3-bit 对数激活在 AlexNet 与 VGG16 上接近 FP 性能,与 32-bit float 相比损失很小。
- 在 AlexNet 中,3-bit 对数激活给出 76.9% 的 top-5(fsr=7),而 FP32 为 78.3%;3-bit linear 给出 77.1%(fsr=5)。
- 在 VGG16 中,3-bit 对数激活为 89.2% 的 top-5(fsr=6),对比 89.8% FP32;3-bit linear 为 83.0%(fsr=3)。
- 4-bit 对数激活在 VGG16 上恢复了 FP32 性能(89.8% top-5,fsr=11),并且比 4-bit linear 更接近或优于 AlexNet。
- 对于卷积层的 5-bit 权重量化,base-2 与 base-√2 的比较显示 base-√2 显著提升准确率(AlexNet:70.6% base-2 vs 75.1% base-√2;VGG16:83.4% base-2 vs 89.0% base-√2)。
- 在 CIFAR-10 上使用对数域表示(5-bit 激活/权重/梯度)进行训练,log 的测试准确率为 0.9379,线性为 0.9253,BinaryNet 为 0.8862。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。