Abstract
Traditionally, convolutional neural networks (CNN) and vision transformers (ViT) have dominated computer vision. However, recently proposed vision graph neural networks (ViG) provide a new avenue for exploration. Unfortunately, for mobile applications, ViGs are computationally expensive due to the overhead of representing images as graph structures. In this work, we propose a new graph-based sparse attention mechanism, Sparse Vision Graph Attention (SVGA), that is designed for ViGs running on mobile devices. Additionally, we propose the first hybrid CNN-GNN architecture for vision tasks on mobile devices, MobileViG, which uses SVGA. Extensive experiments show that MobileViG beats existing ViG models and existing mobile CNN and ViT architectures in terms of accuracy and/or speed on image classification, object detection, and instance segmentation tasks. Our fastest model, MobileViG-Ti, achieves 75.7% top-1 accuracy on ImageNet-1K with 0.78 ms inference latency on iPhone 13 Mini NPU, which is faster than MobileNetV2x1.4. Our work proves that well-designed hybrid CNN-GNN architectures can be a new avenue of exploration for designing models that are extremely fast and accurate on mobile devices.
Introduction
Computer vision has long been a tug-of-war between CNNs, which excel at local feature extraction, and Vision Transformers (ViTs), which capture global context. Vision Graph Neural Networks (ViGs) recently emerged as a promising alternative, representing images as graphs to model complex interactions. However, standard ViGs are typically "mobile-unfriendly" because they rely on dynamic K-Nearest Neighbors (KNN) graph construction. This process involves heavy computation and frequent tensor reshaping, which are inefficient for mobile Neural Processing Units (NPUs). MobileViG addresses this by introducing a hardware-aware architecture that provides global reasoning without the computational tax of dynamic graphs.
Methods: Sparse Vision Graph Attention and MobileViG
The core innovation of this work is the Sparse Vision Graph Attention (SVGA) mechanism. Unlike standard ViGs that search for neighbors dynamically, SVGA utilizes a fixed graph structure where each pixel connects to every $K^{th}$ pixel in its row and column. By using "rolling" operations (circular shifts), the model aligns distant pixels, allowing graph convolutions to be executed using standard, highly optimized 2D convolutions. This eliminates the need to reshape data into 3D graph formats, maintaining the 4D tensor structure preferred by mobile hardware.
The MobileViG Architecture is a hybrid design consisting of four stages:
- Stages 1-3: Utilize standard MBConv blocks (inverted residuals) for efficient local feature extraction.
- Stage 4: Employs the new SVGA blocks (comprising a Grapher and FFN) to capture global context at the lowest resolution.
Key Results
MobileViG was evaluated on ImageNet-1K for classification and MS COCO 2017 for detection and segmentation. The results on an iPhone 13 Mini (compiled with CoreML) demonstrate significant improvements over existing architectures.
As shown in the table above, the MobileViG (MViG) variants significantly reduce GPU latency and parameter counts compared to the baseline Pyramid ViG (PViG) while maintaining competitive accuracy. For instance, MViG-Ti achieves 75.7% top-1 accuracy with a GPU latency of 18.0 ms, compared to PViG-Ti's 81.2 ms. On mobile NPUs, the performance is even more striking: MobileViG-Ti achieves 0.78 ms latency, making it faster and more accurate than MobileNetV2 x1.4. The MobileViG-B (Base) model reaches 82.6% top-1 accuracy with 2.30 ms NPU latency, outperforming EfficientFormer-L3. Furthermore, MobileViG generalizes well to downstream tasks; as a backbone for Mask R-CNN, MobileViG-B outperformed both ResNet50 and PVT-Small.
Discussion and Conclusion
The success of MobileViG stems from prioritizing structural predictability over dynamic flexibility. By trading dynamic KNN graphs for fixed sparse graphs, the authors achieved massive speedups on mobile hardware with negligible loss in representational power. This hardware-aware design allows the model to leverage NPU accelerators optimized for 4D convolutional math.
While the fixed graph structure is highly efficient, it lacks the content-adaptive nature of dynamic graphs. Future work may explore more sophisticated hybrid designs or extend these models to even more resource-constrained IoT devices. MobileViG proves that hybrid CNN-GNN architectures are a viable and powerful path for high-performance mobile vision.
Summary updated