arXiv reaDer
深層ニューラル ネットワークのシャープネス認識量子化
Sharpness-aware Quantization for Deep Neural Networks
ネットワーク量子化は、モデル圧縮の主要なパラダイムです。ただし、量子化の離散的な性質により、トレーニング中の完全精度の重みの更新に起因する量子化された重みの瞬間的な変化は、深刻な損失変動につながり、勾配が不安定になり、パフォーマンスが低下する急激な損失ランドスケープをもたらす可能性があります。最近、Sharpness-Aware Minimization (SAM) が提案され、損失状況を平滑化し、モデルの一般化パフォーマンスを向上させました。それにもかかわらず、SAM を量子化されたモデルに直接適用すると、導入された敵対的摂動が量子化された重みと一致しないか、量子化のクリッピングと離散化によって減少し、最適なパフォーマンスにつながる可能性があります。この論文では、シャープネス認識量子化 (SAQ) と呼ばれる新しい方法を提案し、モデル圧縮、特に初めての量子化における SAM の効果を調査します。具体的には、最初に量子化と SAM の統一されたビューを提供します。ここでは、モデルの重みに量子化ノイズと敵対的摂動を導入すると見なします。量子化ノイズと敵対的摂動が相互に依存するかどうかに応じて、SAQ は 3 つのケースに分けることができます。次に、さまざまなケースを包括的に分析および比較します。さまざまなデータセットにわたる畳み込みニューラル ネットワークとトランスフォーマーの両方に関する広範な実験により、SAQ が量子化されたモデルの一般化パフォーマンスを向上させ、均一な量子化で SOTA の結果が得られることが示されています。たとえば、ImageNet では、SAQ は従来の最適化手順 (すなわち SGD) でトレーニングされたモデルよりも、4 ビット ResNet-50 の上位 1 精度で 1.1% 優れています。当社の 4 ビット ResNet-34 は、トップ 1 精度で以前の SOTA メソッドを 1.0% 上回っています。コードは https://github.com/ziplab/SAQ で入手できます。
Network quantization is a dominant paradigm of model compression. However, due to the discrete nature of quantization, the instant change in quantized weights coming from full-precision weights update during training might lead to severe loss fluctuations and result in sharp loss landscape, which makes the gradients unstable and degrades the performance. Recently, Sharpness-Aware Minimization (SAM) has been proposed to smooth the loss landscape and improve the generalization performance of the models. Nevertheless, when directly applying SAM to the quantized models, the introduced adversarial perturbations might be either mismatched with the quantized weights or diminished by the clipping and discretization in quantization, leading to suboptimal performance. In this paper, we propose a novel method, dubbed Sharpness-Aware Quantization (SAQ), to explore the effect of SAM in model compression, particularly quantization for the first time. Specifically, we first provide a unified view for quantization and SAM, where we consider them as introducing quantization noises and adversarial perturbations to the model weights. According to whether the quantization noises and adversarial perturbations depend on each other, SAQ can be divided into three cases. We then analyze and compare different cases comprehensively. Extensive experiments on both convolutional neural networks and Transformers across various datasets show that SAQ improves the generalization performance of the quantized models, yielding the SOTA results in uniform quantization. For example, on ImageNet, SAQ outperforms the model trained with the conventional optimization procedure (i.e., SGD) by 1.1% on the Top-1 accuracy on 4-bit ResNet-50. Our 4-bit ResNet-34 surpasses the previous SOTA method by 1.0% on the Top-1 accuracy. Code is available at https://github.com/ziplab/SAQ.
updated: Mon Nov 21 2022 04:50:42 GMT+0000 (UTC)
published: Wed Nov 24 2021 05:16:41 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト