[Paper Review] EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers
EdgeViTs introduce a novel family of lightweight vision transformers that outperform state-of-the-art efficient CNNs on mobile devices by integrating a local-global-local (LGL) attention mechanism combining self-attention and depthwise convolutions. The models achieve Pareto-optimal accuracy-latency and accuracy-energy tradeoffs, surpassing even MobileViTs—previously the only ViT architecture designed for mobile—across image classification, object detection, and semantic segmentation on real hardware.
Self-attention based models such as vision transformers (ViTs) have emerged as a very competitive architecture alternative to convolutional neural networks (CNNs) in computer vision. Despite increasingly stronger variants with ever-higher recognition accuracies, due to the quadratic complexity of self-attention, existing ViTs are typically demanding in computation and model size. Although several successful design choices (e.g., the convolutions and hierarchical multi-stage structure) of prior CNNs have been reintroduced into recent ViTs, they are still not sufficient to meet the limited resource requirements of mobile devices. This motivates a very recent attempt to develop light ViTs based on the state-of-the-art MobileNet-v2, but still leaves a performance gap behind. In this work, pushing further along this under-studied direction we introduce EdgeViTs, a new family of light-weight ViTs that, for the first time, enable attention-based vision models to compete with the best light-weight CNNs in the tradeoff between accuracy and on-device efficiency. This is realized by introducing a highly cost-effective local-global-local (LGL) information exchange bottleneck based on optimal integration of self-attention and convolutions. For device-dedicated evaluation, rather than relying on inaccurate proxies like the number of FLOPs or parameters, we adopt a practical approach of focusing directly on on-device latency and, for the first time, energy efficiency. Specifically, we show that our models are Pareto-optimal when both accuracy-latency and accuracy-energy trade-offs are considered, achieving strict dominance over other ViTs in almost all cases and competing with the most efficient CNNs. Code is available at https://github.com/saic-fi/edgevit.
Motivation & Objective
- To close the performance gap between lightweight vision transformers (ViTs) and state-of-the-art efficient CNNs on mobile and edge devices.
- To address the limitations of existing ViTs in mobile deployment by focusing on real-world efficiency metrics like on-device latency and energy consumption, rather than proxy metrics such as FLOPs.
- To design a ViT architecture that is both computationally efficient and deployable using standard deep learning frameworks without custom operations.
- To achieve competitive performance on dense prediction tasks (object detection, semantic segmentation) while maintaining low inference cost on mobile hardware.
Proposed method
- Propose a local-global-local (LGL) information exchange bottleneck that integrates depthwise convolutions and self-attention in a structured, cost-effective manner.
- Decompose self-attention into local, global, and recombination stages to reduce computational complexity while preserving long-range modeling capability.
- Use a hierarchical multi-stage architecture with spatial resolution downsampling, inspired by CNNs, to control sequence length and reduce quadratic complexity.
- Integrate depthwise separable convolutions to enhance local feature modeling and improve parameter efficiency.
- Design the model for direct deployment using standard deep learning frameworks (e.g., ONNX, TensorRT) to ensure implementation friendliness and high on-device inference speed.
- Train models on ImageNet-1K and fine-tune on COCO and ADE20K using standard protocols to evaluate performance on diverse vision tasks.
Experimental results
Research questions
- RQ1Can vision transformers be made efficient enough to outperform or match the best lightweight CNNs in terms of accuracy and on-device inference efficiency?
- RQ2Does integrating local convolutions into the self-attention mechanism significantly improve efficiency without sacrificing accuracy on mobile hardware?
- RQ3How do real-world metrics like on-device latency and energy consumption compare to FLOPs as predictors of model efficiency in mobile deployment?
- RQ4Can a ViT-based architecture be both highly accurate and deployable using standard deep learning frameworks without requiring framework-specific optimizations?
- RQ5To what extent can a vision transformer achieve Pareto-optimality in the accuracy-latency and accuracy-energy tradeoffs compared to both CNNs and generic ViTs?
Key findings
- EdgeViT-XXS achieves 39.7% mIoU on ADE20K semantic segmentation, outperforming PVTv2-B0 by 2.5 percentage points at similar GFLOPs and parameter count.
- EdgeViT-S achieves 45.9% mIoU on ADE20K, surpassing PVTv2-B1 by 3.4 percentage points, demonstrating strong performance on dense prediction tasks.
- On COCO object detection with RetinaNet, EdgeViT-XXS achieves 1.5 AP higher than PVTv2-B0, and with Mask R-CNN, it exceeds PVTv2-B0 by 1.7 AP on mask segmentation.
- EdgeViT-XXS runs in 33.3ms on a Samsung Galaxy S21, faster than EfficientNet-B0 (52.1ms), despite higher GFLOPs, indicating superior on-device efficiency.
- EdgeViTs achieve strict dominance over other ViTs in both accuracy-latency and accuracy-energy tradeoffs, with energy consumption only slightly higher than EfficientNet-B0.
- The models are Pareto-optimal across all evaluated metrics, outperforming MobileViTs—previously the only ViT family designed for mobile—across all benchmarks and efficiency metrics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.