A multi-label visualisation approach for malware behaviour analysis

Dilara T. Uysal, Paul D. Yoo, Kamal Taha, Chan Yeob Yeun, Ernesto DamianiScientific 2025

Abstract

Modern malware evolves continuously, posing persistent challenges to cybersecurity. Conventional classification approaches typically group malware by its primary objective, emphasising dominant behaviours while overlooking the complex and overlapping strategies common in real-world attacks. Here we present DECODE (DEep Classification Of Dynamic Exploits), a proportional multi-label, context-aware framework that combines object detection, explainable artificial intelligence (XAI), and agent-based large language models (LLMs) to deliver interpretable and comprehensive malware analysis. DECODE introduces the first object detection dataset specifically for malware classification, generated through an automated annotation pipeline that removes the need for manual labelling and remains effective even for visually indistinguishable malware features. To improve attribution reliability, we extend Gradient-weighted Class Activation Mapping (Grad-CAM) with a Bayesian formulation, enabling uncertainty-aware visualisation of discriminative regions linked to multiple categories. The regions identified through object detection are subsequently mapped to their corresponding API call sequences and interpreted via a multi-agent reasoning module, which incorporates critique-and-verification loops to reduce hallucinations and bias. Experimental evaluation shows multi-label and binary classification accuracies of 0.8513 and 0.9380, respectively, outperforming conventional deep learning baselines. By combining visual localisation, proportional multi-label scoring, and human-readable behavioural narratives, DECODE enables malware to be classified not only by intended impact but also by fine-grained structural and behavioural traits, offering a richer understanding of complex threats.

Introduction

Traditional malware classification often operates on a "winner-take-all" basis, where a file is assigned a single label such as "Ransomware" or "Spyware." However, this oversimplification fails to capture the complexity of modern threats like WannaCrypt, which exhibits both file encryption (ransomware) and self-propagation (worm) capabilities. Furthermore, deep learning models used for detection are frequently "black boxes," providing little insight into why a specific file was flagged.

DECODE (DEep Classification Of Dynamic Exploits) addresses these challenges by treating malware analysis as an object detection problem. By converting malware behaviours into images and utilizing a novel Bayesian-extended explainable AI (XAI) alongside a multi-agent LLM pipeline, DECODE identifies overlapping malicious traits and provides human-readable, verified behavioural narratives.

The DECODE Framework

The DECODE framework utilizes a multi-stage pipeline to transform raw dynamic analysis data into interpretable insights. The process begins with Visual Representation, where dynamic API call sequences (covering network, file system, process, and registry interactions) are converted into 128x128 images.

To ensure the reliability of the visual features, the researchers developed Bayesian Grad-CAM. By extending standard Gradient-weighted Class Activation Mapping with a Bayesian formulation using Monte Carlo dropout, the model accounts for uncertainty. This produces stable heatmaps of "discriminative regions"—the specific parts of the code that exhibit malicious patterns—while filtering out irrelevant background noise.

The DECODE automated pipeline for object detection dataset generation, from raw feature extraction to Bayesian Grad-CAM localization.

Following localization, an EfficientDet model is trained to identify and bound these behavioural features. Finally, a Multi-Agent LLM Reasoning system interprets the results. This system employs four specialized agents—Reviewer, Adversarial, Consensus, and Verifier—to synthesize a balanced explanation and check it against the MITRE ATT&CK framework, significantly reducing the risk of model hallucinations.

Dataset and Methodology

This study introduces the first object detection dataset specifically designed for malware classification. The dataset comprises approximately 8,000 samples (1,000 per category) sourced from MalwareBazaar, VirusShare, and VirusTotal. These samples cover eight categories: Adware, Benign, Downloader, Dropper, Ransomware, Spyware, Virus, and Worm. The resulting images are converted to the COCO format, a standard for object detection, featuring 75 distinct feature classes.

Key Insights: Malware "DNA" and Proportional Scoring

A central finding of the DECODE project is that malware families possess distinct, repeatable "textures" or visual "DNA." Even when these patterns are visually indistinguishable to the human eye, object detection models can identify them with high precision.

Unlike traditional systems, DECODE provides Proportional Scoring. Instead of a single label, it offers a percentage breakdown (e.g., 48% Spyware, 16% Ransomware), reflecting the hybrid nature of modern "Franken-malware." This approach allows analysts to see the full spectrum of a file's capabilities.

Mapping detected visual 'DNA' regions to proportional multi-label scores and specific API call sequences.

Results and Performance

DECODE demonstrates superior performance compared to standard deep learning baselines:

  • Binary Accuracy: The framework achieved 93.80% accuracy in distinguishing malware from benign files, outperforming models like ResNet and Inception.
  • Multi-Label Accuracy: It reached 85.13% accuracy in identifying specific malware types, with a significantly lower Hamming Loss than traditional models.
  • Localization Quality: Qualitative analysis showed that Bayesian Grad-CAM aligned more closely with ground-truth malicious regions than standard Grad-CAM implementations.

Conclusion and Future Directions

DECODE represents a significant advancement in making malware analysis both comprehensive and interpretable. Future work will focus on "continual learning" to keep pace with rapidly evolving malware and incorporating deeper contextual data, such as specific API arguments and parent-child process relationships, to further refine the generated behavioural narratives.

Summary updated

BibTeX
@inproceedings{uysal2025multi,
  author = {Dilara T. Uysal and Paul D. Yoo and Kamal Taha and Chan Yeob Yeun and Ernesto Damiani},
  title = {{A multi-label visualisation approach for malware behaviour analysis}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-21848-z},
}
Figure