SeqMobile: A Sequence Based Efficient Android Malware Detection System Using RNN on Mobile Devices

Ruitao Feng, Jing Qiang Lim, Sen Chen, Shang-Wei Lin, Yang Liu

Abstract

Android malware detection traditionally relies on cloud-based deep learning or simple on-device syntax checks. SeqMobile introduces an efficient on-device system using Recurrent Neural Networks (RNNs) to analyze app behavior sequences. By implementing repetitive element removal and native code execution, SeqMobile achieves 97.85% accuracy with a detection latency of less than five seconds on mid-range devices, effectively capturing behavioral semantics without excessive resource consumption.

Introduction

The proliferation of Android malware necessitates robust detection systems. While cloud-based solutions offer high accuracy, they raise privacy concerns and require constant connectivity. Conversely, existing on-device solutions often rely on syntax features—simple counts of permissions or API calls—which lack the semantic context necessary to distinguish between benign and malicious intent. Sequence-based features capture this context but are typically too computationally intensive for mobile hardware. SeqMobile addresses this gap by optimizing sequence-based RNN models for on-device deployment.

Methods

The SeqMobile pipeline consists of feature extraction, optimization, and classification.

System architecture of SeqMobile showing the transition from feature preparation to on-device deployment.

The system extracts four feature types: Permissions, Intent filters, API call sequences, and Intent sequences. A critical innovation is Repetitive Element Removal, which strips redundant API calls in loops, reducing average sequence length by 57% without losing behavioral signatures. The classification uses a Bidirectional Long Short-Term Memory (Bi-LSTM) network with an embedding layer and global max-pooling. To enhance performance, the feature extraction module is implemented in C++ via the Java Native Interface (JNI). Furthermore, the authors utilized dynamic RNNs instead of standard quantization to maintain speed across variable-length sequences.

Results

The system was evaluated on a dataset of 44,980 applications (22,490 benign and 22,490 malicious). SeqMobile achieved a peak accuracy of 97.85%. The repetitive removal method significantly improved performance, doubling training and prediction speeds.

On-device latency for feature extraction and classification across various Samsung and HTC devices for different APK sizes.

On-device testing demonstrated that total detection time remains under five seconds for most apps, even on mid-range hardware. On flagship devices like the Samsung S10+, prediction for a 600-element sequence took approximately 0.365 seconds. Native code implementation provided a performance gain of roughly 21% on high-end devices.

Conclusion

SeqMobile demonstrates that sequence-based deep learning can be efficiently deployed on-device for Android malware detection. While it carries a slightly higher computational cost than syntax-based methods and is susceptible to advanced obfuscation, its high accuracy and low latency make it a viable solution for real-time protection. Future work will explore hybrid models combining static sequence analysis with lightweight dynamic analysis.

Summary updated

BibTeX
@inproceedings{feng2020seqmobile,
  author = {Ruitao Feng and Jing Qiang Lim and Sen Chen and Shang-Wei Lin and Yang Liu},
  title = {{SeqMobile: A Sequence Based Efficient Android Malware Detection System Using RNN on Mobile Devices}},
  booktitle = {ICECCS},
  year = {2020},
  doi = {10.1109/iceccs51672.2020.00015},
}
Figure