Abstract
Android malware continues to evolve, employing sophisticated camouflage and obfuscation techniques to evade detection. Traditional detection methods often struggle with the dynamic nature of these threats or the computational overhead of complex graph-based models. This paper introduces Hawk, a novel malware detection framework that leverages Heterogeneous Information Networks (HINs) and incremental learning. By modeling Android entities and their behavioral relationships through rich semantic meta-structures, Hawk achieves high-precision detection. Crucially, its incremental learning model, MSGAT++, enables rapid detection of out-of-sample applications in just 3.5 ms—50x faster than existing graph-based approaches—without requiring full network reconstruction.
Introduction
The Android ecosystem is a primary target for malicious actors, with thousands of new malware samples appearing daily. While machine learning has significantly advanced detection capabilities, many models rely on manual feature engineering or struggle to capture the complex, multi-faceted relationships between applications and system components. Graph Neural Networks (GNNs) have emerged as a powerful alternative, but they are typically transductive, meaning they cannot easily incorporate new data without expensive retraining. Hawk addresses this "out-of-sample" problem, providing a scalable and efficient solution for real-time malware detection.
Methodology
Heterogeneous Information Network (HIN) Modeling
Hawk represents the Android environment as an HIN, which allows for the representation of multiple node types (e.g., Apps, Permissions, APIs, Classes, Interfaces, and .so files) and their various interactions. To extract deeper meaning from this network, Hawk utilizes meta-structures—complex patterns like meta-paths and meta-graphs. These structures identify implicit relationships, such as two apps sharing a specific combination of rare APIs and background classes, which are often indicative of shared malicious lineage even if the code is obfuscated. The researchers found that meta-graphs, which are non-linear, capture tighter semantic affinities than simple linear meta-paths.
Dual-Stage Learning: MSGAT and MSGAT++
The framework employs a two-pronged approach to learning:
- MSGAT (Meta-structure Guided Graph Attention Network): This model is used for the initial "in-sample" training. It uses an attention mechanism to learn the relative importance of different neighbors and semantic relationships within the HIN.
- MSGAT++ (Incremental Learning): This is the core innovation for handling new, unseen applications. Instead of retraining the entire HIN when a new app is introduced, MSGAT++ identifies the most similar existing apps in the embedding space. It then aggregates their embeddings to instantly generate a representation for the new app. This inductive capability allows for near-instantaneous classification.
Experimental Evaluation
The researchers evaluated Hawk using a dataset of 181,235 Android applications (80,860 malicious and 100,375 benign) collected over a seven-year period (2013–2019).
Performance and Efficiency
- Detection Speed: Hawk achieves an average detection time of 3.5 ms per application.
- Training Speedup: The incremental learning approach is 50 times faster than rebuilding the entire HIN for new samples.
- Accuracy: Hawk consistently outperformed baseline models (including Drebin, HinDroid, and standard GCNs), maintaining an F1 score and accuracy of approximately 0.98 on in-sample data and showing strong performance across different years of out-of-sample data.
- Resource Usage: The model is highly efficient, requiring only ~330MB of memory, a significant reduction compared to the 20GB+ required by some graph-rebuilding baselines.
Discussion and Future Work
Hawk demonstrates that high-order semantic relationships are difficult for malware developers to hide, even with advanced obfuscation. However, some limitations remain. Malware with very few entities (minimalist code) can sometimes blend in with benign applications, leading to false negatives. Additionally, while MSGAT++ handles new apps, the base model eventually requires retraining to account for "concept drift" as the Android OS itself evolves. Future research will focus on label-aware similarity measures and developing lightweight versions of the model for on-device deployment.
Conclusion
Hawk represents a significant step forward in Android security. By combining the representational power of HINs with the efficiency of incremental graph attention networks, it provides a high-speed, high-accuracy defense mechanism capable of keeping pace with the rapid evolution of mobile malware.
Summary updated