[論文レビュー] Ternary Neural Networks with Fine-Grained Quantization
FGQは、再学習なしで事前学習済みのフル精度モデルを8/4ビット活性化を持つ三値重みに変換し、精度と計算削減をバランスさせるために重みグループを利用する;ImageNetでFP32にほぼ近い精度を達成し、計算速度の大幅な向上を実現する。
We propose a novel fine-grained quantization (FGQ) method to ternarize pre-trained full precision models, while also constraining activations to 8 and 4-bits. Using this method, we demonstrate a minimal loss in classification accuracy on state-of-the-art topologies without additional training. We provide an improved theoretical formulation that forms the basis for a higher quality solution using FGQ. Our method involves ternarizing the original weight tensor in groups of $N$ weights. Using $N=4$, we achieve Top-1 accuracy within $3.7\%$ and $4.2\%$ of the baseline full precision result for Resnet-101 and Resnet-50 respectively, while eliminating $75\%$ of all multiplications. These results enable a full 8/4-bit inference pipeline, with best-reported accuracy using ternary weights on ImageNet dataset, with a potential of $9 imes$ improvement in performance. Also, for smaller networks like AlexNet, FGQ achieves state-of-the-art results. We further study the impact of group size on both performance and accuracy. With a group size of $N=64$, we eliminate $\approx99\%$ of the multiplications; however, this introduces a noticeable drop in accuracy, which necessitates fine tuning the parameters at lower precision. We address this by fine-tuning Resnet-50 with 8-bit activations and ternary weights at $N=64$, improving the Top-1 accuracy to within $4\%$ of the full precision result with $<30\%$ additional training overhead. Our final quantized model can run on a full 8-bit compute pipeline using 2-bit weights and has the potential of up to $15 imes$ improvement in performance compared to baseline full-precision models.
研究の動機と目的
- 再訓練なし(または最小限)で、非常に低精度の重みと活性化を用いたほぼ最先端の推論を動機づけ、実現する。
- informationを保持するために、事前学習済みの重みをグループ化して三値化する細粒度量子化(FGQ)手法を導入する。
- FGQが、ResNet-101/ResNet-50およびAlexNetを用いて、2w-8aおよび2w-4aで高いTop-1精度をImageNetで達成することを示す。
- グループサイズが精度と計算削減に与える影響を分析し、8ビット計算パイプラインのハードウェアへの影響を論じる。
提案手法
- サイズNの相互に離散的なグループに対してフル精度の重みテンソルを三値化し、各グループごとに独立したサブ問題を生成する。
- 各グループごとに、||W^(i) - alpha * W^^(i)||_F^2 (Eq. 2) を最小化するように alpha と三値化重みベクトルを求める。
- 正/負の重みに対して単一の alpha を用い、Delta_p と Delta_n の別個の閾値を使い、alpha*, Delta_p*, Delta_n* を閉じた形または総当たりで解く(Eqs. 3–5)。
- 入力チャネル次元に沿って静的なグルーピング戦略を採用し、グループ内のダイナミックレンジを最小化し、効率的なメモリ配置とベクトル化を可能にする(Fig. 2)。
- 活性化を8/4ビットに量子化し、演算中は32ビットのアキュームレータを適用してオーバーフローを防止する;分散シフトを補償するため推論時にバッチ正規化統計を再計算する。
- グループサイズ(N)を実験し、精度と三値蓄積の割合をトレードオフする(例:N=4 で 75%の三値FPA、N=64 で約99%)
実験結果
リサーチクエスチョン
- RQ1再訓練なしで、ほとんど精度を失わずに事前学習済みのフル精度ネットワークを三値重みに変換できるのか?
- RQ22w-8a/2w-4a推論パイプラインにおいて、細粒度グルーピング(N)は精度と計算削減にどのような影響を与えるか?
- RQ3層間の重み分布を最大限に保持して精度を高めるための最適なグルーピング戦略は何か?
- RQ4FGQは、ResNet-101、ResNet-50、およびAlexNetで再訓練なしに最先端またはそれに近いImageNet精度を達成できるか?
- RQ5フル8ビット計算パイプラインに対するFGQの実用的なハードウェア影響と性能向上は何か?
主な発見
| ネットワーク | 私たちのベースライン | FGQ-N4 2w-8a | FGQ-N4 2w-4a | INQ 5w-32a | dLAC 2w-32a | DoReFa 1w-4a |
|---|---|---|---|---|---|---|
| Resnet-101 | 77.50% | 73.85% | 70.69% | - | - | - |
| Resnet-50 | 75.05% | 70.76% | 68.38% | 74.81% | 73.85% | - |
| AlexNet | 56.83% | 49.04% | 49.00% | - | - | - |
- N=4 の FGQ (FGQ-N4) は、ImageNetのResNet-101で 2w-8a に対して Top-1 精度 73.85%、2w-4a に対して 70.69% を達成し、再訓練なし。
- ResNet-50 へ適用した FGQ-N4 は、2w-8a で Top-1 70.76%、2w-4a で 68.38%、ほぼフル精度の結果。
- AlexNet に適用した FGQ-N4 は、2w-8a で 49.04% Top-1(再訓練なし)、ベースラインの 56.83% から約 8% ポイント離れる。
- より大きなグループサイズ(例:N=64)は乗算の約99%を排除できるが、顕著な精度低下を引き起こすことがあり、低精度の制限付き再訓練によって緩和できる。
- このアプローチは、重み2ビットでフル8ビット計算パイプラインを実現し、フル精度ベースラインに対して最大で約15倍の理論的性能向上を可能にする。
- 密接な関連研究と比較して、FGQは多くの構成で低精度訓練なしに競争力のある、あるいは優れた精度を達成する。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。