Skip to main content
QUICK REVIEW

[論文レビュー] Incremental Network Quantization: Towards Lossless CNNs with Low-Precision Weights

Aojun Zhou, Anbang Yao|arXiv (Cornell University)|Feb 10, 2017
Advanced Neural Network Applications被引用数 491
ひとこと要約

INQは事前学習済みの全精度CNNを、重みが2の冪乗または0となる低精度モデルへ変換する。重みの分割、グループ単位量子化、再学習を用い、5-bitで損失のない精度(lossless)を達成し、主要アーキテクチャで4/3/2-bitも競争力を持つ。

ABSTRACT

This paper presents incremental network quantization (INQ), a novel method, targeting to efficiently convert any pre-trained full-precision convolutional neural network (CNN) model into a low-precision version whose weights are constrained to be either powers of two or zero. Unlike existing methods which are struggled in noticeable accuracy loss, our INQ has the potential to resolve this issue, as benefiting from two innovations. On one hand, we introduce three interdependent operations, namely weight partition, group-wise quantization and re-training. A well-proven measure is employed to divide the weights in each layer of a pre-trained CNN model into two disjoint groups. The weights in the first group are responsible to form a low-precision base, thus they are quantized by a variable-length encoding method. The weights in the other group are responsible to compensate for the accuracy loss from the quantization, thus they are the ones to be re-trained. On the other hand, these three operations are repeated on the latest re-trained group in an iterative manner until all the weights are converted into low-precision ones, acting as an incremental network quantization and accuracy enhancement procedure. Extensive experiments on the ImageNet classification task using almost all known deep CNN architectures including AlexNet, VGG-16, GoogleNet and ResNets well testify the efficacy of the proposed method. Specifically, at 5-bit quantization, our models have improved accuracy than the 32-bit floating-point references. Taking ResNet-18 as an example, we further show that our quantized models with 4-bit, 3-bit and 2-bit ternary weights have improved or very similar accuracy against its 32-bit floating-point baseline. Besides, impressive results with the combination of network pruning and INQ are also reported. The code is available at https://github.com/Zhouaojun/Incremental-Network-Quantization.

研究の動機と目的

  • CNNの低ビット幅での損失のない量子化を動機づけ、FPGAなどの効率的なハードウェアを実現する。
  • 誤差損失を最小化するための3つの相互依存操作— weight partition、group-wise quantization、retraining—を導入する。
  • 一部を再学習させつつ他をグループで量子化するIncrementalな学習戦略を開発し、精度を回復させる。
  • ImageNetで多様なアーキテクチャに適用性を示し、より深い圧縮のための剪定との組み合わせを検討する。

提案手法

  • 重みを±2^nを含む集合P_lおよび0で量子化し、最大値を表現するために2^(b-1)+1値プラス0を表現する可変長エンコードを用いる。
  • 各層の重みを剪定に触発された指標を用いて二つの分離グループに分割し、低精度の基盤と再学習可能な補償グループを形成する。
  • 一方のグループを量子化しつつ他方を再学習させ、すでに量子化された重みを固定し未量子化の重みのみ更新を許す二値マスクT_lを更新する。
  • 量子化は2のべき乗の梯子と隣接する梯子値に基づく丸め規則を用いて、重みを最も近い量子値に写像する(式4)。
  • 期待ビット幅bは量子化レベル数を決定し、n1は最大重みの大きさから計算され、n2を導出する。最終的な各ステップの量子化は蓄積された量子化済み部分σ_nによって決定される。
  • 再学習はマスク更新付きの SGD に従う:W_l ← W_l − γ ∂E/∂W_l · T_l、ここで T_l はすでに量子化された重みをマスクする。

実験結果

リサーチクエスチョン

  • RQ1大規模なCNNに対して、逐次的なグループ単位の量子化スケジュールは全精度ベースラインと比較して精度を保持または向上させるか?
  • RQ2低ビット量子化下での重み分割戦略(剪定に触発されたものとランダムなもの)の最終精度への影響は?
  • RQ3ImageNetアーキテクチャで損失なしまたはほぼなしの量子化に対して、どのビット幅(4/3/2ビット)が実現可能か?
  • RQ4INQとネットワーク剪定を組み合わせると、精度を保ちつつ圧縮を最大化できるのか?

主な発見

NetworkBit-widthTop-1 errorTop-5 errorDecrease in top-1 / decrease in top-5 error
AlexNet32 (ref)42.76%19.77%-
AlexNet542.61%19.54%0.15% / 0.23%
VGG-1632 (ref)31.46%11.35%-
VGG-16529.18%9.70%2.28% / 1.65%
GoogleNet32 (ref)31.11%10.97%-
GoogleNet530.98%10.72%0.13% / 0.25%
ResNet-1832 (ref)31.73%11.31%-
ResNet-18531.02%10.90%0.71% / 0.41%
ResNet-5032 (ref)26.78%8.76%-
ResNet-50525.19%7.55%1.59% / 1.21%
  • INQは5-bit量子化でAlexNet、VGG-16、GoogleNet、ResNet-18、ResNet-50に対して損失のないまたは向上したTop-1およびTop-5精度を達成(例:Top-1で0.13–2.28%、Top-5で0.23–1.65%の改善)。
  • この手法は実務上容易に収束し、5-bitモデルの各量子化ステップで再学習エポック数が8未満になることが多い。
  • ResNet-18を4-bit、3-bit、2-bitのトリプレット重みで量子化すると、32-bit基準と比較して精度が更新またはほぼ同等である(5-bitの結果は4/3/2-bitにも拡張される)。
  • ResNet-18で剪定に触発された重み分割はランダム分割よりも優れており、5-bit INQでTop-1/Top-5の改善が1.09%/0.83%を示す。
  • INQと動的ネットワーク剪定(DNS)を組み合わせると大きな圧縮利得を得られ、例としてAlexNetで5-bit量子化時に53×の圧縮が可能で、深い圧縮のベースラインと比較して精度は最小限または正の変化。
  • ベクトル量子化のみと比較して、INQは精度をより良く保持しつつ低ビット表現を達成している。

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

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

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

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