Skip to main content
QUICK REVIEW

[Paper Review] EdgeNeXt: Efficiently Amalgamated CNN-Transformer Architecture for Mobile Vision Applications

Muhammad Maaz, Abdelrahman Shaker|arXiv (Cornell University)|Jun 21, 2022
Advanced Neural Network ApplicationsComputer Science19 citations
TL;DR

EdgeNeXt proposes a lightweight hybrid CNN-Transformer architecture for mobile vision, using split depth-wise transpose attention (STDA) to efficiently capture global context with low FLOPs. It achieves 71.2% top-1 accuracy on ImageNet-1K with 1.3M parameters and 28% fewer FLOPs than MobileViT, outperforming SOTA models in accuracy and efficiency across classification, detection, and segmentation tasks.

ABSTRACT

In the pursuit of achieving ever-increasing accuracy, large and complex neural networks are usually developed. Such models demand high computational resources and therefore cannot be deployed on edge devices. It is of great interest to build resource-efficient general purpose networks due to their usefulness in several application areas. In this work, we strive to effectively combine the strengths of both CNN and Transformer models and propose a new efficient hybrid architecture EdgeNeXt. Specifically in EdgeNeXt, we introduce split depth-wise transpose attention (STDA) encoder that splits input tensors into multiple channel groups and utilizes depth-wise convolution along with self-attention across channel dimensions to implicitly increase the receptive field and encode multi-scale features. Our extensive experiments on classification, detection and segmentation tasks, reveal the merits of the proposed approach, outperforming state-of-the-art methods with comparatively lower compute requirements. Our EdgeNeXt model with 1.3M parameters achieves 71.2% top-1 accuracy on ImageNet-1K, outperforming MobileViT with an absolute gain of 2.2% with 28% reduction in FLOPs. Further, our EdgeNeXt model with 5.6M parameters achieves 79.4% top-1 accuracy on ImageNet-1K. The code and models are available at https://t.ly/_Vu9.

Motivation & Objective

  • To design a resource-efficient neural architecture that combines the strengths of CNNs and Transformers for mobile vision applications.
  • To address the limitations of CNNs in modeling global context and the high computational cost of standard Transformers on edge devices.
  • To achieve superior accuracy with reduced model size, parameters, and FLOPs compared to existing lightweight models.
  • To enable high-speed inference on mobile platforms while maintaining strong performance on classification, detection, and segmentation tasks.
  • To explore optimal placement and configuration of hybrid attention modules in a CNN backbone for optimal speed-accuracy trade-offs.

Proposed method

  • Introduces split depth-wise transpose attention (STDA) as a core module, which splits input tensors into channel groups and applies depth-wise convolution and self-attention across channel dimensions to enhance receptive field and feature encoding.
  • Employs a hybrid backbone architecture where STDA encoders are strategically placed as the last block in the last three stages to balance local and global feature learning.
  • Uses Hard-Swish activation and batch normalization instead of GELU and layer normalization to reduce inference latency without significant accuracy drop.
  • Applies a progressive ablation study to determine optimal placement of STDA modules across network stages, favoring later stages where features are more semantically mature.
  • Designs a multi-stage architecture with depthwise separable convolutions and STDA blocks, optimizing for both parameter count and multiply-add operations (MAdds).
  • Conducts extensive ablation on STDA placement (start vs. end of stage) and stage-wise configuration to identify the best trade-off between accuracy and latency.

Experimental results

Research questions

  • RQ1Can a hybrid CNN-Transformer architecture achieve state-of-the-art accuracy on mobile vision tasks while maintaining low FLOPs and inference latency?
  • RQ2How does the placement of STDA modules across network stages affect the accuracy-latency trade-off in a lightweight backbone?
  • RQ3Does using split depth-wise transpose attention improve global context modeling without increasing computational cost compared to standard self-attention?
  • RQ4To what extent can replacing GELU and layer normalization with Hard-Swish and batch normalization reduce latency with minimal accuracy degradation?
  • RQ5Can a unified architecture effectively combine local feature extraction (CNN) and global context modeling (self-attention) in a parameter- and FLOP-efficient manner?

Key findings

  • EdgeNeXt with 1.3M parameters achieves 71.2% top-1 accuracy on ImageNet-1K, outperforming MobileViT by 2.2% with 28% fewer FLOPs.
  • The 5.6M parameter EdgeNeXt variant achieves 79.4% top-1 accuracy on ImageNet-1K, surpassing MobileViT while requiring 35% fewer FLOPs.
  • The model achieves 79.4% top-1 accuracy with 1.3G FLOPs and 332μs latency, demonstrating a favorable speed-accuracy trade-off on mobile platforms.
  • Ablation shows that placing STDA encoders at the end of the last three stages yields the best accuracy-latency balance, while global STDA in the first stage is ineffective.
  • Replacing GELU and layer normalization with Hard-Swish and batch normalization reduces latency significantly with only a minor drop in accuracy.
  • On COCO and Pascal VOC benchmarks, EdgeNeXt achieves higher mAP and mIOU than prior lightweight models with fewer FLOPs and comparable parameter counts.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.