arXiv:2610.25318cs.CROct 2026

Manuscript Offprint

arXiv:2610.25318

AdaFedXplain: Adaptive Federated Learning with Explainable AI for Ransomware Detection

Md. Emran Biswas, Md. Delowar Hossain, Mst. Tanbin Yasmin Tanny, Muhammad Aminur Rahaman, Md Al Amin, Tangina Sultana

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Md. Emran Biswas 1^{1}, Md. Delowar Hossain 2^{2}, Mst. Tanbin Yasmin Tanny 1^{1}, Muhammad Aminur Rahaman 3^{3}, Md Al Amin 4^{4}, and Tangina Sultana 1∗^{1*}

1^{1} Department of Electronics and Communication Engineering,

2^{2} Department of Computer Science and Engineering, Hajee Mohammad Danesh Science & Technology University, Bangladesh

3^{3} Department of Data Science and Engineering, Bangladesh University of Business and Technology, Bangladesh

4^{4} Department of Computer Science, Colorado State University, Fort Collins, USA

∗^{*}Corresponding email: tangina@hstu.ac.bd

Abstract. Attacks using ransomware have developed into complex multi-phase campaigns that target vital infrastructure, resulting in annual damages of billions of dollars. Conventional detection techniques are ineffective against zero-day variations, and privacy issues are raised by centralized machine learning algorithms. Federated learning allows for cooperative model training without data sharing, however current FL approaches suffer from explainability issues, high communication cost, and non-IID data heterogeneity. In this study, we present AdaFedXplain, an explainable AI-based adaptive federated learning system for ransomware detection. Our approach includes progressive XGBoost complexity to avoid overfitting, a decaying learning rate schedule for stable convergence, and dynamic client grading based on ransomware prevalence and data sufficiency. Using 62,485 real-world ransomware samples from four OS-based non-IID clients, we compare AdaFedXplain against FedAvg, FedProx, and SCAFFOLD. According to experimental data, AdaFedXplain outperforms all baselines with 99.59% detection accuracy and 99.64% F1-score while cutting energy usage by 75%, latency by 65%, and communication overhead by 75%. The ablation investigation demonstrates that every element enhances performance. Security analysts can use SHAP explainability to identify important PE header characteristics that influence detection decisions. Our system provides a collaborative ransomware detection solution that is efficient and interpretable, while reducing privacy risks through federated learning's data-local training paradigm.

Keywords: Federated Learning · Ransomware Detection · Explainable AI · AdaFedXplain · Non-IID Data · Machine Learning, Cybersecurity

1 Introduction

The scope and complexity of ransomware attacks have increased dramatically, making them one of the most serious cybersecurity risks in the world. Modern

Biswas et al.

ransomware has developed from simple file encryption to complex multi-stage attacks that target government infrastructure, healthcare, and banking. According to recent research, the frequency of attacks has been steadily increasing, and the yearly global damages are expected to exceed trillions of dollars [1,2]. The need for strong defenses is highlighted by the growing use of sophisticated evasion strategies.

Heuristic analysis, manual reverse engineering, and signature-based detection are the mainstays of conventional ransomware mitigation techniques. Although these techniques work well against known families, they are unable to identify polymorphic and zero-day assaults, produce a large number of false positives, and scale poorly [3,4]. By using automated feature learning and behavior-based detection, machine learning gets around these restrictions and allows for generalization to previously unknown attack patterns without the need for signatures [5,6].

In this research, we propose a federated learning architecture that allows collaborative model training across remote clients without revealing sensitive data, thereby addressing the shortcomings of centralized ML-based ransomware detection. Our solution specifically addresses the non-IID heterogeneity present in real-world deployments, where various businesses display differing operating system distributions and ransomware prevalence, in contrast to prior FL approaches that assume IID data distributions. On a real-world ransomware dataset of 62,485 samples, we do a thorough comparison of three FL settings, assessing XGBoost model across four non-IID clients divided by MajorOSVersion.

Our proposed AdaFedXplain framework addresses the non-IID challenge by partitioning training data across four heterogeneous clients based on MajorOSVersion (Windows NT/2000, XP/2003, Vista/7, and 10/11), reflecting real-world OS diversity. For each communication round, we compute a client score S(i)=0.6⋅ρi+0.4⋅min⁡(1,∣Di∣/10000)S(i) = 0.6 \cdot \rho_i + 0.4 \cdot \min(1, |D_i| / 10000), where ρi\rho_i is the ransomware prevalence ratio, and select the top 60% of clients for aggregation. We employ a decaying learning rate ηt=max⁡(0.01,0.1⋅(1−t/T))\eta_t = \max(0.01, 0.1 \cdot (1 - t/T)) to ensure stable convergence and progressive XGBoost complexity ( Et=60+tE_t = 60 + t estimators) to prevent overfitting. Experimental results demonstrate that AdaFedXplain achieves 99.59% detection accuracy and 99.64% F1-score using XGBoost, outperforming FedAvg, FedProx, and SCAF-FOLD. Critically, our method reduces communication overhead by 75% (80 MB → 20 MB), latency by 65% (4.0s → 1.4s), and energy consumption by 75% (40J → 10J). Per-client F1-scores consistently exceed 99.5%, while SCAFFOLD exhibits performance degradation with per-client F1-scores dropping to approximately 98.3%, confirming the robustness of AdaFedXplain across heterogeneous OS environments.

Our main contributions are:

– For ransomware detection in non-IID contexts, we propose AdaFedXplain, an adaptive federated learning framework with dynamic client selection and decaying learning rates.

– We incorporate SHAP explainability for ransomware detection, offering force and summary charts for transparent interpretation of model choices.

– We provide the first thorough evaluation of four FL settings (FedAvg, FedProx, SCAFFOLD, and AdaFedXplain) using four OS-based non-IID clients and real-world ransomware samples.

– AdaFedXplain delivers substantial improvements in resource efficiency over baseline methods, significantly reducing energy consumption, communication overhead, and latency, while maintaining high detection accuracy.

This is how the rest of the paper is structured. Related research on explainable AI, ransomware detection, and federated learning is reviewed in Section 2. The suggested AdaFedXplain methodology, which includes client selection, adaptive learning, and aggregation, is described in full in Section 3. The dataset, evaluation measures, and experimental design are explained in Section 4. The experimental results are presented and discussed in Section 5. The paper is concluded and next work is outlined in Section 6.