Separable Self-attention for Mobile Vision Transformers

要約

モバイルビジョントランスフォーマー(MobileViT)は、分類や検出など、いくつかのモバイルビジョンタスクにおいて最先端の性能を達成することができる。これらのモデルはパラメータが少ないものの、畳み込みニューラルネットワークベースのモデルと比較してレイテンシーが高いのが特徴です。MobileViTの主な効率性のボトルネックは、トークン(またはパッチ)$k$の数に関して$O(k^2)$時間複雑性を必要とする、変換器における多頭自己注意(MHA)である。さらに、MHAは自己注意を計算するためにコストのかかる演算(例えば、バッチ単位の行列乗算)を必要とし、リソースに制約のあるデバイスのレイテンシーに影響を与える。本論文では、線形複雑度、すなわち$O(k)$を有する分離可能な自己アテンション法を紹介する。提案手法の特徴は、自己注視の計算に要素ごとの演算を用いるというシンプルかつ効果的なものであり、リソースに制約のあるデバイスに適している。改良したモデルMobileViTv2は、ImageNetの物体分類やMS-COCOの物体検出など、いくつかのモバイルビジョンタスクで最先端の性能を発揮する。MobileViTv2は、約300万個のパラメータで、ImageNetデータセットで75.6%のトップ1精度を達成し、モバイルデバイスで$3.2times$速く動作しながらMobileViTより約1%高い性能を発揮します。 ソースコードは以下から入手可能です。\■https://github.com/apple/ml-cvnets

要約(オリジナル)

Mobile vision transformers (MobileViT) can achieve state-of-the-art performance across several mobile vision tasks, including classification and detection. Though these models have fewer parameters, they have high latency as compared to convolutional neural network-based models. The main efficiency bottleneck in MobileViT is the multi-headed self-attention (MHA) in transformers, which requires $O(k^2)$ time complexity with respect to the number of tokens (or patches) $k$. Moreover, MHA requires costly operations (e.g., batch-wise matrix multiplication) for computing self-attention, impacting latency on resource-constrained devices. This paper introduces a separable self-attention method with linear complexity, i.e. $O(k)$. A simple yet effective characteristic of the proposed method is that it uses element-wise operations for computing self-attention, making it a good choice for resource-constrained devices. The improved model, MobileViTv2, is state-of-the-art on several mobile vision tasks, including ImageNet object classification and MS-COCO object detection. With about three million parameters, MobileViTv2 achieves a top-1 accuracy of 75.6% on the ImageNet dataset, outperforming MobileViT by about 1% while running $3.2\times$ faster on a mobile device. Our source code is available at: \url{https://github.com/apple/ml-cvnets}

arxiv情報

著者 Sachin Mehta,Mohammad Rastegari
発行日 2022-06-06 15:31:35+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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