[論文レビュー] Q-ViT: Accurate and Fully Quantized Low-bit Vision Transformer
Q-ViT は Information Rectification Module (IRM) と Distribution Guided Distillation (DGD) を導入し、完全量子化された低ビット Vision Transformers を実現し、ImageNet でフル精度に近づくかそれを上回る精度を達成し、顕著な速度向上を実現します。
The large pre-trained vision transformers (ViTs) have demonstrated remarkable performance on various visual tasks, but suffer from expensive computational and memory cost problems when deployed on resource-constrained devices. Among the powerful compression approaches, quantization extremely reduces the computation and memory consumption by low-bit parameters and bit-wise operations. However, low-bit ViTs remain largely unexplored and usually suffer from a significant performance drop compared with the real-valued counterparts. In this work, through extensive empirical analysis, we first identify the bottleneck for severe performance drop comes from the information distortion of the low-bit quantized self-attention map. We then develop an information rectification module (IRM) and a distribution guided distillation (DGD) scheme for fully quantized vision transformers (Q-ViT) to effectively eliminate such distortion, leading to a fully quantized ViTs. We evaluate our methods on popular DeiT and Swin backbones. Extensive experimental results show that our method achieves a much better performance than the prior arts. For example, our Q-ViT can theoretically accelerates the ViT-S by 6.14x and achieves about 80.9% Top-1 accuracy, even surpassing the full-precision counterpart by 1.0% on ImageNet dataset. Our codes and models are attached on https://github.com/YanjingLi0202/Q-ViT
研究の動機と目的
- 完全量子化された ViT がフル精度の同等モデルと比較して大きな性能低下を引き起こす理由を特定する。
- 量子化された自己注意における情報歪みを rectified するメカニズムを開発する(IRM)。
- 量子化とフル精度モデルの分布を揃える蒸留スキームを設計する(DGD)。
- IRM と DGD を用いた完全量子化 ViT がベースラインの量子化を上回り、ImageNet で FP の性能に近づくまたは超えることを示す。
- DeiT および Swin のバックボーン上で 2–4 ビット量子化の regime を横断して Q-ViT を検証する。
提案手法
- 完全量子化された ViT のボトルネックを診断し、量子化された自己注意マップの情報歪みを定量化する。
- Information Rectification Module (IRM) を導入し、量子化されたクエリとキーのエントロピーを最大化して注意の情報内容を回復する。
- Distribution Guided Distillation (DGD) を提案し、注意ベースの類似度マトリクスとパッチレベルのセマンティック蒸留を通じて分布を揃える。
- 非対称活性化と対称重みを用いた量子化を意識したトレーニング(QAT)フレームワークで ViT コンポーネントを量子化し、バックプロパゲーションにはストレートスルー推定器を使用する。
- 教師–生徒蒸留を活用し、教師が量子化された活性化とフル精度活性化から導出された類似度マトリクスを介して分布的ガイダンスを提供する。
- DeiT および Swin のバックボーンで ImageNet を評価し、LSQ およびベースラインの完全量子化 ViT 構成と比較する。
実験結果
リサーチクエスチョン
- RQ1IRM が低ビット量子化された ViT のアテンションマップの情報内容をフル精度の分布に匹敵させることができるか。
- RQ2量子化されたアテンション表現のエントロピーを最大化することで ViT の順伝播性能が改善されるか。
- RQ3Distribution Guided Distillation が量子化とフル精度 ViT のバックプロパゲーション分布の不一致を効果的に低減できるか。
- RQ4IRM と DGD を組み合わせた完全量子化 ViT は ImageNet でどれだけフル精度 ViT に近づくか、または超えるか。
- RQ5DeiT および Swin のバックボーンで、2–4 ビット量子化の範囲で IRM と DGD の利点は一貫しているか。
主な発見
- 完全量子化された ViT のベースラインは、MHSA の重要なコンポーネントを量子化すると特に性能低下が顕著である。
- IRM はアテンション表現のエントロピーを高め、完全量子化ベースラインと比較して Top-1 精度を改善する(例: 2–4 ビット領域での利得)。
- DGD は量子化とフル精度活性化間のパッチベースの類似度マトリクスを介して分布を揃えることでさらなる利得を提供する。
- IRM と DGD を組み合わせた (Q-ViT) は完全量子化 ViT へのギャップを大幅に埋め、いくつかの設定では FP 性能を超えることもある(例: Swin-T で 4-bit Q-ViT がフル精度を上回る)。
- Q-ViT は notable FLOPs の削減を達成(例: 一部の構成で約 21x まで)し、DeiT および Swin のバックボーンで ImageNet において精度が競合的または優れている。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。