TL-RL-FusionNet: Reinforcement Learning-Guided Residual MLP with Fused CNN Embeddings for Efficient and Adaptive Ransomware Detection
Abstract
1. Introduction
- We propose TL-RL-FusionNet, in which training samples are adaptively reweighted by a tabular Q-learning agent acting as a per-sample bandit over five discrete weight actions: {0.25, 0.50, 1.00, 1.25, 1.50}. The Q-table is reset independently every cross-validation fold and updated only from that fold’s own training-partition predictions, so the held-out fold never contributes to reward computation or Q-table updates, preventing cross-fold information leakage while still mitigating overfitting and improving accuracy over static training.
- We pair two frozen pretrained CNN backbones (EfficientNetB0, InceptionV3) with a lightweight residual MLP classifier. Freezing the CNNs avoids backpropagation through millions of parameters and lets embeddings be pre-computed once and reused, while the MLP’s small parameter count keeps training and memory costs low without sacrificing accuracy.
- We benchmark the proposed residual MLP and six baseline classifiers—RF, XGBoost, SVM, LR, ANN, and CNN—under both RL-guided and non-RL configurations, providing a fair assessment of adaptive sample weighting across traditional machine learning, ensemble learning, and deep learning classifiers. We further validate TL-RL-FusionNet on the public EldeRan benchmark using both the full 30,967-feature representation and the Mutual Information-selected top-100 subset, demonstrating its applicability beyond Dataset 1.
- We statistically validate the RL-guided improvement by reporting paired Wilcoxon signed-rank tests on Dataset 1 and EldeRan MI-100 rather than relying on point estimates alone.
- We provide a complete computational efficiency evaluation, including end-to-end runtime and RAM profiling. We also assess interpretability and representation-level robustness through Grad-CAM-to-behavioral-feature mapping and grid-order sensitivity analysis using five randomly permuted 10 × 10 feature-grid arrangements, as reported in Section 4.4.5 and Section 4.4.6.
2. Related Works
2.1. Traditional Machine Learning and Deep Learning for Ransomware Detection
2.2. Transfer Learning and Multi-CNN Feature Fusion
2.3. Reinforcement Learning for Adaptive Ransomware Detection
3. Methodology
3.1. Dataset Description
3.1.1. Dataset Overview
3.1.2. Sample Collection and Selection Criteria
- Verification across at least two independent reports from reputable cybersecurity vendors.
- At least 45 antivirus engines on VirusTotal classified these files as malicious.
- At least 15 antivirus engines specifically labelled the files as ransomware.
- The majority of engines, or at least ten, identified the file as belonging to the same ransomware family.
3.1.3. Sample Execution and Feature Extraction
3.1.4. Data Preprocessing
3.2. Conversion of Structured Features into Image
3.3. Transfer Learning for Feature Fusion from Image Data
3.4. Reinforcement Learning-Based Sample Weighting
3.4.1. Fold-Local Bandit-Style Sample Weighting Formulation
- Environment: The residual MLP training process within the current cross-validation fold.
- State: A training sample index represented by a row in the Q-table.
- Action: A discrete weight multiplier selected from {0.25, 0.50, 1.00, 1.25, 1.50}.
- Reward: if the sample is correctly classified by the fold-local probe model and otherwise.
- Policy update: The Q-values are updated using only the training samples from the current fold. The held-out test fold is excluded from all reward computations and Q-table updates.
3.4.2. Integration into the Model Training Pipeline
| Algorithm 1. Corrected Fold-Local Bandit-Style Sample Weighting |
| Input: |
| Training partition for fold f; held-out partition ; labels y; action set |
| A = {0.25, 0.50, 1.00, 1.25, 1.50}. |
| learning rate α, discount factor γ, and exploration rate ε. |
| Output: |
| Fold-local sample weights , trained residual MLP for fold f. |
| 1. Initialize a new fold-local Q-table with all values set to zero. |
| 2. For each training sample , select an action index using an ε-greedy policy. |
| 3. Assign the preliminary sample weight = A[]. |
| 4. Train a probe residual MLP on using the preliminary weights. |
| 5. Predict the labels of the same fold-local training samples using the probe model. |
| 6. Compute the reward: |
| . |
| 7. Update using the observed reward. |
| 8. Reassign final fold-local training weights using the updated . |
| 9. Train a fresh residual MLP on using the final weights. |
| 10. Evaluate the final model once on the held-out fold . |
| 11. Discard before proceeding to the next fold. |
| Note: The held-out fold is not used in Steps 1–9. It is used only in Step 10 for the final performance estimation. No Q-values, rewards, selected actions, sample weights or prediction outcomes were transferred across the folds. |
3.5. Classifiers Used in This Study
3.5.1. Residual MLP Model Development (Proposed)
- Residual MLP Forward Computation and Training Objective
| Algorithm 2. Residual MLP Classifier |
| Input: Fused CNN embedding |
| Output: Softmax probability vector |
|
|
| For each residual block k = 1,2: |
|
|
| The residual MLP was trained using Adam with cosine annealing, categorical cross-entropy with label smoothing of 0.1, a batch size of 32, and 25 epochs under stratified five-fold cross-validation. |
3.5.2. Baseline Models
4. Experiment and Results
4.1. Experimental Setup
4.2. Evaluation Metrics
4.3. Dataset Splitting and Evaluation Strategy
4.4. Dataset 1 Results: Primary Benchmark
4.4.1. Predictive Performance with and Without RL
4.4.2. Statistical Significance Analysis
4.4.3. Confusion Matrix and ROC Analysis
4.4.4. End-to-End Computational Efficiency
4.4.5. Interpretability Analysis
- t-SNE and Misclassification Analysis.
- Grad-CAM Mapped to Behavioral Features.
4.4.6. Grid-Order Sensitivity Analysis
4.5. Dataset 2 Results: External Validation on EldeRan
4.5.1. EldeRan Predictive Performance
4.5.2. Statistical Significance of the RL Improvement (EldeRan)
4.5.3. Confusion Matrix and ROC Analysis
4.5.4. EldeRan Computational Efficiency
4.5.5. EldeRan Interpretability Analysis
- t-SNE and Misclassification
- Grad-CAM on MI100 Grid
4.6. Comparison with Existing Relevant Methods
5. Discussion
6. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ferdous, J.; Islam, R.; Mahboubi, A.; Islam, M.Z. AI-based Ransomware Detection: A Comprehensive Review. IEEE Access 2024, 12, 136666–136695. [Google Scholar] [CrossRef]
- Ruellan, E.; Paquet-Clouston, M.; Garcia, S. Conti Inc.: Understanding the internal discussions of a large ransomware-as-a-service operator with machine learning. Crime Sci. 2024, 13, 16. [Google Scholar] [CrossRef]
- Sgandurra, D.; Muñoz-González, L.; Mohsen, R.; Lupu, E.C. Automated Dynamic Analysis of Ransomware: Benefits, Limitations and use for Detection. arXiv 2016, arXiv:1609.03020. [Google Scholar]
- Singh, J.; Sharma, K.; Wazid, M.; Das, A.K. SINN-RD: Spline interpolation-envisioned neural network-based ransomware detection scheme. Comput. Electr. Eng. 2023, 106, 108601. [Google Scholar] [CrossRef]
- Zahoora, U.; Khan, A.; Rajarajan, M.; Khan, S.H.; Asam, M.; Jamal, T. Ransomware detection using deep learning based unsupervised feature extraction and a cost sensitive Pareto Ensemble classifier. Sci. Rep. 2022, 12, 15647. [Google Scholar] [CrossRef] [PubMed]
- Fernando, D.W.; Komninos, N.; Chen, T. A Study on the Evolution of Ransomware Detection Using Machine Learning and Deep Learning Techniques. IoT 2020, 1, 551–604. [Google Scholar] [CrossRef]
- Lin, T.; Lin, R. Efficient Ransomware Detection in Resource-Constrained Environments Using Optimized Multi-Layer Perceptron Networks. IEEE Access 2025, 13, 84153–84169. [Google Scholar] [CrossRef]
- Bensaoud, A.; Kalita, J. CNN-LSTM and transfer learning models for malware classification based on opcodes and API calls. Knowl.-Based Syst. 2024, 290, 111543. [Google Scholar] [CrossRef]
- Vasan, D.; Alazab, M.; Wassan, S.; Safaei, B.; Zheng, Q. Image-Based malware classification using ensemble of CNN architectures (IMCEC). Comput. Secur. 2020, 92, 101748. [Google Scholar] [CrossRef]
- Moreira, C.C.; Moreira, D.C.; de Sales, C.d.S., Jr. Improving ransomware detection based on portable executable header using xception convolutional neural network. Comput. Secur. 2023, 130, 103265. [Google Scholar] [CrossRef]
- Vasan, D.; Alazab, M.; Wassan, S.; Naeem, H.; Safaei, B.; Zheng, Q. IMCFN: Image-based malware classification using fine-tuned convolutional neural network architecture. Comput. Netw. 2020, 171, 107138. [Google Scholar] [CrossRef]
- Kumar, S.; Panda, K. SDIF-CNN: Stacking deep image features using fine-tuned convolution neural network models for real-world malware detection and classification. Appl. Soft Comput. 2023, 146, 110676. [Google Scholar] [CrossRef]
- Shah, S.S.H.; Jamil, N.; Khan, A.u.R. Transfer learning with dual-stage discrete wavelet transform for enhanced visual malware image compression and classification. J. Supercomput. 2025, 81, 879. [Google Scholar] [CrossRef]
- Rustam, F.; Ashraf, I.; Jurcut, A.D.; Bashir, A.K.; Zikria, Y. Bin Malware detection using image representation of malware data and transfer learning. J. Parallel Distrib. Comput. 2023, 172, 32–50. [Google Scholar] [CrossRef]
- Rezende, E.; Ruppert, G.; Carvalho, T.; Theophilo, A.; Ramos, F.; de Geus, P. Malicious Software Classification Using VGG16 Deep Neural Network’s Bottleneck Features. Adv. Intell. Syst. Comput. 2018, 738, 51–59. [Google Scholar] [CrossRef]
- Chaganti, R.; Ravi, V.; Pham, T.D. Image-based malware representation approach with EfficientNet convolutional neural networks for effective malware classification. J. Inf. Secur. Appl. 2022, 69, 103306. [Google Scholar] [CrossRef]
- Ferdous, J.; Islam, R.; Mahboubi, A.; Islam, Z. A novel technique for ransomware detection using image based dynamic features and transfer learning to address dataset limitations. Sci. Rep. 2025, 15, 32342. [Google Scholar] [CrossRef] [PubMed]
- Deng, X.Z.; Cen, M.C.; Jiang, M.; Lu, M. Ransomware early detection using deep reinforcement learning on portable executable header. Clust. Comput. 2024, 27, 1867–1881. [Google Scholar] [CrossRef]
- Kumar, S.; Singh, S.K.; Sarin, S.; Subba, C.K.; Arya, V.; Nandhini, N.; Gupta, B.B.; Chui, K.T. Leveraging Dynamic Embeddings and Reinforcement Learning with Bayesian Networks for Ransomware Resiliences. Cyber Secur. Appl. 2025, 3, 100095. [Google Scholar] [CrossRef]
- Jeremiah, S.R.; Chen, H.; Gritzalis, S.; Park, J.H. Leveraging application permissions and network traffic attributes for Android ransomware detection. J. Netw. Comput. Appl. 2024, 230, 103950. [Google Scholar] [CrossRef]
- Feng, C.; Huertas Celdrán, A.; von der Assen, J.; Martínez Beltrán, E.T.; Bovet, G.; Stiller, B. DART: A Solution for decentralized federated learning model robustness analysis. Array 2024, 23, 100360. [Google Scholar] [CrossRef]
- Ferdous, J.; Islam, R.; Islam, Z. Privacy-Aware Machine Unlearning with SISA for Reinforcement Learning—Based Ransomware Detection; Association for Computing Machinery: New York, NY, USA, 2026; Volume 1, ISBN 9798400723087. [Google Scholar]
- Manavi, F.; Hamzeh, A. Static Detection of Ransomware Using LSTM Network and PE Header. In Proceedings of the 26th International Computer Conference, Computer Society of Iran (CSICC) 2021, Tehran, Iran, 3–4 March 2021. [Google Scholar] [CrossRef]
- Manavi, F.; Hamzeh, A. Ransomware Detection Based on PE Header Using Convolutional Neural Networks. ISeCure 2022, 14, 181–192. [Google Scholar] [CrossRef]
- Qin, B.; Wang, Y.; Ma, C. API Call Based Ransomware Dynamic Detection Approach Using TextCNN. In Proceedings of the International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), Fuzhou, China, 12–14 June 2020; IEEE: New York, NY, USA, 2020; pp. 162–166. [Google Scholar] [CrossRef]
- Gulmez, S.; Gorgulu Kakisim, A.; Sogukpinar, I. XRan: Explainable deep learning-based ransomware detection using dynamic analysis. Comput. Secur. 2024, 139, 103703. [Google Scholar] [CrossRef]
- Karbab, E.M.B.; Debbabi, M.; Derhab, A. SwiftR: Cross-platform ransomware fingerprinting using hierarchical neural networks on hybrid features. Expert Syst. Appl. 2023, 225, 120017. [Google Scholar] [CrossRef]
- Almomani, I.; Alkhayer, A.; El-Shafai, W. E2E-RDS: Efficient End-to-End Ransomware Detection System Based on Static-Based ML and Vision-Based DL Approaches. Sensors 2023, 23, 4467. [Google Scholar] [CrossRef] [PubMed]
- Rezende, E.; Ruppert, G.; Carvalho, T.; Ramos, F.; De Geus, P. Malicious software classification using transfer learning of ResNet-50 deep neural network. In Proceedings of the 16th IEEE International Conference on Machine Learning and Applications (ICMLA), Cancun, Mexico, 18–21 December 2017; IEEE: New York, NY, USA, 2017; pp. 1011–1014. [Google Scholar] [CrossRef]
- Huang, X.; Ma, L.; Yang, W.; Zhong, Y. A Method for Windows Malware Detection Based on Deep Learning. J. Signal Process. Syst. 2021, 93, 265–273. [Google Scholar] [CrossRef]
- Feng, C.; Celdran, A.H.; Sanchez, P.M.S.; Kreischer, J.; von der Assen, J.; Bovet, G.; Perez, G.M.; Stiller, B. CyberForce: A Federated Reinforcement Learning Framework for Malware Mitigation. IEEE Trans. Dependable Secur. Comput. 2025, 22, 4398–4411. [Google Scholar] [CrossRef]
- Abuse.ch. MalwareBazaar Database. Available online: https://bazaar.abuse.ch/browse/ (accessed on 2 June 2024).
- VirusShare.com—Because Sharing Is Caring. 2025. Available online: https://virusshare.com/ (accessed on 7 June 2024).
- SnapFiles. Popular Freeware Categories. 1997. Available online: https://www.snapfiles.com/freeware/ (accessed on 6 July 2024).
- Portableapps. Portable App Directory. 2024. Available online: https://portableapps.com/apps (accessed on 10 July 2024).
- Iosifache. DikeDataset. 2023. Available online: https://github.com/iosifache/DikeDataset/tree/main/files/benign (accessed on 16 July 2024).
- Agcaoili, J.; Ang, M. Narrowed Sights, Bigger Payoffs: Ransomware in 2019. TREND. 6 June 2019. Available online: https://www.trendmicro.com/vinfo/au/security/news/cybercrime-and-digital-threats/narrowed-sights-bigger-payoffs-ransomware-in-2019 (accessed on 1 October 2024).
- Palo Alto Networks. Unit 42 Ransomware Threat Report. 2020. Available online: https://start.paloaltonetworks.com/unit-42-ransomware-threat-report.html (accessed on 10 September 2024).
- Zscaler. Zscaler: 2022 ThreatLabz State of Ransomware Report. 2022. Available online: https://www.zscaler.com/resources/industry-reports/2022-threatlabz-ransomware-report.pdf (accessed on 12 October 2024).
- Sophos. Maturing Criminal Marketplaces Present New Challenges to Defenders; Sophos 2023 Threat Report; Sophos: Abingdon, UK, 2023; Available online: https://www.scribd.com/document/628559505/Sophos-Threat-Report-2023 (accessed on 21 September 2024).
- Calder, A. The Ransomware Threat Landscape: Prepare for, Recognise and Survive Ransomware Attacks; IT Governance Publishing: Ely, UK, 2023. [Google Scholar] [CrossRef]
- TREND. Phobos Emerges as a Formidable Threat in Q1 2024, LockBit Stays in the Top Spot. 2024. Available online: https://www.trendmicro.com/vinfo/au/security/news/ransomware-by-the-numbers/phobos-emerges-as-a-formidable-threat-in-q1-2024-lockbit-stays-in-the-top-spot (accessed on 12 October 2024).
- Cuckoo. Cuckoo Sandbox-Automated Malware Analysis. Available online: https://cuckoosandbox.org/download (accessed on 28 December 2025).
- Cao, G.; Ma, Y.; Geng, M. A reinforcement learning based fuzzing technique for binary programs vulnerabilities detection. Array 2025, 27, 100458. [Google Scholar] [CrossRef]
- Hossain, M.A.; Hasan, T.; Ahmed, F.; Cheragee, S.H.; Kanchan, M.H.; Haque, M.A. Towards superior android ransomware detection: An ensemble machine learning perspective. Cyber Secur. Appl. 2025, 3, 100076. [Google Scholar] [CrossRef]
- Hossain, M.A.; Islam, M.S. Ensuring network security with a robust intrusion detection system using ensemble-based machine learning. Array 2023, 19, 100306. [Google Scholar] [CrossRef]
- Hasan, R.; Biswas, B.; Saleh, M.A.; Prabha, M. Enhancing malware detection with feature selection and scaling techniques using machine learning models. Sci. Rep. 2025, 15, 9122. [Google Scholar] [CrossRef] [PubMed]
- Abdel-Wahab, M.S.; Neil, A.M.; Atia, A. A Comparative Study of Machine Learning and Deep Learning in Network Anomaly-Based Intrusion Detection Systems. In Proceedings of the 15th International Conference on Computer Engineering and Systems (ICCES), Cairo, Egypt, 15–16 December 2020; IEEE: New York, NY, USA, 2020; Volume 26. [Google Scholar] [CrossRef]

















| Ref | Feature | Model | Dataset | Acc (%) | Strength | Limitation |
|---|---|---|---|---|---|---|
| Machine Learning (ML) and Deep Learning (DL) | ||||||
| [23] | PE header bytes | LSTM | R = 1000, B = 1000 | 93.25 | Simple DL pipeline without extensive manual feature engineering | No unseen-family evaluation |
| [24] | PE-header image representation | CNN | R = 1000, B = 1000 | 93.33 | Converts static executable structure into image form | Limited evaluation on unseen ransomware families |
| [10] | PE header color images | Xception CNN | R = 2023, B = 2134 | 98.20 | Improved static image accuracy | Static features may be affected by packing and obfuscation |
| [3] | Dynamic features | RLR | R = 582, B = 942 | 96.3 | Simple ML on runtime features | Legacy XP/Cuckoo telemetry |
| [25]. | API-call sequences | TextCNN | R = 1000, B = 1000 | 95.9 | Effective sequence-based behavioural modelling | Lacks interpretability |
| [26] | API calls, DLLs, mutexes | CNN + XAI | R = 668, B = 668 | 99.4 | Combines dynamic behaviour with explanation methods | Computationally intensive |
| [27] | Hybrid features | HNN | R≈10.3 K, B≈10 K | 98.75 | Robust cross-platform evaluation | Higher computational overhead |
| Transfer Learning (TL) | ||||||
| [28] | APK image representation | 19 pretrained CNNs | R = 500, B = 500 | 99.5 | Extensive pretrained-CNN evaluation | May struggle with evolving ransomware variants |
| [29] | Malware byteplot images | ResNet-50 | M = 9339 | 98.62 | Strong TL performance on grayscale byteplots | No detailed imbalance analysis |
| [30] | Hybrid static and dynamic images | VGG16 | M = 512, B = 888 | 94.70 | Combines static and dynamic visual evidence | Limited scalability analysis |
| [17] | Image-based dynamic features | ResNet50, EfficientNetB0, InceptionV3, Xception, | R = 500, B = 500 | 99.96 | High detection performance | Fine-tuning increases training time and memory cost |
| [13] | Grayscale images | DenseNet-121, XGBoost | Malimg | 98.58 | Efficient TL-based feature extraction | No unseen or obfuscated-sample evaluation |
| [14] | Malware binary images | VGG16, ResNet50, Bi-SVC | Malimg | 100 | Bimodal stacked features | Single-dataset overfitting risk |
| [15] | Byteplot grayscale images | VGG16, SVM | M= 10,136 | 92.97 | Reduces manual feature engineering | Lower performance than recent ensemble methods |
| [12] | Malware binary images | VGG16, VGG19, ResNet50, InceptionV3, MLP | Malimg | 98.55 | Multi-CNN TL improves robustness to packing | Computationally heavy |
| [11] | Malware binary images | VGG16, ResNet50, InceptionV3, SVM | Malimg and IoT-Android dataset | 98.82 | Robustness to obfuscation and polymorphism | Small and older datasets; image-size and imbalance effects not fully studied |
| Reinforcement Learning (RL) | ||||||
| [18] | Static PE-header features | Double DQN | R = 688 | 97.9 | Early detection without execution risk | Vulnerable to packing |
| [19] | Dynamic embeddings | RL + Bayesian networks | Vulnerability and system logs | N/A | Adaptive resilience modelling | Not designed for direct ransomware classification |
| [20] | Android permissions and network traffic | A2C, DQN, DDQN, PPO | Android ransomware dataset | 89.78 | Improves adaptive decision-making | Limited to static attributes |
| [31] | Device activity patterns | Federated learning + RL | IoT malware setting | 98 | Improves adaptability and distributed learning | Scalability underexplored |
| Family Name | First Seen | Samples | Family Name | First Seen | Samples | Family Name | First Seen | Samples |
|---|---|---|---|---|---|---|---|---|
| LockBit | 2019 | 30 | DarkSide | 2020 | 24 | MountLocker | 2020 | 15 |
| BlackCat | 2021 | 30 | NetWalker | 2019 | 24 | Mallox | 2021 | 15 |
| GandCrab | 2018 | 28 | Phobos | 2018 | 24 | Makop | 2020 | 12 |
| Thanos | 2020 | 28 | RagnarLocker | 2019 | 23 | Nefilim | 2020 | 11 |
| BlackMatter | 2021 | 28 | Conti | 2020 | 18 | Clop | 2019 | 10 |
| MedusaLocker | 2019 | 28 | Mespinoza/Pysa | 2019 | 18 | Cerber | 2016 | 9 |
| Babuk | 2021 | 27 | Avaddon | 2020 | 16 | Maze | 2019 | 8 |
| REvil/Sodinokibi | 2019 | 26 | Ryuk | 2018 | 15 | BlueSky | 2022 | 8 |
| WastedLocker | 2020 | 25 |
| Layer | Output Shape | Parameters |
|---|---|---|
| Input | (None, 3328) | 0 |
| Dense | (None, 1024) | 3,408,896 |
| BatchNormalization | (None, 1024) | 4096 |
| Dropout (0.3) | (None, 1024) | 0 |
| Residual Block ×2 | (None, 1024) | 1,053,184 |
| Dense (256) | (None, 256) | 262,400 |
| BatchNormalization | (None, 256) | 1024 |
| Dense (1024) | (None, 1024) | 263,168 |
| Add + ReLU | (None, 1024) | 0 |
| Dropout (0.2) | (None, 1024) | 0 |
| Output Dense (Softmax, 2) | (None, 2) | 2050 |
| Total Parameters | 4,468,226 |
| Parameter | Value |
|---|---|
| Input | 3328-dimensional fused EfficientNetB0–InceptionV3 embedding |
| Architecture | Dense (1024) followed by two residual blocks |
| Residual block | Dense (256, ReLU) → BatchNorm → Dense (1024) → Add + ReLU → Dropout(0.2) |
| Output | Dense (2) with Softmax activation |
| Regularization | Dropout 0.3 after initial dense layer; Dropout 0.2 after each residual block |
| Normalization | BatchNorm after the initial dense layer and after the 256-unit dense layer in each residual block |
| Optimizer | Adam |
| Learning Rate | Cosine annealing, initial learning rate 1 × 10−3 |
| Loss | Categorical cross-entropy with label smoothing =0.1 |
| Training setup | Batch size = 32; Epochs = 25; Stratified 5-fold CV |
| RL weighting | Fold-local bandit-style sample weighting |
| Metric Name | Description | Related Syntax/Equation |
|---|---|---|
| Accuracy | The ratio of correctly predicted instances (TP and TN) to the total number of observations. | |
| Precision | The ratio of correctly predicted positive observations (TP) to the total predicted positives (TP + FP). | Precision |
| Recall (Sensitivity) | The proportion of actual positives (TP) correctly identified by the model. | Recall |
| F1-Score | The harmonic mean of precision and recall balances the false positives and false negatives. | F1-measure = |
| AUC (Area Under ROC Curve) | The classifier performance was evaluated across the thresholds, with higher values indicating stronger separability. | Derived from the ROC curve (TPR vs. FPR). |
| Model | Configuration | Accuracy | Precision | Recall | F1-Score | AUC |
|---|---|---|---|---|---|---|
| MLP | With RL | 0.9920 ± 0.0045 | 0.9901 ± 0.0069 | 0.9940 ± 0.0089 | 0.9920 ± 0.0045 | 0.9984 ± 0.0022 |
| Without RL | 0.9870 ± 0.0084 | 0.9824 ± 0.0142 | 0.9920 ± 0.0130 | 0.9871 ± 0.0083 | 0.9975 ± 0.0032 | |
| ANN | With RL | 0.9810 ± 0.0082 | 0.9747 ± 0.0173 | 0.9880 ± 0.0110 | 0.9812 ± 0.0081 | 0.9961 ± 0.0036 |
| Without RL | 0.9750 ± 0.0050 | 0.9669 ± 0.0153 | 0.9840 ± 0.0114 | 0.9752 ± 0.0048 | 0.9955 ± 0.0039 | |
| CNN | With RL | 0.9790 ± 0.0065 | 0.9745 ± 0.0141 | 0.9860 ± 0.0114 | 0.9791 ± 0.0066 | 0.9964 ± 0.0027 |
| Without RL | 0.9750 ± 0.0106 | 0.9651 ± 0.0179 | 0.9840 ± 0.0167 | 0.9753 ± 0.0103 | 0.9950 ± 0.0073 | |
| RF | With RL | 0.9780 ± 0.0076 | 0.9705 ± 0.0097 | 0.9860 ± 0.0089 | 0.9782 ± 0.0075 | 0.9965 ± 0.0040 |
| Without RL | 0.9750 ± 0.0079 | 0.9686 ± 0.0124 | 0.9820 ± 0.0110 | 0.9752 ± 0.0078 | 0.9960 ± 0.0034 | |
| XGBoost | With RL | 0.9760 ± 0.0089 | 0.9723 ± 0.0105 | 0.9800 ± 0.0141 | 0.9761 ± 0.0090 | 0.9964 ± 0.0034 |
| Without RL | 0.9700 ± 0.0071 | 0.9627 ± 0.0124 | 0.9780 ± 0.0084 | 0.9703 ± 0.0069 | 0.9961 ± 0.0037 | |
| SVM | With RL | 0.9660 ± 0.0055 | 0.9556 ± 0.0176 | 0.9840 ± 0.0182 | 0.9664 ± 0.0054 | 0.9891 ± 0.0097 |
| Without RL | 0.9630 ± 0.0115 | 0.9453 ± 0.0284 | 0.9780 ± 0.0192 | 0.9639 ± 0.0105 | 0.9861 ± 0.0089 | |
| LR | With RL | 0.9420 ± 0.0160 | 0.9388 ± 0.0166 | 0.9460 ± 0.0305 | 0.9421 ± 0.0166 | 0.9836 ± 0.0078 |
| Without RL | 0.9180 ± 0.0368 | 0.9264 ± 0.0193 | 0.9080 ± 0.0680 | 0.9162 ± 0.0411 | 0.9780 ± 0.0098 |
| Model | Configuration | Metric | Mean | Std | 95% CI (t, df = 4) |
|---|---|---|---|---|---|
| MLP | With RL | Accuracy | 0.9920 | 0.0045 | [0.9864, 0.9976] |
| Precision | 0.9901 | 0.0069 | [0.9815, 0.9987] | ||
| Recall | 0.9940 | 0.0089 | [0.9829, 1.0000] | ||
| F1-score | 0.9920 | 0.0045 | [0.9864, 0.9976] | ||
| AUC | 0.9984 | 0.0022 | [0.9957, 1.0000] | ||
| MLP | Without RL | Accuracy | 0.9870 | 0.0084 | [0.9766, 0.9974] |
| Precision | 0.9824 | 0.0142 | [0.9648, 1.0000] | ||
| Recall | 0.9920 | 0.0130 | [0.9759, 1.0000] | ||
| F1-score | 0.9871 | 0.0083 | [0.9768, 0.9974] | ||
| AUC | 0.9975 | 0.0032 | [0.9935, 1.0000] |
| Metric | With RL Mean | Non-RL Mean | Mean Difference (RL − Non-RL) | Wilcoxon W | p-Value | Rank-Biserial r | Direction |
|---|---|---|---|---|---|---|---|
| Accuracy | 0.9920 | 0.9870 | 0.0050 | 0 | 0.125 | 1 | RL higher |
| Recall | 0.9940 | 0.9920 | 0.0020 | 0 | 0.5 | 1 | RL higher |
| F1 Score | 0.9920 | 0.9871 | 0.0049 | 0 | 0.125 | 1 | RL higher |
| AUC | 0.9984 | 0.9975 | 0.0009 | 1 | 0.500 | 0.66667 | RL higher |
| Condition | Class | Precision | Recall | F1-Score |
|---|---|---|---|---|
| MLP + RL | Benign | 0.9940 | 0.9900 | 0.9920 |
| MLP + RL | Ransomware | 0.9900 | 0.9940 | 0.9920 |
| MLP (no RL) | Benign | 0.9919 | 0.9820 | 0.9869 |
| MLP (no RL) | Ransomware | 0.9822 | 0.9920 | 0.9871 |
| Component | Time (s) | RAM (MB) | Execution Role |
|---|---|---|---|
| Image loading and preprocessing | 7.015 | 730.035 | One-time image loading, resizing, and preprocessing |
| EfficientNetB0 feature extraction | 76.968 | 64.668 | One-time frozen CNN embedding extraction |
| InceptionV3 feature extraction | 115.605 | 228.125 | One-time frozen CNN embedding extraction |
| Feature fusion | 0.009 | 0.000 | One-time concatenation of EfficientNetB0 and InceptionV3 embeddings |
| Residual MLP training without RL | 51.693 | 87.672 | Mean per-fold residual MLP training using uniform sample contribution |
| Residual MLP inference | 0.6054 | 1.7414 | Mean per-fold held-out inference |
| Estimated end-to-end training pipeline without RL | 251.290 | 730.035 | One-time image-to-embedding pipeline plus mean non-RL MLP training fold |
| Residual MLP training with RL | 107.620 | 138.070 | Mean per-fold training; includes probe MLP training, Q-table update, final sample weighting, and final MLP training |
| Residual MLP inference | 0.4442 | 0.1430 | Mean per-fold held-out inference |
| Estimated end-to-end training pipeline with RL | 307.217 | 730.035 | One-time image-to-embedding pipeline plus mean corrected RL training fold |
| Model | Configuration | Shared Image-to-Embedding Time (s) | Mean Training Time (s) | Mean Inference Time (s) | End-to-End Training Pipeline Time (s) | Shared Image-to-Embedding RAM (MB) | Mean Training RAM (MB) | Mean Inference RAM (MB) |
|---|---|---|---|---|---|---|---|---|
| MLP | With RL | 199.597 | 107.62 | 0.4442 | 307.217 | 730.035 | 138.07 | 0.1430 |
| Without RL | 199.597 | 51.693 | 0.6054 | 251.290 | 730.035 | 87.672 | 1.7414 | |
| ANN | With RL | 199.597 | 12.028 | 0.181 | 211.625 | 730.035 | 8.689 | 0.137 |
| Without RL | 199.597 | 5.658 | 0.208 | 205.255 | 730.035 | 12.975 | 0.523 | |
| CNN | With RL | 199.597 | 222.282 | 0.4211 | 421.879 | 730.035 | 126.9312 | 0.4820 |
| Without RL | 199.597 | 107.1744 | 0.4358 | 306.7714 | 730.035 | 61.1117 | 0.8133 | |
| RF | With RL | 199.597 | 6.084 | 0.027 | 205.681 | 730.035 | 0.007 | 0.000 |
| Without RL | 199.597 | 2.996 | 0.027 | 202.593 | 730.035 | 0.063 | 0.000 | |
| XGBoost | With RL | 199.597 | 25.620 | 0.007 | 225.217 | 730.035 | 7.938 | 0.001 |
| Without RL | 199.597 | 15.389 | 0.015 | 214.986 | 730.035 | 27.316 | 0.0180 | |
| SVM | With RL | 199.597 | 6.350 | 0.280 | 205.947 | 730.035 | 0.001 | 0.000 |
| Without RL | 199.597 | 2.557 | 0.354 | 202.154 | 730.035 | 0.045 | 0.000 | |
| LR | With RL | 199.597 | 0.858 | 0.0095 | 200.455 | 730.035 | 12.198 | 1.015 |
| Without RL | 199.597 | 0.541 | 0.0103 | 200.138 | 730.035 | 16.429 | 2.031 |
| Sample Type | Rank | Feature | Grid Position (Row, Column) | Grad-CAM Activation |
|---|---|---|---|---|
| Benign | 1 | Feature 23 | 23 (3, 3) | 1.0000 |
| 2 | Feature 13 | 13 (2, 3) | 0.7458 | |
| 3 | Feature 22 | 22 (3, 2) | 0.7155 | |
| 4 | Feature 24 | 24 (3, 4) | 0.5599 | |
| 5 | Feature 12 | 12 (2, 2) | 0.5418 | |
| 6 | Feature 14 | 14 (2, 4) | 0.3887 | |
| 7 | Feature 28 | 28 (3, 8) | 0.3817 | |
| 8 | Feature 18 | 18 (2, 8) | 0.3755 | |
| 9 | Feature 91 | 91 (10, 1) | 0.3754 | |
| 10 | Feature 17 | 17 (2, 7) | 0.3523 | |
| Ransomware | 1 | Feature 100 | 100 (10, 10) | 1.0000 |
| 2 | Feature 18 | 18 (2, 8) | 0.8254 | |
| 3 | Feature 28 | 28 (3, 8) | 0.8228 | |
| 4 | Feature 8 | 8 (1, 8) | 0.8032 | |
| 5 | Feature 1 | 1 (1, 1) | 0.7574 | |
| 6 | Feature 38 | 38 (4, 8) | 0.7069 | |
| 7 | Feature 9 | 9 (1, 9) | 0.6637 | |
| 8 | Feature 19 | 19 (2, 9) | 0.6471 | |
| 9 | Feature 48 | 48 (5, 8) | 0.6461 | |
| 10 | Feature 7 | 7 (1, 7) | 0.6371 |
| Representation | Accuracy | Precision | Recall | F1-Score | AUC | Observation |
|---|---|---|---|---|---|---|
| Canonical 10 × 10 grid | 0.9920 ± 0.0045 | 0.9901 ± 0.0069 | 0.9940 ± 0.0089 | 0.9920 ± 0.0045 | 0.9984 ± 0.0022 | Original deterministic layout |
| Random shuffle 01 | 0.9890 ± 0.0042 | 0.9843 ± 0.0111 | 0.9940 ± 0.0055 | 0.9891 ± 0.0041 | 0.9972 ± 0.0037 | Minor reduction |
| Random shuffle 02 | 0.9840 ± 0.0114 | 0.9750 ± 0.0231 | 0.9940 ± 0.0055 | 0.9843 ± 0.0109 | 0.9968 ± 0.0030 | Largest reduction |
| Random shuffle 03 | 0.9880 ± 0.0045 | 0.9881 ± 0.0082 | 0.9880 ± 0.0084 | 0.9880 ± 0.0045 | 0.9972 ± 0.0036 | Small reduction |
| Random shuffle 04 | 0.9880 ± 0.0097 | 0.9825 ± 0.0182 | 0.9940 ± 0.0089 | 0.9881 ± 0.0095 | 0.9939 ± 0.0105 | Small reduction |
| Random shuffle 05 | 0.9890 ± 0.0074 | 0.9844 ± 0.0161 | 0.9940 ± 0.0089 | 0.9891 ± 0.0073 | 0.9970 ± 0.0044 | Near-canonical performance |
| Representation | Accuracy | F1 Score | AUC | Δ Accuracy |
|---|---|---|---|---|
| Canonical 10 × 10 grid | 0.9920 ± 0.0045 | 0.9920 ± 0.0045 | 0.9984 ± 0.0022 | 0.0000 |
| Randomly shuffled 10 × 10 grid, five permutations | 0.9876 ± 0.0075 | 0.9877 ± 0.0073 | 0.9964 ± 0.0054 | −0.0044 |
| Condition | RL Setting | Accuracy (Mean ± Std) | Precision (Mean ± Std) | Recall (Mean ± Std) | F1 Score (Mean ± Std) | AUC (Mean ± Std) |
|---|---|---|---|---|---|---|
| EldeRan_ALL | With RL | 0.9036 ± 0.0125 | 0.9054 ± 0.0166 | 0.9018 ± 0.0285 | 0.9033 ± 0.0136 | 0.9633 ± 0.0049 |
| Without RL | 0.8959 ± 0.0192 | 0.9009 ± 0.0178 | 0.8898 ± 0.0359 | 0.8950 ± 0.0210 | 0.9621 ± 0.0072 | |
| EldeRan_MI100 | With RL | 0.9208 ± 0.0218 | 0.9101 ± 0.0159 | 0.9346 ± 0.0326 | 0.9218 ± 0.0218 | 0.9813 ± 0.0079 |
| Without RL | 0.9139 ± 0.0241 | 0.9099 ± 0.0230 | 0.9191 ± 0.0534 | 0.9138 ± 0.0264 | 0.9781 ± 0.0073 |
| Condition | Configuration | Metric | Mean | Std | 95% CI (t, df = 4) |
|---|---|---|---|---|---|
| EldeRan_ALL | With RL | Accuracy | 0.9036 | 0.0125 | [0.8881, 0.9191] |
| Precision | 0.9054 | 0.0166 | [0.8848, 0.9260] | ||
| Recall | 0.9018 | 0.0285 | [0.8664, 0.9372] | ||
| F1-score | 0.9033 | 0.0136 | [0.8864, 0.9202] | ||
| AUC | 0.9633 | 0.0049 | [0.9572, 0.9694] | ||
| EldeRan_ALL | Without RL | Accuracy | 0.8959 | 0.0192 | [0.8721, 0.9197] |
| Precision | 0.9009 | 0.0178 | [0.8788, 0.9230] | ||
| Recall | 0.8898 | 0.0359 | [0.8452, 0.9344] | ||
| F1-score | 0.8950 | 0.0210 | [0.8689, 0.9211] | ||
| AUC | 0.9621 | 0.0072 | [0.9532, 0.9710] | ||
| EldeRan_MI100 | With RL | Accuracy | 0.9208 | 0.0218 | [0.8937, 0.9479] |
| Precision | 0.9101 | 0.0159 | [0.8904, 0.9298] | ||
| Recall | 0.9346 | 0.0326 | [0.8941, 0.9751] | ||
| F1-score | 0.9218 | 0.0218 | [0.8947, 0.9489] | ||
| AUC | 0.9813 | 0.0079 | [0.9715, 0.9911] | ||
| EldeRan_MI100 | Without RL | Accuracy | 0.9139 | 0.0241 | [0.8840, 0.9438] |
| Precision | 0.9099 | 0.0230 | [0.8813, 0.9385] | ||
| Recall | 0.9191 | 0.0534 | [0.8528, 0.9854] | ||
| F1-score | 0.9138 | 0.0264 | [0.8810, 0.9466] | ||
| AUC | 0.9781 | 0.0073 | [0.9690, 0.9872] |
| Metric | With-RL Mean | Without RL Mean | Mean Difference (RL − Non-RL) | Wilcoxon W | p-Value | Rank-Biserial r | Direction |
|---|---|---|---|---|---|---|---|
| Accuracy | 0.9208 | 0.9139 | 0.0069 | 1.0 | 0.125 | 1.0000 | RL higher |
| Recall | 0.9346 | 0.9191 | 0.0155 | 0.0 | 0.250 | 1.0000 | RL higher |
| F1-score | 0.9218 | 0.9138 | 0.0080 | 1.0 | 0.250 | 1.0000 | RL higher |
| AUC | 0.9813 | 0.9781 | 0.0032 | 1.0 | 0.125 | 0.8667 | RL higher |
| Condition | Class | Precision | Recall | F1-Score |
|---|---|---|---|---|
| EldeRan_MI100 + RL | Benign | 0.9327 | 0.9071 | 0.9197 |
| EldeRan_MI100 + RL | Ransomware | 0.9095 | 0.9346 | 0.9219 |
| EldeRan_MI100 without RL | Benign | 0.9183 | 0.9088 | 0.9135 |
| EldeRan_MI100 without RL | Ransomware | 0.9099 | 0.9191 | 0.9138 |
| Condition | RL Setting | Loading/Preparation Time (s) | Mean Train Time (s) | Mean Inference Time (s) | Preprocessing Max RAM (MB) | Mean Train RAM (MB) | Mean Inference RAM (MB) |
|---|---|---|---|---|---|---|---|
| EldeRan_ALL | With RL | 33.448 | 111.5346 | 0.3454 | 687.848 | 103.4784 | 1.3968 |
| Without RL | 33.448 | 55.8762 | 0.3978 | 687.848 | 83.5766 | 3.4970 | |
| EldeRan_MI100 | With RL | 33.448 | 109.0762 | 0.3514 | 667.246 | 117.4806 | 0.6210 |
| Without RL | 33.448 | 56.0550 | 0.4408 | 667.246 | 61.9984 | 1.4224 |
| Sample Type | Rank | Feature | Grid Position (Row, Column) | Grad-CAM Activation |
|---|---|---|---|---|
| Benign | 1 | EldeRan_col_13898 | (10, 1) | 1.000000 |
| 2 | EldeRan_col_13956 | (10, 2) | 0.915738 | |
| 3 | EldeRan_col_14117 | (10, 3) | 0.736508 | |
| 4 | EldeRan_col_11352 | (9, 1) | 0.506671 | |
| 5 | EldeRan_col_11578 | (9, 2) | 0.425931 | |
| 6 | EldeRan_col_11586 | (9, 3) | 0.315646 | |
| 7 | EldeRan_col_106 | (2, 1) | 0.265248 | |
| 8 | EldeRan_col_180 | (3, 1) | 0.249523 | |
| 9 | EldeRan_col_9 | (1, 1) | 0.235859 | |
| 10 | EldeRan_col_84 | (1, 8) | 0.189545 | |
| Ransomware | 1 | EldeRan_col_106 | (2, 1) | 1.000000 |
| 2 | EldeRan_col_9 | (1, 1) | 0.984745 | |
| 3 | EldeRan_col_180 | (3, 1) | 0.884667 | |
| 4 | EldeRan_col_29768 | (10, 10) | 0.724268 | |
| 5 | EldeRan_col_84 | (1, 8) | 0.593462 | |
| 6 | EldeRan_col_24 | (1, 2) | 0.583141 | |
| 7 | EldeRan_col_107 | (2, 2) | 0.578005 | |
| 8 | EldeRan_col_86 | (1, 9) | 0.545094 | |
| 9 | EldeRan_col_169 | (2, 8) | 0.541687 | |
| 10 | EldeRan_col_1769 | (4, 7) | 0.537124 |
| Ref. | Feature Type | Feature Extractor | RL-Based Learning | Classifier/Model | Accuracy (%) | Training Time (s) | Prediction Time (s) | Inference Memory (MB) | FP (%) | FN (%) |
|---|---|---|---|---|---|---|---|---|---|---|
| [13] | Grayscale images | DenseNet-121 | No | XGBoost | 98.58 | N/R | N/R | N/R | N/R | N/R |
| [14] | Binary images | VGG-16 + ResNet50 | No | Bi-KNN | 99.00 | 18.928 | N/R | N/R | N/R | N/R |
| [12] | Binary images | VGG16, VGG19, ResNet50, InceptionV3 | No | MLP | 98.55 | N/R | 0.471 | N/R | N/R | N/R |
| [15] | Grayscale images | VGG-16 | No | SVM | 92.97 | N/R | N/R | N/R | N/R | N/R |
| [20] | Android permissions and network-traffic | N/A | Yes | A2C, DQN, DDQN, PPO | 89.78 | 168.27 | 0.76 | N/R | N/R | N/R |
| [31] | Dynamic features | N/A | Yes | FL + RL | 98.00 | N/R | N/R | N/R | N/R | N/R |
| Our proposed method: Dataset 1 | Behavioural feature-grid images | EfficientNetB0 + InceptionV3 | Yes | RL-guided residual MLP | 99.20 | 107.62 | 0.444 | 0.143 | 1.00 | 0.60 |
| Our proposed method: EldeRan MI top-100 | Public behavioural benchmark feature-grid images | EfficientNetB0 + InceptionV3 | Yes | RL-guided residual MLP | 92.08 | 109.0762 | 0.3514 | 0.6210 | 9.29 | 6.54 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Ferdous, J.; Islam, R.; Mahboubi, A.; Islam, M.Z. TL-RL-FusionNet: Reinforcement Learning-Guided Residual MLP with Fused CNN Embeddings for Efficient and Adaptive Ransomware Detection. Sensors 2026, 26, 4775. https://doi.org/10.3390/s26154775
Ferdous J, Islam R, Mahboubi A, Islam MZ. TL-RL-FusionNet: Reinforcement Learning-Guided Residual MLP with Fused CNN Embeddings for Efficient and Adaptive Ransomware Detection. Sensors. 2026; 26(15):4775. https://doi.org/10.3390/s26154775
Chicago/Turabian StyleFerdous, Jannatul, Rafiqul Islam, Arash Mahboubi, and Md Zahidul Islam. 2026. "TL-RL-FusionNet: Reinforcement Learning-Guided Residual MLP with Fused CNN Embeddings for Efficient and Adaptive Ransomware Detection" Sensors 26, no. 15: 4775. https://doi.org/10.3390/s26154775
APA StyleFerdous, J., Islam, R., Mahboubi, A., & Islam, M. Z. (2026). TL-RL-FusionNet: Reinforcement Learning-Guided Residual MLP with Fused CNN Embeddings for Efficient and Adaptive Ransomware Detection. Sensors, 26(15), 4775. https://doi.org/10.3390/s26154775

