[论文解读] Overcoming Oscillations in Quantization-Aware Training
本文识别并解决了量化感知训练(QAT)中导致模型精度下降的权重振荡问题,尤其在高效网络(如MobileNet和EfficientNet)的低比特(3–4比特)量化中更为显著。本文提出两种新方法——振荡抑制与迭代权重冻结,通过从源头减少振荡来稳定训练,在ImageNet上实现了3-和4比特量化模型的最先进精度。
When training neural networks with simulated quantization, we observe that quantized weights can, rather unexpectedly, oscillate between two grid-points. The importance of this effect and its impact on quantization-aware training (QAT) are not well-understood or investigated in literature. In this paper, we delve deeper into the phenomenon of weight oscillations and show that it can lead to a significant accuracy degradation due to wrongly estimated batch-normalization statistics during inference and increased noise during training. These effects are particularly pronounced in low-bit ($\leq$ 4-bits) quantization of efficient networks with depth-wise separable layers, such as MobileNets and EfficientNets. In our analysis we investigate several previously proposed QAT algorithms and show that most of these are unable to overcome oscillations. Finally, we propose two novel QAT algorithms to overcome oscillations during training: oscillation dampening and iterative weight freezing. We demonstrate that our algorithms achieve state-of-the-art accuracy for low-bit (3 & 4 bits) weight and activation quantization of efficient architectures, such as MobileNetV2, MobileNetV3, and EfficentNet-lite on ImageNet. Our source code is available at {https://github.com/qualcomm-ai-research/oscillations-qat}.
研究动机与目标
- 探究量化感知训练(QAT)中权重振荡的根本原因及其影响,尤其在高效网络的低比特量化场景下。
- 分析现有QAT方法为何在广泛使用的情况下仍无法缓解振荡问题。
- 证明振荡会破坏批量归一化统计量并损害优化过程,导致显著的精度下降。
- 开发并评估直接从源头解决振荡问题的新QAT技术,提升模型的鲁棒性与性能。
- 在ImageNet上为3-和4比特量化后的MobileNetV2、MobileNetV3及EfficientNet-lite建立最先进精度。
提出的方法
- 提出振荡抑制方法,通过在量化边界附近施加梯度惩罚,减小权重更新的幅度,从而抑制振荡。
- 提出迭代权重冻结方法,通过渐进式冻结超出阈值的振荡权重,采用退火调度避免过早收敛。
- 使用带有自适应阈值的改进型直通估计器(STE),在反向传播过程中检测并稳定振荡权重。
- 将训练后批量归一化重新估计作为基线缓解策略,以修正由振荡导致的统计量污染。
- 将两种方法整合进LSQ(Learned Stepwise Quantization)框架,以标准基准评估性能。
- 采用随时间动态增加的权重冻结阈值,确保在训练后期振荡最严重时实现稳定。
实验结果
研究问题
- RQ1为何在量化感知训练中,权重会在相邻量化级别之间振荡?其不稳定性根源是什么?
- RQ2这些振荡如何影响推理过程中的批量归一化统计量与整体模型精度?
- RQ3现有QAT方法在高效网络的低比特量化中,为何在多大程度上未能解决与振荡相关的精度退化问题?
- RQ4振荡抑制与迭代权重冻结是否能有效抑制振荡,提升训练收敛性与最终精度?
- RQ5在MobileNet和EfficientNet等不同高效架构上,所提方法在精度、计算开销与鲁棒性方面如何比较?
主要发现
- QAT中的权重振荡显著降低模型精度,尤其在MobileNetV2和EfficientNet-lite等深度可分离网络的3-和4比特量化中更为严重。
- 振荡在训练过程中污染了批量归一化统计量,即使经过重新估计,仍导致推理性能下降。
- 所提出的振荡抑制方法在4比特MobileNetV2上相较LSQ基线提升1.1%的ImageNet Top-1精度,达到70.6%的精度。
- 迭代权重冻结在4比特MobileNetV2上也实现了70.6%的精度,与振荡抑制效果相当,同时将振荡权重比例降至0.04%。
- 两种方法均优于先前的SOTA技术(如LSQ+BR和EWGS),在3比特量化下,各类模型的精度提升均超过1%。
- 迭代权重冻结具有可忽略的计算开销,而振荡抑制使训练时间增加约33%,但两者均在多个高效架构上实现了最先进结果。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。