[論文レビュー] EfficientFormer: Vision Transformers at MobileNet Speed
EfficientFormerは、モバイルデバイス上でMobileNet並みの速度で純粋なビジョントランスフォーマーを実行しつつ、高いImageNet精度を達成する、遅延・次元整合設計とスリミングによるアプローチ。
Vision Transformers (ViT) have shown rapid progress in computer vision tasks, achieving promising results on various benchmarks. However, due to the massive number of parameters and model design, extit{e.g.}, attention mechanism, ViT-based models are generally times slower than lightweight convolutional networks. Therefore, the deployment of ViT for real-time applications is particularly challenging, especially on resource-constrained hardware such as mobile devices. Recent efforts try to reduce the computation complexity of ViT through network architecture search or hybrid design with MobileNet block, yet the inference speed is still unsatisfactory. This leads to an important question: can transformers run as fast as MobileNet while obtaining high performance? To answer this, we first revisit the network architecture and operators used in ViT-based models and identify inefficient designs. Then we introduce a dimension-consistent pure transformer (without MobileNet blocks) as a design paradigm. Finally, we perform latency-driven slimming to get a series of final models dubbed EfficientFormer. Extensive experiments show the superiority of EfficientFormer in performance and speed on mobile devices. Our fastest model, EfficientFormer-L1, achieves $79.2\%$ top-1 accuracy on ImageNet-1K with only $1.6$ ms inference latency on iPhone 12 (compiled with CoreML), which runs as fast as MobileNetV2$ imes 1.4$ ($1.6$ ms, $74.7\%$ top-1), and our largest model, EfficientFormer-L7, obtains $83.3\%$ accuracy with only $7.0$ ms latency. Our work proves that properly designed transformers can reach extremely low latency on mobile devices while maintaining high performance.
研究の動機と目的
- モバイルハードウェア上のViT設計におけるボトルネックと非効率を特定する。
- エッジデバイスで速度と性能を維持する次元整合なトランスフォーマー設計を提案する。
- EfficientFormerファミリを導出するための遅延駆動スリミング戦略を開発する。
- 検出およびセグメンテーションタスクのバックボーンとしてEfficientFormerを実証する。
- モバイル(iPhone)およびデスクトップハードウェアで再現性のある評価を提供する。
提案手法
- CoreMLを用いたiPhone 12上でのViTコンポーネントのデバイス内遅延分析を実施し、ボトルネックを特定する。
- 4D Conv-BNベースのブロック(MB4D)と3D MHSAベースのブロック(MB3D)を組み込んだ次元整合設計を導入する。
- 高速ダウンサンプリングを備えたパッチ埋め込みのステムを定義し、速度のボトルネックとなる大きなカーネルのパッチ埋め込みを避ける。
- 4Dおよび3D構成を許可するMetaBlocksを用いたスーパーネットを構築し、遅延ルックアップテーブルに導かれた勾配ベースの遅延認識スリミング手順を用いてEfficientFormer派生モデルを得る。
- スーパーネットを訓練し、ブロック重要度を推定するためにGumbel-Softmaxサンプリングを適用し、ターゲット遅延を満たすよう遅延駆動の剪定/幅調整を行う。
- ImageNet-1K、COCO、ADE20KでEfficientFormerを評価し、分類・物体検出・セグメンテーション性能を示す。
実験結果
リサーチクエスチョン
- RQ1ビジョントランスフォーマーはMobileNetに匹敵するモバイル速度の遅延で高精度を維持できるだろうか?
- RQ2ViTアーキテクチャにおけるどの設計選択がデバイス上の遅延に最も影響を与え、エッジハードウェアで速度を最大化するにはトランスフォーマーをどう再構成すべきか?
- RQ3次元整合トランスフォーマー設計を用いた遅延駆動スリミングパイプラインは、実用的で高性能なモバイルモデルを生み出すか?
- RQ4EfficientFormerのバックボーンはCNNおよびハイブリッドViT設計と比較して検出・セグメンテーションのベンチマークでどう性能を示すか?
主な発見
- EfficientFormer-L1はiPhone 12(CoreML)で1.6 msの遅延、ImageNet-1Kで79.2%のTop-1精度を達成し、MobileNetV2×1.4の速度と同等である。
- EfficientFormer-L7はiPhone 12で7.0 msの遅延で83.3%のTop-1精度に到達する。
- Nvidia A100では、EfficientFormer-L1はEfficientNet-B0より38%高速でTop-1が2.1%高い。L7はEfficientNet-B5より4.6倍速い。
- EfficientFormerはPoolFormerおよび他のViTベースのモデルより遅延と精度の両方で優れ、純粋なトランスフォーマーアーキテクチャのエッジ性能の強さを示す。
- COCO(検出/インスタンスセグメンテーション)およびADE20K(セグメンテーション)でのバックボーン実験は、同等の計算予算下でEfficientFormer-L3/L7がResNetおよびPoolFormerのベースラインを上回る。
- 次元整合のMB4D/MB3D設計と遅延駆動スリミングにより、モバイルハードウェアで超高速なトランスフォーマ推論を実現する。
より良い研究を、今すぐ始めましょう
論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。