Android Malware Detection Based on Factorization Machine

Chenglin Li, Keith G. Mills, Di Niu, Rui Zhu, Hongwen Zhang, Husam Kinawi

Introduction

The Android operating system dominates the global mobile market, accounting for approximately 75% of all devices. This ubiquity has made it a primary target for malware developers. Traditional detection methods rely on digital signatures, which are easily bypassed by code mutations and obfuscation. While machine learning (ML) offers a more robust alternative by identifying behavioral patterns, it faces significant challenges with high-dimensional, sparse data.

When representing an application's features—such as permissions, hardware access, and API calls—using one-hot encoding, the resulting vectors are extremely long but mostly empty. Standard linear models like Support Vector Machines (SVMs) often fail to capture critical "feature crossings" (e.g., the combination of GPS access and SMS permissions), while complex neural networks like Multi-Layer Perceptrons (MLPs) are computationally expensive and slow to converge on such sparse datasets.

Proposed Methodology

To address these challenges, we propose a detection system based on Static Analysis and Factorization Machines (FM). The pipeline consists of several stages: unpacking, feature extraction, encoding, and classification.

System architecture for Android malware detection

Static Analysis and Feature Extraction

The system decompiles APK files into Smali code to extract seven distinct feature types, including app components, hardware requirements, and suspicious API calls. These features are then converted into a binary vector. In large datasets like the Android Malware Dataset (AMD), this results in a feature space exceeding 290,000 dimensions.

Factorization Machines (FM)

The core innovation lies in the use of Factorization Machines. Unlike traditional models that attempt to learn a weight for every possible pair of features—a process with $O(n^2)$ complexity—FMs model feature interactions as the inner product of low-dimensional latent vectors. This reduces the parameter space to $O(nk)$, where $k$ is the number of latent factors. This approach allows the model to estimate interactions even for feature pairs that have never appeared together in the training set, making it uniquely suited for sparse data.

Experimental Evaluation

The model was evaluated using two benchmark datasets:

  • DREBIN: 5,560 malware samples from 179 families.
  • AMD (Android Malware Dataset): 24,553 samples across 135 varieties.
  • Clean Samples: Approximately 16,000 benign apps verified against 78 commercial antivirus engines via VirusTotal.

Results and Discussion

The FM model demonstrated exceptional performance across all metrics. On the DREBIN dataset, it achieved 100.00% precision with a 0.00% false positive rate. On the larger AMD dataset, precision remained high at 99.22%.

t-SNE visualization of feature representations

As shown in the t-SNE visualization above, the features extracted and processed by the FM model provide a clear separation between malicious and clean applications. This separability is the foundation of the model's high accuracy.

Beyond accuracy, the FM model offers a massive computational advantage. It trained 15 times faster than an MLP on the DREBIN dataset and 50 times faster on the AMD dataset. Furthermore, its detection capabilities were found to be competitive with leading commercial antivirus solutions from McAfee, Symantec, and Kaspersky.

Conclusion

Factorization Machines provide a powerful solution for Android malware detection by efficiently modeling feature interactions in high-dimensional sparse data. By matching the accuracy of deep learning models while offering up to a 50x speedup in training, this approach presents a scalable and effective tool for mobile security. Future work will focus on addressing code obfuscation techniques and streamlining the initial APK unpacking process to further reduce latency.

Summary updated

BibTeX
@article{li2019android,
  author = {Chenglin Li and Keith G. Mills and Di Niu and Rui Zhu and Hongwen Zhang and Husam Kinawi},
  title = {{Android Malware Detection Based on Factorization Machine}},
  journal = {IEEE Access},
  year = {2019},
  doi = {10.1109/access.2019.2958927},
}
Figure