[论文解读] FQ-Conv: Fully Quantized Convolution for Efficient and Accurate Inference
本文提出FQ-Conv,一种全量化卷积网络,所有计算均在低精度下进行——三元权重和5位激活值,且无需依赖更高精度的批量归一化(BN)或非线性函数。通过使用可学习的量化函数和渐进式量化训练,该方法在ImageNet、KWS和CIFAR-100数据集上实现的准确率与全精度模型相差不超过0.5%,同时对硬件噪声具有鲁棒性,因此特别适用于边缘计算和模拟加速器。
Deep neural networks (DNNs) can be made hardware-efficient by reducing the numerical precision of the weights and activations of the network and by improving the network's resilience to noise. However, this gain in efficiency often comes at the cost of significantly reduced accuracy. In this paper, we present a novel approach to quantizing convolutional neural network. The resulting networks perform all computations in low-precision, without requiring higher-precision BN and nonlinearities, while still being highly accurate. To achieve this result, we employ a novel quantization technique that learns to optimally quantize the weights and activations of the network during training. Additionally, to enhance training convergence we use a new training technique, called gradual quantization. We leverage the nonlinear and normalizing behavior of our quantization function to effectively remove the higher-precision nonlinearities and BN from the network. The resulting convolutional layers are fully quantized to low precision, from input to output, ideal for neural network accelerators on the edge. We demonstrate the potential of this approach on different datasets and networks, showing that ternary-weight CNNs with low-precision in- and outputs perform virtually on par with their full-precision equivalents. Finally, we analyze the influence of noise on the weights, activations and convolution outputs (multiply-accumulate, MAC) and propose a strategy to improve network performance under noisy conditions.
研究动机与目标
- 消除量化CNN中高精度BN和非线性函数,降低硬件复杂度。
- 通过完全量化权重、激活值和输出,实现端到端低精度推理。
- 通过可学习的量化函数和渐进式量化训练,提升低精度网络的准确率。
- 评估量化网络在真实噪声条件下的鲁棒性,尤其针对模拟加速器。
- 证明采用三元权重和低精度输入/输出的CNN,在使用所提方法训练后,可达到与全精度模型相当的准确率。
提出的方法
- 提出一种可学习的量化函数,在训练过程中优化权重和激活值的量化级别,而非依赖统计分布。
- 引入渐进式量化训练,一种逐步应用量化以稳定收敛并提升准确率的训练调度策略。
- 利用量化函数的非线性和归一化特性,替代BN和高精度非线性函数的需求。
- 采用可微分的量化函数,使反向传播能够通过量化操作,实现量化级别与网络权重的联合优化。
- 在训练期间引入噪声注入策略,提升对模拟加速器中硬件噪声的鲁棒性。
- 将该方法应用于ImageNet、KWS和CIFAR-100上的标准CNN,全程使用三元权重和5位激活值。
实验结果
研究问题
- RQ1全量化CNN是否能以三元权重和低精度激活值实现接近全精度模型的准确率?
- RQ2能否通过学习到的量化方法,在低精度网络中消除对高精度BN和非线性函数的需求?
- RQ3渐进式量化训练是否能提升全量化网络的收敛性和准确率?
- RQ4全量化网络在权重、激活值和MAC输出存在噪声时是否具备鲁棒性,特别是在模拟加速器环境中?
- RQ5所提方法是否可在不同数据集和网络架构上实现泛化?
主要发现
- 采用5位激活值且无高精度BN或非线性函数的三元权重CNN在ImageNet上达到94.32%的top-1准确率,与全精度基线模型相差不超过0.5%。
- 在Google语音命令数据集上,全量化网络达到94.3%的准确率,与全精度模型持平。
- 在CIFAR-100上,全量化网络达到76.8%的准确率,几乎与全精度模型的77.1%相当。
- 通过训练时注入噪声,提升了鲁棒性:在20%噪声(σ)条件下,经噪声训练的模型测试准确率从65.1%提升至75.4%,而未训练噪声的模型仅维持在73.8%。
- 在30%噪声条件下,经噪声训练的模型在KWS上保持87.7%的准确率,在CIFAR-100上达到69.2%,展现出极强的抗噪能力。
- 所提方法实现了无精度损失的全量化推理,使其特别适合能效高效的边缘和模拟加速器。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。