Challenges and Obstacles Towards Deploying Deep Learning Models on Mobile Devices

Hamid Tabani, Ajay Balasubramaniam, Elahe Arani, Bahram ZonoozarXiv 2021

Abstract

Deploying state-of-the-art deep learning models on mobile devices often presents a "square peg, round hole" problem due to hardware-software incompatibilities. This paper identifies core obstacles in model conversion and provides a practical four-step taxonomy for modifying architectures to ensure efficient execution on heterogeneous mobile System-on-Chips (SoCs).

Introduction: The Deployment Gap

While deep learning (DL) has revolutionized computer vision and autonomous driving, a significant "deployment gap" exists between research and production. Models trained on high-end GPU clusters using flexible frameworks like PyTorch or TensorFlow often fail when moved to mobile SoCs. These mobile chips integrate diverse units—multicore CPUs, mobile GPUs, Digital Signal Processors (DSPs), and specialized Neural Processing Units (NPUs)—each with varying levels of framework support.

A frustrating paradox emerges: frameworks supporting complex architectures often lack specific mobile hardware support, while hardware-optimized frameworks frequently do not support the latest layer types. This leads to deployment failures requiring manual intervention.

Framework and Hardware Landscape

The authors evaluated 11 major DL frameworks against their support for various hardware backends. As shown in Table 1, while ARM CPU support is nearly universal, support for specialized AI accelerators like NPUs or FPGAs is highly fragmented.

Table 1: Comparison of deep learning framework support across various hardware backends.

Frameworks like Apache TVM and Caffe demonstrate surprisingly broad hardware support, whereas more popular mobile-specific frameworks like TensorFlow Lite may impose overhead by forcing developers into specific development environments (e.g., Android Studio).

A Four-Tier Solution Taxonomy

To address "unsupported layers"—operations the target framework or hardware cannot recognize—the paper proposes four practical strategies:

  1. Baseline Modification: Replacing an unsupported layer with a mathematically equivalent supported one. For example, a Subtract layer can be replaced by an Add layer using negative constants.
  2. Architectural Redesign & Retraining: Replacing complex layers with a sequence of simpler, supported operations. A notable example is the replacement of ConvTranspose (deconvolution) with a sequence of Convolution, Reshape, and Transpose.
  3. Post-processing Offloading: Removing trailing layers from the model graph and executing them as standard code outside the DL framework.
  4. Custom Layer Implementation: Manually writing the kernel for the unsupported operation (high effort, high performance).
Figure 1: Examples of architectural redesign, including the conversion of ConvTranspose and complex post-processing blocks into supported operations.

Key Technical Insights

The "Deconvolution Workaround" is particularly impactful. Many mobile-optimized frameworks struggle with ConvTranspose. By decomposing it into standard convolution and reshapes, developers can achieve hardware compatibility with negligible accuracy loss after brief retraining. This transition is illustrated in the architectural redesign examples where complex operations are mapped to primitives supported by mobile backends.

Furthermore, the study highlights that interoperability remains a bottleneck. Even with standard formats like ONNX, the transition from training to deployment is rarely "plug-and-play."

Conclusion and Future Outlook

The primary obstacles to seamless mobile deployment are hardware fragmentation and vendor secrecy. Many vendors do not release low-level specifications for their NPUs, hindering open-source support. Future efforts should focus on automated conversion tools and transparent hardware documentation to bridge the gap between AI research and mobile reality.

Summary updated

BibTeX
@misc{tabani2021challenges,
  author = {Hamid Tabani and Ajay Balasubramaniam and Elahe Arani and Bahram Zonooz},
  title = {{Challenges and Obstacles Towards Deploying Deep Learning Models on Mobile Devices}},
  year = {2021},
  eprint = {2105.02613},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.02613},
}
Figure