A First Look at Deep Learning Apps on Smartphones

Mengwei Xu, Jiawei Liu, Yuanqiang Liu, Felix Xiaozhu Lin, Yunxin Liu, Xuanzhe Liu

Abstract

We are in the dawn of deep learning explosion for smartphones. To bridge the gap between research and practice, we present the first empirical study on 16,500 the most popular Android apps, demystifying how smartphone apps exploit deep learning in the wild. To this end, we build a new static tool that dissects apps and analyzes their deep learning functions. Our study answers threefold questions: what are the early adopter apps of deep learning, what do they use deep learning for, and how do their deep learning models look like. Our study has strong implications for app developers, smartphone vendors, and deep learning R&D. On one hand, our findings paint a promising picture of deep learning for smartphones, showing the prosperity of mobile deep learning frameworks as well as the prosperity of apps building their cores atop deep learning. On the other hand, our findings urge optimizations on deep learning models deployed on smartphones, the protection of these models, and validation of research ideas on these models.

Introduction

Deep learning (DL) has revolutionized artificial intelligence, yet a significant "knowledge gap" persists between academic research and real-world mobile deployment. While research often focuses on massive models or cloud-offloading strategies, the practical landscape of on-device DL remains largely unmapped. This study presents the first large-scale empirical analysis of 16,500 popular Android apps to demystify how DL is exploited in the wild.

Methodology

To analyze thousands of apps without manual intervention, we developed a semi-automatic toolchain consisting of two primary modules: the DL Sniffer and the Model Extractor.

The toolchain architecture featuring the DL Sniffer for identification and Model Extractor for architectural analysis.

As illustrated in the methodology diagram, the DL Sniffer performs static analysis to identify DL usage by searching for signatures of 16 popular frameworks (e.g., TensorFlow, Caffe2, ncnn) within native libraries and Java code. It also detects custom engines by searching for common DL-related strings like "convolution" or "lstm." The Model Extractor then locates and validates model files, employing reverse engineering for obfuscated assets.

Our dataset comprises two snapshots of the Google Play Store (June and September 2018), each containing 16,500 top free apps across 33 categories. From these, we identified 211 DL-enabled apps and successfully extracted 176 models for deep architectural analysis.

Empirical Findings

DL as an "Elite" Phenomenon

Although only 1.3% of the studied apps utilized DL, these apps are disproportionately successful. As shown in the comparative analysis below, DL apps account for over 10% of total downloads and reviews compared to their non-DL counterparts. Adoption is currently driven by industry leaders like Google, Facebook, and Adobe.

Comparison of DL and non-DL apps across downloads, reviews, ratings, and app size.

The "Tiny Model" Reality vs. Academic Optimization

A striking finding is the discrepancy between research and practice regarding model size. While researchers optimize models like MobileNet (~54MB), real-world mobile models are significantly smaller, with a median size of just 2.47 MB. These models prioritize extreme efficiency, often executing in under 15ms. Furthermore, despite extensive research into quantization and sparsity, only 6% of models in the wild utilized these optimizations.

Use Cases and Frameworks

Image processing dominates the mobile DL landscape, with "photo beauty" and face detection appearing in nearly half of all DL-enabled apps. In 81% of cases, DL provides core functionality. Regarding frameworks, TensorFlow and TFLite lead in popularity, though lightweight frameworks like Tencent’s ncnn are growing due to their minimal binary footprint. Adding a DL framework increases an app's size by an average of 7.5 MB, nearly six times the size of a standard non-DL library.

Discussion and Conclusion

The study reveals a critical lack of security; 81% of models are stored as plaintext, making proprietary IP vulnerable to theft. Additionally, the rapid 27.1% growth in DL adoption over just three months highlights the urgency for better optimization and protection tools.

While limited to the Android ecosystem and static analysis, this work serves as a wake-up call. The "wild" mobile environment is not just a smaller version of the cloud; it is a unique ecosystem requiring specialized tools for the tiny, efficient, and often unprotected models that power the apps in our pockets.

Summary updated

BibTeX
@inproceedings{xu2018first,
  author = {Mengwei Xu and Jiawei Liu and Yuanqiang Liu and Felix Xiaozhu Lin and Yunxin Liu and Xuanzhe Liu},
  title = {{A First Look at Deep Learning Apps on Smartphones}},
  booktitle = {The Web Conference},
  year = {2018},
  url = {https://openreview.net/forum?id=B1ZrnbbuWH},
}
Figure