[Paper Review] I-MAD: A Novel Interpretable Malware Detector Using Hierarchical Transformer.
I-MAD is a novel interpretable malware detector that uses a hierarchical Transformer to analyze assembly code at the basic block, function, and executable levels, achieving state-of-the-art performance in static malware detection while providing feature-level interpretations through a novel feed-forward neural network. It overcomes limitations of prior methods by modeling full semantic meaning and delivering transparent, actionable explanations.
Malware imposes tremendous threats to computer users nowadays. Since signature-based malware detection methods are neither effective nor efficient to identify new malware, many machine learning-based methods have been proposed. A common disadvantage of existing machine learning methods is that they are not based on understanding the full semantic meaning of assembly code of an executable. They rather use short assembly code fragments, because assembly code is usually too long to be modelled in its entirety. Another disadvantage is that those methods have either inferior performance or bad interpretability. To overcome these challenges, we propose an Interpretable MAware Detector (I-MAD), which achieves state-of-the-art performance on static malware detection with excellent interpretability. It integrates a hierarchical Transformer network that can understand assembly code at the basic block, function, and executable level. It also integrates our novel interpretable feed-forward neural network to provide interpretations for its detection results by pointing out the impact of each feature with respect to the prediction. Experiment results show that our model significantly outperforms previous state-of-the-art static malware detection models and presents meaningful interpretations.
Motivation & Objective
- To address the poor interpretability and limited semantic understanding in existing machine learning-based malware detection methods.
- To overcome the reliance on short assembly fragments by modeling full assembly code at multiple abstraction levels.
- To develop a detection model that achieves high performance while providing meaningful, feature-level explanations for predictions.
- To integrate hierarchical representation learning with interpretable deep learning for improved trust and usability in malware analysis.
Proposed method
- I-MAD employs a hierarchical Transformer architecture to encode assembly code at three levels: basic blocks, functions, and entire executables.
- It uses multi-head self-attention mechanisms to capture long-range dependencies and semantic relationships across assembly instructions.
- A novel interpretable feed-forward neural network is integrated to quantify the contribution of each input feature to the final prediction.
- The model processes raw disassembled code through a hierarchical encoding pipeline, aggregating representations from lower to higher levels.
- Interpretability is achieved by attributing prediction scores to individual features, enabling identification of malicious code patterns.
- The framework is trained end-to-end on static malware datasets using cross-entropy loss with attention-based supervision.
Experimental results
Research questions
- RQ1Can a hierarchical Transformer model effectively capture the semantic meaning of full assembly code in malware detection?
- RQ2How does the integration of an interpretable feed-forward network improve model transparency without sacrificing performance?
- RQ3To what extent does I-MAD outperform existing state-of-the-art static malware detectors in accuracy and robustness?
- RQ4Can the model provide meaningful, feature-level explanations that align with human analysts' understanding of malicious behavior?
Key findings
- I-MAD achieves state-of-the-art performance on static malware detection benchmarks, significantly outperforming previous SOTA models.
- The model demonstrates superior interpretability by identifying specific assembly features that contribute most to the prediction decision.
- The hierarchical attention mechanism enables better understanding of code semantics across basic blocks, functions, and entire executables.
- The integration of the interpretable feed-forward network provides consistent and meaningful attribution of feature importance.
- The model maintains high detection accuracy even when analyzing long and complex executable files.
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.