[Paper Review] A multi-task learning model for malware classification with useful file access pattern from API call sequence
This paper proposes a multi-task deep learning model that jointly performs malware classification and file access pattern (FAP) generation from raw API call sequences using a shared RNN-based autoencoder. The model leverages unsupervised representation learning and two decoders—one for classification and one for generating interpretable FAPs—achieving competitive classification accuracy (up to 99.9%) and high-quality FAP generation, enhancing model interpretability without manual feature engineering.
Based on API call sequences, semantic-aware and machine learning (ML) based malware classifiers can be built for malware detection or classification. Previous works concentrate on crafting and extracting various features from malware binaries, disassembled binaries or API calls via static or dynamic analysis and resorting to ML to build classifiers. However, they tend to involve too much feature engineering and fail to provide interpretability. We solve these two problems with the recent advances in deep learning: 1) RNN-based autoencoders (RNN-AEs) can automatically learn low-dimensional representation of a malware from its raw API call sequence. 2) Multiple decoders can be trained under different supervisions to give more information, other than the class or family label of a malware. Inspired by the works of document classification and automatic sentence summarization, each API call sequence can be regarded as a sentence. In this paper, we make the first attempt to build a multi-task malware learning model based on API call sequences. The model consists of two decoders, one for malware classification and one for $\emph{file access pattern}$ (FAP) generation given the API call sequence of a malware. We base our model on the general seq2seq framework. Experiments show that our model can give competitive classification results as well as insightful FAP information.
Motivation & Objective
- Address the lack of interpretability in traditional malware classifiers that only output family labels without explaining malicious behaviors.
- Overcome the limitations of manual feature engineering in existing malware detection systems by enabling end-to-end, automated representation learning from raw API call sequences.
- Improve model robustness and generalization by jointly training a malware classifier and a file access pattern (FAP) generator using a shared latent representation.
- Enable detection of zero-day malware and distinguish between similar malware families by generating behaviorally descriptive FAPs beyond predefined family labels.
Proposed method
- Employ a Recurrent Neural Network-based Autoencoder (RNN-AE) to learn low-dimensional, unsupervised representations of raw API call sequences.
- Design a multi-task seq2seq framework with two decoders: one for malware family classification and one for generating natural language descriptions of file access behaviors (FAPs).
- Train the model end-to-end using supervised signals for both classification and FAP generation, leveraging shared encoded representations from the RNN-AE.
- Construct FAP supervision by automatically extracting file access patterns from API call sequences using a heuristic rule-based method to generate training labels.
- Use sequence-to-sequence modeling to generate FAPs as text sequences, treating each API call sequence as a 'sentence' in a natural language-like format.
- Evaluate the model using fine-grained classification and FAP generation performance on a real-world malware dataset, comparing multiple variants of the architecture.
Experimental results
Research questions
- RQ1Can a shared representation learned from raw API call sequences effectively support both malware classification and interpretable file access pattern (FAP) generation?
- RQ2How does joint training of classification and FAP generation improve model interpretability compared to single-task models?
- RQ3To what extent can unsupervised representation learning via RNN-AE reduce the need for manual feature engineering in malware classification?
- RQ4Can FAPs generated by the model help distinguish between malware families with similar API call sequences, especially in cases of packing or obfuscation?
- RQ5How does the model perform on zero-day or previously unseen malware families when relying on FAPs rather than predefined labels?
Key findings
- The proposed multi-task model achieves a test classification accuracy of 99.2% and FAP generation accuracy of 99.3%, demonstrating strong performance on both tasks.
- The model’s unsupervised RNN-AE encoder learns robust, low-dimensional representations that generalize well across diverse malware families, even when API call sequences are highly similar.
- Fine-grained evaluation shows that FAPs can effectively narrow down the true family of a malware, such as identifying net-worm.win32.allaple and adware.win32.megasearch with high precision.
- The model successfully generates meaningful and interpretable FAPs that describe file system behaviors, such as creating or modifying specific files, providing actionable insights beyond family labels.
- The model outperforms single-task baselines in both classification and FAP generation, confirming the benefit of multi-task learning in malware analysis.
- Visualization of latent representations confirms that malware samples from the same family cluster together, while different families are well-separated, validating the quality of the learned embeddings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.