Adaptive Deep Representation Learning with Counterfactual Feature Attribution for Explainable Ransomware Detection in Class-Imbalanced Malware Environments
Keywords:
Ransomware Detection, TabNet, Adaptive Class-Sensitive Learning, Class-Imbalanced Learning, Explainable Artificial Intelligence.Abstract
The rapid evolution of ransomware has emerged as a critical cybersecurity challenge, demanding intelligent detection frameworks capable of accurately distinguishing malicious executables from benign software. Existing machine learning and deep learning approaches often exhibit degraded performance under class-imbalanced data, resulting in biased learning, increased false negatives, and limited model interpretability. To address these limitations, this study proposes an Adaptive Class-Sensitive Learning-enabled TabNet (ACSL–TabNet) framework that dynamically adjusts class weights during training while exploiting TabNet's sequential attention mechanism to learn highly discriminative representations from static Portable Executable (PE) header and behavioral features. The proposed model is implemented using Python 3.11 in the PyTorch framework with TabNet, Scikit-learn, and Captum libraries for explainability. Experiments were conducted on the Ransomware Dataset 2024 containing 21,752 executable samples from 26 malware families, including 10,876 ransomware and 10,876 benign files. The proposed framework achieved 98.8% accuracy, 98.84% recall, 98.78% F1-score, and 99.63% AUC, outperforming existing methods such as LGBM (91.0%), XGBoost (93.0%), Bi-LSTM with CNN (98.0%), and SB-BR-STM CNN (98.5%), yielding an accuracy improvement of 0.3% over the strongest baseline and 7.8% over conventional machine learning models. Furthermore, the integrated Counterfactual and Integrated Attribution-Based Explainability (CIAE) module provides both feature attribution and decision boundary explanations, enhancing the transparency and trustworthiness of ransomware predictions. The experimental results demonstrate that the proposed ACSL–TabNet framework offers a robust, adaptive, and interpretable solution for accurate ransomware detection in imbalanced cybersecurity environments.
Downloads
Downloads
Published
Issue
Section
License
You are free to:
- Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation .
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.

