Enhancing Malware Family Classification Through Fully Fine‐Tuned Vision Transformers and Attention Map Interpretability
Fahd A. Alqasemi, Mohammed Hameed, Belal Al-Fuhaidi, Malak Korami, Adham Waleed, Abdulahakim-Al Wahabi
Key points
From the paper's conclusion- These findings demonstrate that while CNNs achieve competitive accuracy, vision transformers provide valuable complementary capabilities through explainable AI, paving the way toward more transparent and interpretable cybersecurity solutions.
Abstract
Malware has become increasingly complex and threatening over time, posing many risks to individuals and society at large. Hence, it becomes crucial to come up with efficient malware family classification techniques. However, since malware has been evolving in its obfuscation and polymorphism, traditional classification techniques are ineffective. One way to handle the challenges above is by developing an image‐based malware classification method that employs deep learning. Using previous research results obtained from ResNet‐50, this paper evaluates a fully fine‐tuned vision transformer for the purpose of malware family classification based on the RGB images of a PE file. Instead of CNN models used in traditional image‐based malware classification, this study exploits transformers because of their capacity to capture long dependencies as well as salient structural information from malware images through a self‐attention mechanism. This transformer model was trained on the Blended Malware Image dataset that contains 31 malware families with thorough preprocessing and data augmentation steps in order to avoid overfitting. Experimental results from a comprehensive comparative study demonstrate that the proposed ViT‐B/16 model achieves competitive classification accuracy, with a mean of 96.59% ± 0.32% across 3 independent runs with different random seeds, demonstrating high statistical reliability. The model achieved a peak performance of 97.13% in its best‐performing configuration. Compared to state‐of‐the‐art CNN architectures trained under identical conditions—including ResNet‐50 (97.20% ± 0.08%), EfficientNet‐B0 (97.37% ± 0.07%), DenseNet‐121 (97.62% ± 0.23%), and MobileNetV2 (97.18% ± 0.13%)—modern CNNs demonstrate marginally higher accuracy under identical training protocols. However, the vision transformer offers unique advantages through inherent interpretability via attention mechanisms. Attention map visualizations reveal discriminative saliency areas that contribute most to classification decisions, providing security analysts with transparent insights into the model’s decision‐making process. These findings demonstrate that while CNNs achieve competitive accuracy, vision transformers provide valuable complementary capabilities through explainable AI, paving the way toward more transparent and interpretable cybersecurity solutions.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Malformer: A Multi-Modal Malware Detector Using TransformersarXiv · 2026
- An Explainable Attention-Enhanced Deep Learning Model for Memory-Forensic Malware Detection.Sensors (Basel, Switzerland) · 2026
- Visualization based malware classification under extreme class imbalance: a transfer learning approach with systematic ablationScientific Reports · 2026
- ByteScope: Detection-Aware Learning for Robust Visual Malware Recognition Under Leakage-Audited, Open-World EvaluationMachine Learning and Knowledge Extraction · 2026
- Phantomware: a Data Augmentation Framework for the Detection of Emerging Malware CampaignsarXiv · 2026
- Deep learning-based android malware detection under realistic evaluation constraints: an architecture-centric review and reliability-aware empirical validation.Frontiers in artificial intelligence · 2026