Abstract:Deep Learning (DL) is finding its way into a growing number of mobile software applications. These software applications, named as DL based mobile applications (abbreviated as mobile DL apps) integrate DL models trained using large-scale data with DL programs. A DL program encodes the structure of a desirable DL model and the process by which the model is trained using training data. Due to the increasing dependency of current mobile apps on DL, software engineering (SE) for mobile DL apps has become important. However, existing efforts in SE research community mainly focus on the development of DL models and extensively analyze faults in DL programs. In contrast, faults related to the deployment of DL models on mobile devices (named as deployment faults of mobile DL apps) have not been well studied. Since mobile DL apps have been used by billions of end users daily for various purposes including for safety-critical scenarios, characterizing their deployment faults is of enormous importance. To fill the knowledge gap, this paper presents the first comprehensive study on the deployment faults of mobile DL apps. We identify 304 real deployment faults from Stack Overflow and GitHub, two commonly used data sources for studying software faults. Based on the identified faults, we construct a fine-granularity taxonomy consisting of 23 categories regarding to fault symptoms and distill common fix strategies for different fault types. Furthermore, we suggest actionable implications and research avenues that could further facilitate the deployment of DL models on mobile devices.
Abstract:Deep learning (DL) is a game-changing technique in mobile scenarios, as already proven by the academic community. However, no prior literature has studied the adoption of DL in the mobile wild. To fill such gap, in this work, we carry out the first empirical study to demystify how DL is utilized in mobile apps. Based on static analysis technique, we first build a framework that can help accurately identify the apps with DL embedded and extract the DL models from those apps. We then perform comprehensive and in-depth analysis into those apps and models, and make interesting and valuable findings out of the analysis results. As one of the key observations, we find that DL is becoming increasingly popular on mobile apps, and the roles played by DL are mostly critical rather than dispensable. On the other side, however, the potential of DL is far from being fully utilized, as we observe that most in-the-wild DL models are quite lightweight and not well optimized. Our work also provides useful implications for researchers and developers on the related fields.