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

Reading time: 6 minute
...
Featured Image

📝 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.

💡 Analysis

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.

📄 Content

딥러닝(DL)은 현재 모바일 환경에서 점점 더 많은 소프트웨어 애플리케이션에 적용되고 있으며, 이러한 추세는 앞으로도 지속적으로 확대될 것으로 예상됩니다. 이와 같은 소프트웨어 애플리케이션을 DL 기반 모바일 애플리케이션(줄여서 모바일 DL 앱이라고도 함)이라고 부르며, 모바일 DL 앱은 대규모 데이터셋을 이용해 학습된 딥러닝 모델을 모바일 기기에서 실행될 수 있도록 설계된 DL 프로그램과 결합한 형태를 말합니다. 여기서 DL 프로그램은 원하는 딥러닝 모델의 구조(예: 신경망의 레이어 구성, 활성화 함수, 파라미터 수 등)를 코드 형태로 정의하고, 정의된 구조에 따라 학습 데이터를 이용해 모델을 훈련시키는 전체 과정을 구현한 소프트웨어 요소를 의미합니다.

최근 모바일 애플리케이션이 제공하는 기능 중 상당 부분이 딥러닝 기술에 의존하게 되면서, 모바일 DL 앱을 위한 소프트웨어 엔지니어링(SE) 분야의 중요성이 크게 부각되고 있습니다. 기존의 소프트웨어 엔지니어링 연구 커뮤니티에서는 주로 딥러닝 모델 자체의 설계·구현에 초점을 맞추어 왔으며, 이러한 연구들은 주로 모델 아키텍처의 최적화, 학습 알고리즘의 개선, 그리고 모델이 포함된 프로그램(즉, DL 프로그램)에서 발생할 수 있는 다양한 결함을 체계적으로 분석하는 작업을 중심으로 진행되었습니다.

그에 반해, 모바일 기기 위에 딥러닝 모델을 실제로 배포(deploy)하는 과정에서 발생하는 결함, 즉 모바일 DL 앱의 배포 결함에 대해서는 아직까지 충분히 조명되지 않았습니다. 배포 결함은 모델이 학습된 환경과 모바일 환경 사이의 차이, 하드웨어 제약, 운영체제와의 호환성 문제, 메모리 및 전력 관리 이슈, 그리고 모델을 실행하기 위한 프레임워크(예: TensorFlow Lite, PyTorch Mobile 등)의 설정 오류 등 다양한 원인에 의해 발생할 수 있습니다. 이러한 배포 결함은 단순히 앱이 정상적으로 실행되지 못하게 하는 수준을 넘어, 특히 안전이 중요한 시나리오(예: 자율주행, 의료 진단, 산업 현장의 위험 감지 등) 에서 사용되는 경우에는 심각한 사회적·경제적 손실을 초래할 위험이 있습니다. 따라서 수십억 명에 이르는 최종 사용자가 매일 다양한 목적(엔터테인먼트, 생산성 향상, 교육, 건강 관리 등)으로 모바일 DL 앱을 활용하고 있다는 점을 고려하면, 배포 결함을 체계적으로 규명하고 효과적인 해결 방안을 제시하는 일은 매우 시급하고도 중요한 과제라 할 수 있습니다.

이러한 지식 격차를 메우고자 본 논문에서는 모바일 DL 앱의 배포 결함에 관한 최초이자 가장 포괄적인 연구를 수행하였습니다. 구체적으로, 소프트웨어 결함을 연구할 때 널리 활용되는 두 개의 대표적인 데이터 소스인 Stack OverflowGitHub를 대상으로, 실제 개발자들이 보고하고 논의한 304개의 실제 배포 결함 사례를 체계적으로 수집·분류하였습니다. 수집된 결함 사례는 각각의 결함이 나타나는 구체적인 증상(예: 앱이 강제 종료(crash)한다, 모델 로딩 시간이 비정상적으로 길다, 추론 결과가 기대와 다르다 등)과 원인(예: 모델 파일 포맷 오류, 라이브러리 버전 불일치, 하드웨어 가속 기능 미지원 등)에 따라 상세히 기록되었습니다.

이러한 데이터를 바탕으로 우리는 **미세한 수준의 분류 체계(taxonomy)**를 구축했으며, 이 체계는 총 23개의 카테고리로 구성되어 있습니다. 각 카테고리는 크게 **‘결함 증상’**과 ‘결함 원인’ 두 축을 기준으로 정의되었으며, 예를 들어 “모델 파일이 손상되어 로드되지 않는다”는 증상은 “파일 포맷 불일치”라는 원인 카테고리와 연결됩니다. 또한, 동일한 카테고리 내에 포함된 여러 사례들을 종합적으로 분석함으로써 각 결함 유형별 공통적인 해결 전략을 도출했습니다. 여기에는 코드 레벨에서의 수정(예: 파일 경로를 절대 경로로 변경, 모델 압축 옵션 재조정), 빌드 설정 변경(예: Gradle 설정에 NDK 버전 명시, ProGuard 규칙 추가), 프레임워크 업데이트(예: TensorFlow Lite 최신 버전 적용), 하드웨어 호환성 검증(예: GPU 가속 지원 여부 사전 체크) 등 실무에서 바로 적용 가능한 구체적인 방안들이 포함됩니다.

마지막으로, 본 연구는 실무자와 연구자 모두에게 유용한 시사점과 향후 연구 방향을 제시합니다. 실무적인 관점에서는, 배포 과정에서 발생할 수 있는 주요 위험 요소를 사전에 체크리스트 형태로 정리하여 개발 프로세스에 통합할 것을 권고하고, 자동화된 테스트 프레임워크를 활용해 배포 전후의 모델 성능 및 호환성을 검증하는 절차를 마련할 것을 제안합니다. 연구적인 관점에서는, 현재 수집된 304개의 결함이 아직 전체 모바일 DL 앱 생태계에서 차지하는 비중에 비해 제한적이므로, 다양한 플랫폼(iOS, Android 외에도 임베디드 시스템, 웨어러블 디바이스 등) 에서 발생하는 배포 결함을 확대 수집하고, 머신러닝 기반 결함 예측 모델을 구축하여 사전에 결함을 탐지·예방하는 방법을 탐구하는 것이 향후 중요한 연구 과제가 될 것입니다. 또한, 프레임워크 수준에서의 표준화된 배포 인터페이스를 정의하고, 모델 압축·양자화·프루닝 등 경량화 기법과 배포 환경 간의 상호작용을 정량적으로 분석하는 연구도 필요합니다.

요약하면, 본 논문은 모바일 DL 앱의 배포 과정에서 발생하는 결함을 최초로 체계적으로 조사·분류하고, 실용적인 해결 방안을 제시함으로써, 딥러닝 모델이 모바일 환경에 안전하고 효율적으로 정착할 수 있도록 돕는 중요한 초석을 마련했다고 할 수 있습니다. 이러한 연구 결과는 앞으로 모바일 딥러닝 기술이 더욱 폭넓게 확산되는 데 있어 필수적인 참고 자료가 될 것이며, 관련 분야 연구자와 개발자들이 보다 견고하고 신뢰성 높은 모바일 DL 앱을 설계·구현하는 데 큰 도움이 될 것입니다.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut