MobileNetV4 - Universal Models for the Mobile Ecosystem

Danfeng Qin, Chas Leichner, Manolis Delakis, Marco Fornoni, Shixin Luo, Fan Yang, Weijun Wang, Colby R. Banbury, Chengxi Ye, Berkin Akin, Vaibhav Aggarwal, Tenghui Zhu, Daniele Moro, Andrew Howard

Abstract

We present the latest generation of MobileNets, known as MobileNetV4 (MNv4), featuring universally efficient architecture designs for mobile devices. At its core, we introduce the Universal Inverted Bottleneck (UIB) search block, a unified and flexible structure that merges Inverted Bottleneck (IB), ConvNext, Feed Forward Network (FFN), and a novel Extra Depthwise (ExtraDW) variant. Alongside UIB, we present Mobile MQA, an attention block tailored for mobile accelerators, delivering a significant 39% speedup. An optimized neural architecture search (NAS) recipe is also introduced which improves MNv4 search effectiveness. The integration of UIB, Mobile MQA and the refined NAS recipe results in a new suite of MNv4 models that are mostly Pareto optimal across mobile CPUs, DSPs, GPUs, as well as specialized accelerators like Apple Neural Engine and Google Pixel EdgeTPU - a characteristic not found in any other models tested. Finally, to further boost accuracy, we introduce a novel distillation technique. Enhanced by this technique, our MNv4-Hybrid-Large model delivers 87% ImageNet-1K accuracy, with a Pixel 8 EdgeTPU runtime of just 3.8ms.

Introduction

In the mobile AI landscape, "efficiency" is often a hardware-dependent target. An architecture optimized for a smartphone CPU may perform poorly on a dedicated Neural Processing Unit (NPU) due to differences in memory bandwidth and supported operations. Historically, optimization has targeted specific hardware or relied on proxy metrics like FLOPs/MACs, which frequently fail to reflect real-world wall-clock latency. MobileNetV4 (MNv4) addresses this challenge by aiming for hardware-independent Pareto efficiency, creating a single model family that excels across diverse platforms, including the Apple Neural Engine, Google Pixel EdgeTPU, and standard ARM CPUs.

Architectural Innovations

MobileNetV4 introduces several key components to achieve its universal efficiency, moving away from simple scaling rules toward a more nuanced understanding of hardware bottlenecks.

Universal Inverted Bottleneck (UIB)

The UIB is a unified building block that merges designs from Inverted Bottlenecks, ConvNext, and Feed Forward Networks. It incorporates two optional depthwise convolutions, allowing Neural Architecture Search (NAS) to dynamically choose between spatial and channel mixing. A novel variant, ExtraDW, is included to increase receptive fields at a low computational cost.

Mobile MQA

While Multi-Head Attention (MHSA) is standard in modern vision transformers, it often creates memory bottlenecks on mobile devices. MNv4 adapts Multi-Query Attention (MQA)—commonly used in Large Language Models—for vision tasks. By sharing keys and values across attention heads, Mobile MQA significantly reduces memory pressure. Combined with asymmetric spatial downsampling and optimized "Einsum" operations, it avoids expensive tensor transposes that typically slow down mobile accelerators.

Roofline Model Analysis

The design process was underpinned by Roofline Model Analysis, a framework that identifies whether a layer is compute-bound (limited by processor speed) or memory-bound (limited by memory bandwidth). This analysis allowed the authors to strategically place MAC-intensive layers where they provide the most accuracy gain without hitting memory walls on target hardware. This approach acknowledges that minimizing MACs does not guarantee speed; on high-end accelerators, data movement is often the primary bottleneck.

Roofline analysis for accelerators, illustrating the balance between compute and memory bounds.

Results and Pareto Optimality

MobileNetV4 demonstrates exceptional performance across a wide array of consumer hardware. The models are mostly Pareto optimal on platforms including the Pixel 6/8, Samsung S23, and iPhone 13, a level of cross-platform consistency rarely seen in mobile-first architectures.

MobileNetV4 Pareto optimality across various mobile CPUs, GPUs, DSPs, and accelerators.

Key performance highlights include:

  • Mobile MQA Efficiency: The optimized attention block provides a 39% speedup on mobile accelerators compared to standard MHSA.
  • State-of-the-Art Accuracy: The MNv4-Conv-S model achieves 73.8% ImageNet accuracy in 2.4ms on a Pixel 6 CPU. The MNv4-Hybrid-L model reaches 83.4% Top-1 accuracy in 3.8ms on the Pixel 8 EdgeTPU.
  • Distillation Gains: Using a novel distillation technique with an offline dataset (JFT-300M), the Hybrid-Large model reaches 87.0% ImageNet-1K accuracy, rivaling much larger server-side models.
  • Object Detection: On the COCO benchmark, MNv4-Conv-M backbones are 23% faster than MobileNetV2-based equivalents with comparable accuracy.

Conclusion

MobileNetV4 sets a new standard for mobile efficiency by prioritizing universal performance over hardware-specific tuning. Through the introduction of the Universal Inverted Bottleneck and Mobile MQA, and guided by Roofline analysis, MNv4 achieves state-of-the-art accuracy with millisecond latencies across the entire mobile ecosystem. The principles of universal design and Roofline-based analysis provide a robust path forward for future mobile AI development.

Summary updated

Abstract

We present the latest generation of MobileNets, known as MobileNetV4 (MNv4), featuring universally efficient architecture designs for mobile devices. At its core, we introduce the Universal Inverted Bottleneck (UIB) search block, a unified and flexible structure that merges Inverted Bottleneck (IB), ConvNext, Feed Forward Network (FFN), and a novel Extra Depthwise (ExtraDW) variant. Alongside UIB, we present Mobile MQA, an attention block tailored for mobile accelerators, delivering a significant 39% speedup. An optimized neural architecture search (NAS) recipe is also introduced which improves MNv4 search effectiveness. The integration of UIB, Mobile MQA and the refined NAS recipe results in a new suite of MNv4 models that are mostly Pareto optimal across mobile CPUs, DSPs, GPUs, as well as specialized accelerators like Apple Neural Engine and Google Pixel EdgeTPU - a characteristic not found in any other models tested. Finally, to further boost accuracy, we introduce a novel distillation technique. Enhanced by this technique, our MNv4-Hybrid-Large model delivers 87% ImageNet-1K accuracy, with a Pixel 8 EdgeTPU runtime of just 3.8ms.
BibTeX
@inproceedings{qin2024mobilenetv,
  author = {Danfeng Qin and Chas Leichner and Manolis Delakis and Marco Fornoni and Shixin Luo and Fan Yang and Weijun Wang and Colby R. Banbury and Chengxi Ye and Berkin Akin and Vaibhav Aggarwal and Tenghui Zhu and Daniele Moro and Andrew Howard},
  title = {{MobileNetV4 - Universal Models for the Mobile Ecosystem}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=OhSPTP8AC1},
}
Figure