An Empirical Study on Deployment Faults of Deep Learning Based Mobile Applications

Zhenpeng Chen, Huihan Yao, Yiling Lou, Yanbin Cao, Yuanqiang Liu, Haoyu Wang, Xuanzhe Liu

Introduction

While deep learning (DL) models might perform perfectly on high-powered servers, transitioning them to mobile environments presents a significant "last-mile" challenge. Mobile devices are constrained by limited memory, battery life, and specialized hardware like GPUs or NPUs. Consequently, developers must utilize frameworks such as TensorFlow Lite (TF Lite) or Core ML to convert, compress, and integrate models. This complex process introduces "deployment faults"—bugs that emerge only when the model is moved to the mobile environment.

The pipeline of developing and deploying DL models to mobile devices.

Methodology

To understand these issues, researchers conducted a large-scale empirical study by mining data from Stack Overflow and GitHub. They filtered thousands of posts to identify 287 high-quality discussions containing confirmed faults and solutions. Through a manual "open coding" process, they analyzed 304 real-world deployment faults to identify symptoms and fix strategies, ultimately constructing a comprehensive taxonomy of 23 symptom categories.

A Taxonomy of Deployment Faults

The study categorized faults across five stages of the deployment pipeline: Model Conversion, DL Integration, Data Preparation, Inference, and Model Update.

Hierarchical taxonomy of 304 real-world deployment faults across five stages.

The Conversion Bottleneck

A primary finding is that 48.4% of all faults occur during the model conversion stage. The most frequent issue is "Unsupported Operations," where a model utilizes mathematical operations not yet implemented by the mobile framework. Interestingly, over 30% of these conversion faults are resolved simply by adjusting the DL framework version, highlighting a state of "version hell" in the maturing mobile AI ecosystem.

Silent Failures and Inference Issues

Inference-stage faults account for 36.2% of the dataset. A critical concern is the prevalence of "Unexpected Results" (35.5% of inference faults), which are essentially "silent failures." In these cases, the application runs without crashing, but the model produces incorrect or degraded results. This is often a side effect of quantization—the process of reducing weight precision to save space—which can unpredictably impact accuracy.

Fix Strategies and Implications

The study reveals that fixing framework installations or versions is the most common solution for conversion issues (30.6%). For inference problems, adjusting data pre-processing (23.6%) is vital to ensure that mobile-side data (e.g., camera images processed in Java/Swift) matches the training-side preprocessing (e.g., NumPy in Python).

Conclusion

This research highlights the fragility of the mobile DL deployment pipeline. The high frequency of conversion errors and silent inference failures suggests a pressing need for the software engineering community to develop automated tools for fault detection and model repair. As mobile AI continues to grow, bridging the gap between server-side development and mobile-side deployment remains a critical frontier.

Summary updated

BibTeX
@inproceedings{chen2021empirical,
  author = {Zhenpeng Chen and Huihan Yao and Yiling Lou and Yanbin Cao and Yuanqiang Liu and Haoyu Wang and Xuanzhe Liu},
  title = {{An Empirical Study on Deployment Faults of Deep Learning Based Mobile Applications}},
  booktitle = {ICSE},
  year = {2021},
  url = {https://openreview.net/forum?id=fnIFkUNtjH},
}
Figure