Enhancing Android Malware Detection with Large Language Models

Thursday 27 March 2025


The rapid growth of mobile applications has led to an explosion in Android malware threats, making it increasingly challenging for researchers and developers to detect and classify malicious code effectively. Traditional detection methods often struggle with evolving attacks, dataset biases, and limited explainability, making it difficult to accurately identify and analyze malicious behavior.


To address these challenges, a team of researchers has proposed LAMD, a novel framework that leverages large language models (LLMs) to enable context-driven Android malware detection. LAMD’s approach integrates key context extraction to isolate security-critical code regions and construct program structures, followed by tier-wise code reasoning to analyze application behavior progressively.


The researchers’ evaluation dataset spans over a decade of benign and malicious APK samples, with samples from various sources such as Google Play, PlayDrone, VirusShare, and AppChina. The dataset includes labels based on VirusTotal analysis, which indicates the presence or absence of malware.


LAMD’s performance is impressive, outperforming traditional learning-based methods in detecting malicious code. The framework’s ability to reason about program logic using LLMs enables it to accurately identify malicious behavior, even when faced with complex and obfuscated code.


One of the key advantages of LAMD is its ability to handle dataset drift, which occurs when new samples are introduced that differ significantly from the training data. Traditional methods often struggle with this issue, leading to reduced performance on newer samples. In contrast, LAMD’s LLM-based approach enables it to adapt to changing patterns and behaviors in malware, ensuring continued effectiveness in detecting malicious code.


The researchers also propose a backward slicing algorithm, which can be used to extract relevant variables and units from the control flow graph of a function that invokes a suspicious API. This algorithm is particularly useful for analyzing complex code and identifying potential security vulnerabilities.


In addition to its technical contributions, LAMD’s approach has important implications for the field of malware detection. By leveraging LLMs, researchers can develop more effective and explainable methods for detecting malicious code, which is critical for improving the security and reliability of mobile applications.


Overall, LAMD represents a significant step forward in Android malware detection, offering a powerful framework that can be used to develop more accurate and effective methods for detecting malicious code. As the threat landscape continues to evolve, researchers and developers will need to adapt and innovate to stay ahead of malicious actors. LAMD’s approach provides a promising direction for future research in this area.


Cite this article: “Enhancing Android Malware Detection with Large Language Models”, The Science Archive, 2025.


Android Malware, Machine Learning, Language Models, Code Analysis, Mobile Security, Malicious Code Detection, Lamd, Backward Slicing, Control Flow Graph, Dataset Drift.


Reference: Xingzhi Qian, Xinran Zheng, Yiling He, Shuo Yang, Lorenzo Cavallaro, “LAMD: Context-driven Android Malware Detection and Classification with LLMs” (2025).


Leave a Reply