[論文レビュー] DiffRate : Differentiable Compression Rate for Efficient Vision Transformers
DiffRateは、勾配ベースの学習により、トークンの削除と統合を同時に最適化する、ビジョントランスフォーマー向けの微分可能圧縮率メカニズムを提案する。ハイパーパramータのチューニングを必要とせず、レイヤー単位での自動的圧縮率選択を可能にし、ViT-H (MAE) を用いたImageNetで40%のFLOPs削減と1.5倍のスループット向上を達成。微調整を一切行わず、精度低下もたった0.16%にとどまる。
Token compression aims to speed up large-scale vision transformers (e.g. ViTs) by pruning (dropping) or merging tokens. It is an important but challenging task. Although recent advanced approaches achieved great success, they need to carefully handcraft a compression rate (i.e. number of tokens to remove), which is tedious and leads to sub-optimal performance. To tackle this problem, we propose Differentiable Compression Rate (DiffRate), a novel token compression method that has several appealing properties prior arts do not have. First, DiffRate enables propagating the loss function's gradient onto the compression ratio, which is considered as a non-differentiable hyperparameter in previous work. In this case, different layers can automatically learn different compression rates layer-wisely without extra overhead. Second, token pruning and merging can be naturally performed simultaneously in DiffRate, while they were isolated in previous works. Third, extensive experiments demonstrate that DiffRate achieves state-of-the-art performance. For example, by applying the learned layer-wise compression rates to an off-the-shelf ViT-H (MAE) model, we achieve a 40% FLOPs reduction and a 1.5x throughput improvement, with a minor accuracy drop of 0.16% on ImageNet without fine-tuning, even outperforming previous methods with fine-tuning. Codes and models are available at https://github.com/OpenGVLab/DiffRate.
研究の動機と目的
- トークン圧縮手法における圧縮率の手動設定という課題に取り組むこと。これは煩雑かつ最適でない。
- レイヤー全体にわたる圧縮率のエンドツーエンド、勾配ベースの最適化を可能にし、自動的かつ適応的な率選択を実現すること。
- トークンの削除と統合を統合した単一の微分可能フレームワークとして統合し、効率性と精度の両方を向上させること。
- 主モデルの微調整に依存するのを減らすために、最小限のデータで最適な圧縮率を学習すること。
- FLOPs、遅延、電力などの複数の制約下でも、顕著な精度損失なしに計算効率を向上させること。
提案手法
- 離散的トークン選択をソフトからハードへのサンプリング戦略で再パラメータ化する、微分可能離散プロキシ(DDP)モジュールを導入。これにより、離散的トークン選択の勾配逆伝播が可能になる。
- 各レイヤーごとに学習可能な圧縮率を採用。保持するトークン数は、離散的選択プロセスの微分可能緩和により最適化される。
- 学習された重要度指標を用いて、重要度の高いトークンを特定・保持することで、1回のフォワードパスで削除と統合の両方を実行する。
- クラスアテンション(Ac)に基づくトークン重要度指標を採用。これは微分可能であり、追加計算を要しない。
- 複数の制約(FLOPs、遅延、電力)を考慮した多目的損失関数を用いて、圧縮率の最適化を実施。
- 圧縮率最適化をたった3エポックで学習(ViT-Bでは2.7 GPU時間)することで、高い訓練効率を示す。
![Figure 1 : Comparison of different token compression methods including token pruning EViT [ 21 ] , token merging ToMe [ 1 ] and our method. Pruned tokens are represented by black and non-border, while merged tokens are represented by patches with the same inner and border color. ( a ) shows that our](https://ar5iv.labs.arxiv.org/html/2305.17997/assets/x1.png)
実験結果
リサーチクエスチョン
- RQ1勾配降下法を用いたエンドツーエンドの最適化により、手作業によるハイパーパramータの設定を完全に排除できるか?
- RQ2削除と統合の両方が、単一の微分可能フレームワーク内で同時に最適化可能で、圧縮効率が向上するか?
- RQ3微調整なしで最適な圧縮率を学習するために、どの程度のデータ量が必要か?
- RQ4圧縮率を最適化する際の、計算効率(FLOPs、遅延、電力)と精度のトレードオフはどの程度か?
- RQ5提案手法は、ビジョントランスフォーマーのバックボーンを微調整せずに、SOTAのパフォーマンスを達成できるか?
主な発見
- DiffRateは、ViT-H (MAE) を用いたImageNetで、FLOPsを40%削減し、スループットを1.5倍向上。微調整なしで精度低下はたった0.16%にとどまる。
- 従来の微調整を必要とする手法を上回る、SOTAのパフォーマンスを達成。
- 最適な圧縮率を学習するのにたった1,000枚の画像で十分であり、高いデータ効率を示す。
- 最適化はわずか3エポックで収束(ViT-Bでは2.7 GPU時間)、高い訓練効率を示す。
- FLOPs、遅延、電力の複数の複雑さ制約を用いることで、遅延を2.5ms、電力を8mW削減。精度低下はたった0.03%にとどまる。
- 可視化結果から、DiffRateは背景のトークンを効果的に削除し、識別性が低い前景トークンを統合しつつ、顕著な特徴を保持していることが確認された。

この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。