[論文レビュー] Learned Step Size Quantization
Learned Step Size Quantization (LSQ) を導入し、活性化と重みを用いた低精度ネットワーク(2–4ビット)を訓練して ImageNet の最先端の精度を達成し、3-bit モデルがフル精度の性能に到達できるようにする。
Deep networks run with low precision operations at inference time offer power and space advantages over high precision alternatives, but need to overcome the challenge of maintaining high accuracy as precision decreases. Here, we present a method for training such networks, Learned Step Size Quantization, that achieves the highest accuracy to date on the ImageNet dataset when using models, from a variety of architectures, with weights and activations quantized to 2-, 3- or 4-bits of precision, and that can train 3-bit models that reach full precision baseline accuracy. Our approach builds upon existing methods for learning weights in quantized networks by improving how the quantizer itself is configured. Specifically, we introduce a novel means to estimate and scale the task loss gradient at each weight and activation layer's quantizer step size, such that it can be learned in conjunction with other network parameters. This approach works using different levels of precision as needed for a given system and requires only a simple modification of existing training code.
研究の動機と目的
- 深層ネットワークの精度を犠牲にすることなくスループットとエネルギー効率を改善するために、精度を低減する動機づけ。
- ステップサイズをモデルパラメータとして学習し、タスク損失を最小化する量子化方法を開発する。
- 既存の逆伝播と SGD トレーニングパイプラインとの互換性を確保する。
- ImageNet 上で複数のアーキテクチャに対して LSQ を実証し、従来の量子化手法と比較する。
提案手法
- 実数値を離散レベルへマッピングする量子化器を、ステップサイズ s と QP および QN によって決定されるクリッピング境界を用いて定義する。
- 量子化状態間の遷移を考慮する直通推定(straight-through estimation)を介して s の勾配を導入する(Equation 3)。
- 層ごとの因子 g によってスケールされた s の勾配を用い、重み/活性化の更新とバランスを取る(Equation 4)。
- 全精度の重みで訓練し、前方/後方伝搬時には量子化された重み/活性化を使用し、コサイン学習率減衰を用いて訓練する。
- LSQ の層ごとのステップサイズをデータ統計量から初期化し、事前学習済みの全精度モデルからファインチューニングする。
実験結果
リサーチクエスチョン
- RQ1勾配ベースの最適化により quantizer のステップサイズを学習することは、固定値や誤差最小化型の量子化器よりタスク性能を改善するのか。
- RQ2LSQ は 2-, 3-, 4-bit ネットワークを、アーキテクチャを問わず ImageNet で全精度の精度に近づける/到達するか。
- RQ3ステップサイズ勾配のスケーリングが収束と最終精度に与える影響はどの程度か。
- RQ4量子化誤差の最小化が高いタスク性能にとって必須か、あるいは代替の目的関数がより良い結果を生むのか。
主な発見
| ネットワーク | 手法 | 2 | 3 | 4 | 8 | 2 | 3 | 4 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| ResNet-18 | LSQ (Ours) | 67.6 | 70.2 | 71.1 | 71.1 | 87.6 | 89.4 | 90.0 | 90.1 |
| ResNet-18 | QIL | 65.7 | 69.2 | 70.1 | |||||
| ResNet-18 | FAQ | - | - | - | - | 89.1 | 89.3 | - | - |
| ResNet-18 | LQ-Nets | 64.9 | 68.2 | 69.3 | 85.9 | 87.9 | 88.8 | - | |
| ResNet-18 | PACT | 64.4 | 68.1 | 69.2 | 85.6 | 88.2 | 89.0 | - | |
| ResNet-18 | NICE | 67.7 | 69.8 | - | - | 87.9 | 89.21 | - | - |
| ResNet-18 | Regularization | 61.7 | - | 67.3 | 68.1 | 84.4 | - | 87.9 | 88.2 |
| ResNet-34 | LSQ (Ours) | 71.6 | 73.4 | 74.1 | 74.1 | 90.3 | 91.4 | 91.7 | 91.8 |
| ResNet-34 | QIL | 70.6 | 73.1 | 73.7 | - | - | - | - | |
| ResNet-34 | NICE | 71.7 | 73.5 | - | - | 90.8 | 91.4 | - | - |
| ResNet-34 | FAQ | - | 73.3 | 73.7 | - | 91.3 | 91.6 | - | - |
| ResNet-34 | LQ-Nets | 69.8 | 71.9 | - | - | 89.1 | 90.2 | - | - |
| ResNet-50 | LSQ (Ours) | 73.7 | 75.8 | 76.7 | 76.8 | 91.5 | 92.7 | 93.2 | 93.4 |
| ResNet-50 | PACT | 72.2 | 75.3 | 76.5 | 90.5 | 92.6 | 93.2 | - | |
| ResNet-50 | NICE | 75.1 | 76.5 | - | - | 92.3 | 93.3 | - | - |
| ResNet-50 | FAQ | - | 76.3 | 76.5 | - | 92.9 | 93.1 | - | - |
| ResNet-50 | LQ-Nets | 71.5 | 74.2 | 75.1 | - | 90.3 | 91.6 | 92.4 | - |
| ResNet-101 | LSQ (Ours) | 76.1 | 77.5 | 78.3 | 78.1 | 92.8 | 93.6 | 94.0 | 94.0 |
| ResNet-101 | FAQ | - | - | - | - | - | - | - | - |
| ResNet-152 | LSQ (Ours) | 76.9 | 78.2 | 78.5 | 78.5 | 93.2 | 93.9 | 94.1 | 94.2 |
| VGG-16bn | LSQ (Ours) | 71.4 | 73.4 | 74.0 | 73.5 | 90.4 | 91.5 | 92.0 | 91.6 |
- LSQ は ImageNet の複数アーキテクチャで、従来の 2-, 3-, 4-bit 手法よりもトップ1/トップ5 精度を高く達成する。
- 3-bit ネットワークは LSQ で訓練すると、いくつかのケースで全精度の精度を達成するか、ほぼそれに近づく。
- 層ごとのステップサイズ勾配スケールは収束を改善し、重み/活性化勾配の更新とバランスを取る。
- LSQ は量子化誤差最小化を最適化しないにもかかわらず、タスク性能は量子化誤差最小化アプローチより優れる。
- LSQ を用いた蒸留により精度がさらに向上し、いくつかの 3-bit モデルは全精度のベースラインと同等の性能を達成。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。