Skip to main content
QUICK REVIEW

[論文レビュー] Discovering Low-Precision Networks Close to Full-Precision Networks for Efficient Embedded Inference

Jeffrey L. McKinstry, Steven K. Esser|arXiv (Cornell University)|Sep 11, 2018
Advanced Neural Network Applications参考文献 28被引用数 46
ひとこと要約

論文は、 activation range calibration による事前学習モデルのファインチューニング、4-bit ケースでの長めの訓練、ノイズ対応 SGD 技術を用いることで、8-bit および 4-bit に量子化したネットワーク( weights と activations )がフル精度の ImageNet ベースラインに匹敵またはそれを上回ることを示す。

ABSTRACT

To realize the promise of ubiquitous embedded deep network inference, it is essential to seek limits of energy and area efficiency. To this end, low-precision networks offer tremendous promise because both energy and area scale down quadratically with the reduction in precision. Here we demonstrate ResNet-18, -34, -50, -152, Inception-v3, Densenet-161, and VGG-16bn networks on the ImageNet classification benchmark that, at 8-bit precision exceed the accuracy of the full-precision baseline networks after one epoch of finetuning, thereby leveraging the availability of pretrained models. We also demonstrate ResNet-18, -34, -50, -152, Densenet-161, and VGG-16bn 4-bit models that match the accuracy of the full-precision baseline networks -- the highest scores to date. Surprisingly, the weights of the low-precision networks are very close (in cosine similarity) to the weights of the corresponding baseline networks, making training from scratch unnecessary. We find that gradient noise due to quantization during training increases with reduced precision, and seek ways to overcome this noise. The number of iterations required by SGD to achieve a given training error is related to the square of (a) the distance of the initial solution from the final plus (b) the maximum variance of the gradient estimates. Therefore, we (a) reduce solution distance by starting with pretrained fp32 precision baseline networks and fine-tuning, and (b) combat gradient noise introduced by quantization by training longer and reducing learning rates. Sensitivity analysis indicates that these simple techniques, coupled with proper activation function range calibration to take full advantage of the limited precision, are sufficient to discover low-precision networks, if they exist, close to fp32 precision baseline networks. The results herein provide evidence that 4-bits suffice for classification.

研究の動機と目的

  • 低精度ネットワークを介したエネルギー効率・面積効率の高い組込み推論を動機づける。
  • 8-bit ネットワークが最小限のファインチューニング後に FP32 ベースラインを上回ることを示す。
  • 4-bit ネットワークが複数のアーキテクチャで FP32 ベースラインに匹敵することを示す。
  • 定量化後も事前学習済みの高精度重みが低精度の対応物に近いままであるという証拠を提供する。
  • 定量化による勾配ノイズを分析し、ファインチューニングとキャリブレーションを通じて緩和戦略を提案する。

提案手法

  • 事前学習済み FP32 ネットワークを重みと活性化の 8-bit および 4-bit 固定小数点表現へ量子化する。
  • 不要量子化モデル上での軽量な前方伝播を用いて層ごとに活性化範囲をキャリブレーションする。
  • 事前学習済み重みから開始して量子化後にファインチューニングを行う(FAQ: Fine-tuning After Quantization)。
  • 重み/活性化に対して層ごとの l キャリブレーションと 8/4-bit の制約を持つ固定小数点量子化器 Q_{b,l} を適用する。
  • 訓練中に量子化を経由して逆伝播するために straight-through estimator を適用する。
  • 4-bit ネットワークではトレーニングを 110 epoch へ延長し、学習率スケジューリングと勾配ノイズを抑えるよう重み減衰を調整する。

実験結果

リサーチクエスチョン

  • RQ1事前学習済みの高精度ネットワークを 8-bit または 4-bit に量子化した場合、ファインチューニングで ImageNet におけるフル精度の精度と同等またはそれを上回ることができるか。
  • RQ2量子化による勾配ノイズは訓練にどう影響するか、より大きなバッチ、長い訓練、学習率スケジュールなどの簡単な戦略でどのように緩和できるか。
  • RQ34-bit ネットワークは複数のアーキテクチャでフル精度ベースラインと同等の性能を達成できるか。
  • RQ4最終的な低精度解は元の高精度初期化の近くに位置するのか、スクラッチからの訓練が不要であることを示唆するか。
  • RQ5FAQ アプローチは ImageNet を超える他のデータセット(例 CIFAR-10)に一般化するか。

主な発見

ネットワーク手法精度 (w,a)Top-1 精度 (%)Top-5 精度 (%)
ResNet-18Baseline32,3269.7689.08
ResNet-18FAQ (This paper)8,870.0289.32
ResNet-18FAQ (This paper)4,469.78 ± 0.0489.11 ± 0.03
ResNet-34Baseline32,3273.3091.42
ResNet-34FAQ (This paper)8,873.7191.63
ResNet-34FAQ (This paper)4,473.3191.32
  • 8-bit ネットワークは複数のアーキテクチャで 1 エポックのファインチューニング後にフル精度ベースラインを上回る。
  • 4-bit ネットワークは ResNet-18, ResNet-34, ResNet-50, ResNet-152, DenseNet-161, および VGG-16bn においてフル精度ベースラインの精度と同等。
  • 定量化は勾配ノイズを導入し、精度が低下するほどノイズが増加し、特に 4-bit で訓練に影響を与える。
  • pretrained FP32 ネットワークから開始してファインチューニング(FAQ)を行うと、高精度初期化に近い最適な低精度解を見つけやすい。
  • 長いファインチューニング(110 epoch)と大きなバッチサイズは 4-bit の性能を改善する;活性化範囲のキャリブレーションが重要で(特に最初と最後の層は 8-bit を維持するなど)、設計上の工夫が効果的である。
  • コサイン類似度の解析から、FAQ 後の 4-bit 重みは初期の FP32 重みと非常に類似しており、解が高精度領域の近くにあることを示している。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。