EfficientViT: Memory Efficient Vision Transformer with Cascaded Group Attention

要約

タイトル: Cascade Group Attentionを用いたメモリー効率の高いVision Transformer、EfficientViT

要約:
– ビジョン・トランスフォーマーには、高いモデル能力がある一方で、実時間アプリケーションには適さないほどの計算コストがかかるという課題がある。
– そこで、本論文ではEfficientViTという高速なビジョン・トランスフォーマーの一族を提案する。
– 既存のトランスフォーマー・モデルは、テンソルの再形成やMHSAでの要素ごとの関数など、メモリーの無駄な操作によって速度が制限されていることが分かっている。
– そこで、本研究では、FFNレイヤーと1つのメモリー・バウンドなMHSAとの間にサンドイッチのようなレイアウトを採用する新しいビルディング・ブロックを設計し、メモリー効率を向上させながらチャネルの通信を強化する。
– さらに、注意力マップは頭部間で高い類似性を持っているため、計算冗長性が生じていることが分かった。これに対処するため、完全な特徴の異なるsplitを用いて注意ヘッドを供給するカスケード・グループ・アテンション・モジュールを提案し、計算コストを削減し、注意の多様性を向上させる。
– 網羅的な実験により、EfficientViTが既存の効率的モデルよりも優れたパフォーマンスを発揮することが示され、速度と精度の間で良いトレードオフを実現することができた。例えば、EfficientViT-M5はMobileNetV3-Largeを1.9%上回る精度を獲得し、Nvidia V100 GPUとIntel Xeon CPUでそれぞれ40.4%と45.2%のスループットを得る。また、最近の効率的モデルであるMobileViT-XXSと比較して、EfficientViT-M2は1.8%優れた精度を獲得し、GPU/CPUでそれぞれ5.8倍/3.7倍高速であり、ONNX形式に変換された際には7.4倍高速である。
– コードとモデルはhttps://github.com/microsoft/Cream/tree/main/EfficientViTで利用可能。

要約(オリジナル)

Vision transformers have shown great success due to their high model capabilities. However, their remarkable performance is accompanied by heavy computation costs, which makes them unsuitable for real-time applications. In this paper, we propose a family of high-speed vision transformers named EfficientViT. We find that the speed of existing transformer models is commonly bounded by memory inefficient operations, especially the tensor reshaping and element-wise functions in MHSA. Therefore, we design a new building block with a sandwich layout, i.e., using a single memory-bound MHSA between efficient FFN layers, which improves memory efficiency while enhancing channel communication. Moreover, we discover that the attention maps share high similarities across heads, leading to computational redundancy. To address this, we present a cascaded group attention module feeding attention heads with different splits of the full feature, which not only saves computation cost but also improves attention diversity. Comprehensive experiments demonstrate EfficientViT outperforms existing efficient models, striking a good trade-off between speed and accuracy. For instance, our EfficientViT-M5 surpasses MobileNetV3-Large by 1.9% in accuracy, while getting 40.4% and 45.2% higher throughput on Nvidia V100 GPU and Intel Xeon CPU, respectively. Compared to the recent efficient model MobileViT-XXS, EfficientViT-M2 achieves 1.8% superior accuracy, while running 5.8x/3.7x faster on the GPU/CPU, and 7.4x faster when converted to ONNX format. Code and models are available at https://github.com/microsoft/Cream/tree/main/EfficientViT.

arxiv情報

著者 Xinyu Liu,Houwen Peng,Ningxin Zheng,Yuqing Yang,Han Hu,Yixuan Yuan
発行日 2023-05-11 17:59:41+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

カテゴリー: cs.CV パーマリンク