Separable Self-attention for Mobile Vision Transformers

By Sachin Mehta, Mohammad Rastegari. Trans. Mach. Learn. Res., 2022

456 citations recorded by the source corpus.

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}

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition

View Paper: https://www.semanticscholar.org/paper/066c143b427571fb5568f2c581ea9066478d2e55

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Fahad Shahbaz Khan
  2. Salman Hameed Khan
  3. Rao Muhammad Anwer
  4. Zijia Lin
  5. Hui Chen
  6. Ao Wang
  7. Hisham Cholakkal
  8. Abdelrahman M. Shaker

In Computer Vision and Pattern Recognition

  1. Fahad Shahbaz Khan
  2. Salman Hameed Khan
  3. Syed Waqas Zamir
  4. Houwen Peng
  5. Hisham Cholakkal
  6. Rao Muhammad Anwer
  7. Ming-Hsuan Yang
  8. Ling Shao

Citations in the corpus