Abstract
This research work describes a lightweight, secure, and interpretable federated learning framework for automatic leukemia classification, which identifies and addresses various problems regarding clinical data security and collaborative model building among partnering healthcare organizations. This framework employs a distributed learning paradigm that allows a number of healthcare facilities to work together to build a high predictive performance classification model while training the model without exchanging sensitive information about patient data, thus ensuring data privacy and methodological reproducibility. The proposed framework employs a lightweight attention-enhanced convolutional neural network (CNN) for the automated classification of leukemia cells to one of the four categories: benign, early, pre-leukemic, and pro-leukemic at only 0.14 s/batch. The global model at 3 clients achieves 95.70% test accuracy while at 5 clients and increased training rounds achieve 96.56% on test set on a weighted aggregation method. Additionally, for increased clinical interpretability and transparency explainable methods are used in this study.
Keywords: Privacy-preserving, Federated learning, Leukemia classification, Enhanced CNN, Lightweight architecture, Explainable model
Subject terms: Cancer, Computational biology and bioinformatics, Health care, Mathematics and computing, Medical research
Introduction
The application of artificial intelligence (AI) to medical imaging has evolved, including the diagnosis of complicated hematologic cancers such as leukemia1. The integration of digital technology into the healthcare system has increased the demand for automated, reliable and efficient image categorization and medical data processing2. However, centralized machine learning approaches are typically still challenged by privacy issues with respect to the potential sensitivities of patient data and information3,4.
Recent advances in medical AI have demonstrated the potential of deep learning for diagnostic tasks, from cardiac anomaly detection using CNNs to lightweight architectures for medical image reconstruction5–7. However, conventional centralized machine learning approaches require aggregating sensitive patient data at a single location for model training, raising significant privacy concerns, particularly for sensitive conditions such as leukemia. This motivates the development of privacy-preserving federated learning frameworks that enable collaborative model training across distributed medical institutions without exchanging raw patient data, thereby preserving both diagnostic efficacy and patient confidentiality.
Federated learning allows healthcare organizations to train shared models cooperatively while maintaining confidence in raw patient data8,9. Privacy is maintained, organizations can utilize knowledge within models, and large-scale model construction can be performed. The performance and predictive power of convolutional neural networks (CNNs) in medical imaging have improved as attention approaches have been implemented. Attention-augmented networks, which combine spatial awareness and selective feature condensation, exceed the performance of most traditional CNNs in clinically complex diagnostic applications that require positional accuracy.
Self-attention mechanisms further improve CNNs with respect to long-range dependencies and non-local correlations in medical images10. With such architectural improvements, the models gain the ability to allocate computational focus on the most diagnostically relevant areas, augmenting both the accuracy and the interpretability of the classification outcomes. The ability to retrieve features related to fine-grained automated diagnoses, especially those that involve subtle differentiations in anatomy and histopathology, is impressive.
Despite the available CNN models, U-Net and its extensions are still the most common, due to the advantages of fully convolutional architectures, especially with respect to the use of skip connections that help retain the spatial details that are important in the analysis of histology images and cell details11. Hybrid attention models have become recent advancements in medical image analysis, significantly improving performance in classification and segmentation tasks of complex medical images12. Li et al13 advocates for the use of large kernel attention mechanisms, which help increase the receptive field without sacrificing important fine structures and details. This is especially important in the classification of leukemia, where subtle morphological variations determine the diagnosis.
Federated learning eliminates the requirement for centralized data storage, even with distributed training of decentralized dataset14,15. This is especially useful in the medical field, where privacy issues are regulated. Medical data is sensitive and sharing of such data is usually governed by strict laws16,17. With FL, healthcare organizations are able to design sophisticated models collaboratively and maintain the highest privacy for their data18. Weighted aggregation is an essential element of successful federated learning, as it guarantees fairness in participation of all clients. Aggregating with respect to the size of the dataset and the training performance offers balanced model updates, yielding statistically stable global optimization, in addition to maintaining confidentiality of the client data.
The lightweight architecture in this study is meant to address the computational restrictions frequently encountered in clinical settings. The attention-enhanced feature extraction design maximizes diagnostic accuracy with little computational burden, making this approach realistic for deployment in actual healthcare settings. The range of design characteristics discussed illustrates the capability of the framework to improve the diagnosis of leukemia and ultimately provides clinicians with interpretable, safe, and interoperable AI-enabled diagnostic tools. Numerous experiments were carried out on a data set of more than 3,200 medical images from three mock medical centers. The federated learning framework provided a global test accuracy of 95.70%, while client-specific accuracies were from 95.12% and 96.96%. This shows that federated learning can provide diagnostic accuracy similar to centralized models while maintaining privacy, confirming its clinical feasibility and ethical applicability in medical imaging. An alternative enumerated format of the outlined contributions. Here are the following contributions this study has to offer to federated learning and medical image analysis.
A new federated learning framework for automated leukemia classification is designed so that medical institutions can train models collaboratively without sharing sensitive patient information.
The proposed system features a lightweight, attention-augmented convolutional neural network architecture for the analysis of medical images, incorporating attention gates for the four different cell types. With the proposed architecture consisting of only 33k parameters and batch inferencing at only 0.14s.
We defined rigorous testing protocols across various clients, specifically 3 and 5, with differing training rounds to evaluate the performance of the proposed algorithm under different simulation conditions.
We show that federated learning deployed, while meeting the stringent privacy requirements of healthcare data, has the performance characteristics of a centralized system.
The sophisticated implementation includes weighted aggregation with respect to client data, model characteristics, and training outcomes to improve system convergence.
The structure of the paper is organized as follows: section “Literature review” reviews the relevant literature on federated learning and automated leukemia classification, followed by the identification of research gaps and limitations. Section “Federated learning for leukemia classification” details the research methodology, including data preprocessing, client distribution, model architecture, federated learning framework, evaluation metrics, and technical implementation. Section “Results and interpretation” presents the experimental results, the description of the dataset, the acquired results, the explanation analyzes, and a comprehensive discussion of the findings. Finally, the conclusion summarizes the contributions, practical implications, and potential directions for future research.
Literature review
This is the review of the literature that synthesizes the automated leukemia classification literature with federated learning applications and the privacy-preserving healthcare imaging literature. It is achieved through the review of the literature on the intended empirical implementation of the privacy-preserving automated diagnosis of diseases on images, which highlights the central themes of the literature, the implementation of clinical technologies, and the privacy-preserving automated diagnosis of diseases on imaging literature. The review details the methodological and performance gaps and the practical issues of the intended technology. Leukemia classification automation relies primarily on the extraordinary proficiency of deep convolutional neural networks. These networks are built on the paradigm of deep learning and have been successfully deployed in the analysis of medical images.
Gondal et al.19 examined the modified AlexNet architecture and specifically designed it for leukemia screening and subtype classification with impressive accuracies of 99.5% for binary classification and 96.06% for subtype classification in reported experiments. This work is commended in the sense that it illustrates the potential of optimally designed convolutional neural networks (CNN) to generate clinically acceptable performance for diagnostic tasks related to leukemia. The methodology these authors reported in this paper involved extensive image preprocessing of blood smear microscopy and then applied transfer learning using CNN designed for leukemia classification tasks. Shafique et al.20 referred to the importance of the depth, kernel sizes, and activation functions of the model as determinants of CNN performance on diagnosis, and the derived insights can be useful to practitioners targeting similar systems.
Masoudi et al.21 create the variable kernel channel spatial attention model (VKCS) as a new system to diagnose acute lymphoblastic leukemia (ALL). It uses a three-phase model employing transfer learning, deep pre-trained networks, and abstract automatic learning of blood smear image characteristics. The construction VMATT model uses variable-kernel spatial and channel attention mechanisms, which prioritize and focus on the most important salient image characteristics for higher image diagnostic efficiency. The system demonstrates the versatility of the model using hundreds of different color spaces, including and not limited to RGB, HSV, Lab, and YCbCr as well as various with morphological transformations. The model demonstrates clinical applicability in the diagnosis of hematologic malignancies, with a 100% accuracy on the ALL-IDB1 and a 99.6% accuracy on the ALL-IDB2, making the VKCS a system with significantly high performance with hematologic malignancies.
Clinical applications of CNN-based systems for classifying forms of leukemic pathology have evolved from systems designed for simple binary class categorization to ones that can tackle more complex subtype differentiation. In an extensive review of systems designed for the automated diagnosis of leukemic pathologies, Shah et al.22 noted the difficulties that subtype classification poses and the problem of class imbalance within medical datasets. They found that although systems designed for binary class categorization demonstrate a satisfactory level of accuracy, the differentiation of the subtypes associated with different forms of leukemic pathologies remains a complex task, which beyond adequately designed training datasets, also necessitates the use of more sophisticated algorithms. They contended that the difficulties surrounding effective subtype differentiation systems include interobserver variability and the clinical breadth of validation necessary prior to the real-world use of such systems, which together with dataset heterogeneity, greatly amplify the need for the systems to be clinically validated.
Kaissis et al.23 reported the first survey on applications of federated learning to medical imaging, which demonstrated that distributed learning approaches achieve high performance metrics and maintain patient confidentiality. It laid the theoretical and practical foundation for the application of federated learning in healthcare settings, addressing significant challenges around data stewardship, regulation, and collaboration. Implementing federated learning in medical imaging poses unique challenges that differ considerably from standard machine learning scenarios. Li et al.24 investigated the use of federated learning in multisite fMRI studies, suggesting that domain adaptation strategies could be incorporated into federated learning approaches to mitigate the cross-institutional variability of medical data. Their research showed that federated learning systems need to address differences in imaging protocols, equipment types, and patient demographics between sites, which requires the use of advanced adaptation techniques to enhance model transferability.
Kalapaaking et al.25 expanding the application of federated learning to next generation health technologies, identified the safeguards to learning based on the federated multipartycomputing framework to secure the Internet of Things in medicine. The author emphasizes the versatility of federated learning framework, especially in addressing disparate and heterogeneous data streams and varied computing capabilities of participants. It appears, from the study’s outcomes, that federated learning environments are designed to address the complexity and variability of healthcare data environments. Federated learning incorporates privacy enhancing and data protection techniques, whereby sensitive clinical data is secure and inaccessible throughout the distributed training. Falcetta et al.26 provided an extensatve overview in the application of deep learning and homomorphic encryption describing the ability to perform computation on data using ciphertexts that are encrypted and that computation is done without violating any encrypted data. This provided an example of the application of homomorphic encryption on federated learning and it is demonstrated that it provides significant computational efficiencies and privacy protection.
The implications of homomorphic encryption in the analysis of medical images presents both potential and bounded limitations. While there is strong theoretical assurance about the confidentiality of the information, the implementation of the system in practice needs to take computational overhead and scaling limitations into consideration. Wibawa et al.27 studied the combination of homomorphic encryption and federated learning for COVID-19 identification which made practical the preservation of confidentiality neural networks concerning the realworld deployment of medical images. Their study showed that although the encryption does take some additional computational time, the confidentiality preservation benefit outweighs the additional overhead cost in the sensitive deployment of medical images. Other privacy protection methods that do not involve encryption have also been developed. Yi et al.28 studied double random phase encoding to achieve privacy-preserving image classification and highlighted the potential of transformation techniques to secure sensitive medical images and still perform classification. Their findings showed that privacy protection can be achieved through thoughtfully designed image perturbation methods that do not meaningfully impair the performance of the model, thus providing a less energy costly alternative to heavily encryption based methods.
Wang et al.29 research on the priority classification of patient health data that preserves privacy for remote healthcare applications contributes to the literature on the subject. The practical difficulties of implementing a safe level distributed AI system for a pharmaceutical class can be resolved by integrating privacy-preserving techniques into healthcare comprehensive information systems, according to research. Their research findings emphasize the need for end-to-end data privacy protection for AI Medical applications, indicating the need for full comprehensive protection models, securing data at all points in the cycle while processing them. Ito et al.30 used differential privacy and image transformation networks to create image privacy-secured images and demonstrated the potential application of differential privacy to tasks involving medially relevant images. Their work demonstrated that precise tuned implementation of noisy data can create formal privacy guarantees and maintain sufficient utility of data for informative machine learning tasks. The research highlighted the trade-offs between model performance and privacy and proposed a practical application of differential privacy in medical AI systems.
Saha et al.31 introduced Lung-AttNet, a lightweight CNN architecture enhanced with a Lightweight Global Attention Module (LGAM) for multi-class lung cancer classification from CT scans. Their model captures feature dependencies across channel and spatial dimensions to distinguish between adenocarcinoma, large cell carcinoma, squamous cell carcinoma, and normal tissue. Evaluated on the Kaggle CT scan dataset, Lung-AttNet achieved 91.5% accuracy in centralized settings and maintained 92% accuracy when deployed in a Federated Learning framework with 2-3 clients, demonstrating robust performance while preserving medical data privacy through decentralized weight aggregation rather than raw data sharing. Lin et al.32 proposed a privacy-preserving federated learning framework for skin cancer diagnosis that addresses data heterogeneity and gradient leakage through Fully Homomorphic Encryption (FHE). Their framework integrates an FHE-enabled Stochastic Controlled Averaging variant with layer-wise Packed FHE for efficient encrypted model aggregation, coupled with a lightweight FHE-Friendly DNN architecture featuring a DO-EncConv module. Experimental evaluation on HAM10000 and ISIC2019 datasets demonstrated F1-Score improvements of 2.2% and 4.0% over baseline federated learning approaches, while achieving communication overhead reductions of 94.85% and 93.48% with encrypted inference completed in 17.8 seconds per sample and less than 2% accuracy degradation compared to centralized models.
A recent study synthesis focuses on the rapid progress that is being achieved in a specific research topic at the junction of automated medical diagnosis, unique federated learning frameworks, privacy-preserving approaches, and machine learning architectural improvements. Collaborations between attention-enhanced convolutional neural networks and federated learning systems represent a highly promising strategy to reconcile the trade-off between diagnostic accuracy and patient privacy; however, there are some research gaps and limitations in their study. Prior methodologies can be described as focusing on accuracy without privacy, privacy and inefficiency, or lack of explainability. Our framework incorporates privacy-preserving federated learning, a lightweight CNN with attention mechanisms, explainability, and advanced weighted aggregation to heterogeneous data to provide unambiguous, accurate, clinically validated and explainable models for leukemia classification. After reviewing the literature, the following research gaps and limitations can be identified:
Existing CNN-based methods achieve considerable precision in leukemia classification; the absence of federated learning frameworks specifically designed for leukemia diagnosis hinders cross-institutional scalability.
The potential for collaboration in federated learning for diagnostic imaging is documented, but the absence of lightweight models with attention mechanisms to focus on nuanced hematologic features for diagnosis remains.
The use of privacy-preserving methods (homomorphic encryption, secure multiparty computation, and differential privacy) may enhance privacy, but the associated computational burdens will likely negatively impact the diagnosis.
Data obfuscation and perturbation methods will decouple sensitive data from its context, but the potential for real-world integration of these methods remains untapped in federated learning.
The lack of attention to explainability is evident in most studies. There is a lack of studies that employ visualization techniques (e.g., attention maps, Grad-CAM heatmaps, and confidence distributions) to align the model output with clinical features in the diagnosis.
Federated learning for leukemia classification
The federated learning framework focused on classification of leukemia integrates methodologies aimed at solving the problem of high classification accuracy across the 4 leukaemia subtypes: Acute Lymphoblastic Leukemia (ALL), Acute Myeloid Leukemia (AML), Chronic Lymphocytic Leukemia (CLL) and Chronic Myeloid Leukemia (CML), and premises the problem of patient data privacy across multiple medical institutions. In this section, we describe data preprocessing and distribution, model architectural innovations and attention mechanism, the federated learning framework, the evaluation strategies, and the details of implementation. A general idea of the research work is presented in Fig. 1.
Fig. 1.
Block diagram of the proposed federated learning methodology for leukemia classification.
Data preprocessing and client distribution
In the initial phase of the outlined methodology, the preparation of medical imaging data is carried out for federated learning to eliminate inconsistencies related to the integration of deep learning models. The dataset comprises RGB images of leukemia cells, and each of the images is assigned a label corresponding to one of the four classes of leukemia: ALL, AML, CLL, and CML. In order to achieve the required standardization for the convolutional neural network (CNN), the images were resized to a standard dimension of 64x64 pixels using blurring bilinear interpolation to retain the important morphological details, in particular the nuclear shape and cell texture. Pixel intensities were also normalized to the [0, 1] range to facilitate more stable gradient calculation during model training by dividing the pixel values by 255.
This type of preprocessing can be described as
![]() |
1 |
where
denotes the image in raw RGB format while
describes the image after normalization.
In order to mirror a realistic federated learning setting where the data is distributed as non-independent and identically distributed (non-IID), the dataset is distributed over
clients (i.e. 3 clients as 3 different medical institutions). Each client
receives a local data set
where
is the corresponding image, while
is the class label for ALL, AML, CLL and CML, respectively. The dataset has a total of
samples, and thus a client is assigned approximately N/C samples. The variation in class distributions is made to capture heterogeneity observed in practice, as shown in the histogram of class distributions (Fig. 7). For instance, one client may contain a larger number of ALL samples while another is likely to contain more CML samples. The demographic and clinical patterns of the patients and the associated institutional specialization may be responsible for this type of variation.
Fig. 7.
Client wise performance.
In order to carry out effective training and evaluation, all client data is partitioned into training and validation sets with an 80:20 ratio, and stratified sampling, when possible, is used to keep class proportions constant:
![]() |
2 |
Clients with little data (
) have the whole dataset used for training, while a small subset is duplicated to monitor performance during validation. The distribution of data between clients, including class imbalance, is documented and analyzed to understand the implications of non-IID data on the performance of the model. The image preprocessing pipeline designed in Python, with the Imaging Library (PIL) and NumPy, is focused on efficient image transformation and loading, while correcting for issues like corrupted files and varying image formats.
Analysis and impact of non-IID data distribution
To thoroughly analyze the effect of non-IID data distributions on the training dynamics, convergence, and fairness of the proposed federated framework, we study inter-client heterogeneity in a structured manner. Let
be the local dataset of client c. We analyze pairwise cross-client data heterogeneity using Jensen-Shannon Divergence (JSD) to measure the divergence of class distributions.
![]() |
3 |
where
represents the Kullback–Leibler divergence. We obtained JSD values from a pair of clients between 0.18 and 0.27, indicating the presence of moderate to high heterogeneity, which is real-world data heterogeneity in multi-institutional clinical settings. We analyze the impact of non-IID distributions on fairness using variance on the accuracies of the clients:
![]() |
4 |
where
, is the accuracy of client c, and
is the mean accuracy of clients. We performed several experiments to measure
, and in each case, we found a very small value of
, which means within the heterogeneous data distributions, there was equitable learning.
Model architecture
The architecture of the CNN has been configured to see discriminative feature extraction for leukemia classification whilst integrating a minimal attention mechanism to hone in on diagnostically important areas of interest like the nucleus form and cell outlines. The model takes as input images
and performs operations consisting of several layers of stacked convolutional, normalization, grouping and attention, and a classifier as the last layer. This explains the movement of the data through the different components. The initial part of the model consists of a convolutional layer applying 16 filters of size
with the same padding, followed by batch normalization and the ReLU activation function. The first hidden layer is thus defined as:
![]() |
5 |
where
and
are weights and biases, and
is the convolution operator. Batch normalization helps stabilize training by normalizing the activations as seen in the equation below:
![]() |
6 |
where
and
are the mean and variance of the mini batch,
and
are trainable parameters, and
is added to avoid division by zero. The maximum pooling layer with a
kernel reduces the spatial dimensions to
, thus halving the computational effort while maintaining the important structural features of the input. The lightweight attention layer observed in Fig. 2 is the model’s novel component, which significantly improves the model’s ability to concentrate on relevant features.
Fig. 2.
Illustration of the attention mechanism in the convolutional neural network, highlighting how it focuses on diagnostically relevant features in leukemia cell images for enhanced classification accuracy.
For an attention mechanism and input feature map
, a 1x1 convolution projection is implemented as follows to preserve channel dimensions:
![]() |
7 |
The projected feature map is split into M, or 4, attention heads with dimensions
. Attention weights are calculated by averaging the values of the feature map
, across spatial dimensions, applying the sigmoid activation, and then scaling to counter the gradient of vanish:
![]() |
8 |
where
is the sigmoid,
is the projected feature map, and
. These weights are reshaped to
and applied to the input:
![]() |
9 |
This mechanism is justified by its lightweight design, which captures long-range dependencies efficiently without the quadratic complexity of full self-attention, making it suitable for medical imaging tasks. It is adapted from channel attention modules like SE-Net and implemented in TensorFlow using Conv2D for projection, GlobalAveragePooling2D for spatial averaging, sigmoid activation, and tensor reshaping for multi-head processing, achieving low inference time of 0.14s per batch. This mechanism allows the model to focus on distinguishing leukemia-type chromatin pattern features such as AML versus ALL. The following layers consist of two additional convolutional blocks with 32 and 64 filters, respectively, followed by batch normalization, ReLU activation, and max-pooling, compressing the feature map down to
. A residual connection improves gradient flow by summing a
convolution of the input to the output of the third convolutional block:
![]() |
10 |
Global average pooling produces a 64-dimensional vector from the feature map, which is then fed into a dense layer with 64 units, followed by ReLU activation, and a 0.5 dropout layer for overfitting prevention. The last dense layer produces class probabilities through softmax activation:
![]() |
11 |
The model is trained with the Adam optimizer using a learning rate of 0.001, and the loss function is sparse categorical cross-entropy:
![]() |
12 |
where
is the predicted probability of the true class. The model architecture was designed to find a balance between computational efficiency and the ability to express complex functions. It is therefore a good candidate for federated learning with resource-constrained medical institutions.
Federated learning framework
The federated learning framework employs Weighted Federated Averaging (FedAvg) to train a global model collaboratively between
clients without sharing raw patient data. The process, illustrated in Fig. 3, involves
communication rounds, with each round comprising local training, weight aggregation, and global model updates.
Fig. 3.
Diagram depicting the federated learning framework, showcasing the interaction between local medical institutions and the central aggregation server for privacy-preserving leukemia classification.
At the beginning of the r-th round (
), the global model with weights
is sent to the clients. Each client c creates a local model with weight
and trains it using mini-batch stochastic gradient descent (SGD) for 5 epochs in their data set
with a batch size
and for a total of
epochs. The local loss is given by:
![]() |
13 |
where
is the cross-entropy loss for the sample
and
is the size of the local data
. The local weight update is given by:
![]() |
14 |
where
is the learning rate. The gradient is calculated on mini-batches by:
![]() |
15 |
For each client, the gradient norm is calculated in order to observe the stability of the training. This is given by:
![]() |
16 |
where
are the trainable parameters of the model. The norms of the gradients are plotted in Fig. 9 to show the convergence characteristics of clients who receive different data distributions.
Fig. 9.

Precision-recall analysis.
Upon completion of local training, each client transmits updated weights
alongside the dataset size
for aggregation at the central server. The server employs the FedAvg algorithm for weight aggregation as follows:
![]() |
17 |
where
. This weighted aggregation technique accounts for data disproportion; it ensures that more sizable datasets dominate the global model’s training, thus amplifying the model’s robustness to data heterogeneity. The aggregation procedure is illustrated in Fig. 3, which depicts the communication flow between the clients and the server. To manage server memory in the cloud, client model data is wiped after each iteration, ensuring optimal utilization of available resources.
Evaluation metrics
A global model, like client models, is subjected to the same extensive metrics for a consolidated and equitable evaluation between institutions. The metrics encompass precision, recall, F1 score, specificity, Matthews’ correlation coefficient (MCC), area under the receiver operating characteristic curve (AUC-ROC) and, of course, accuracy. The metrics are computed on a unified validation set, which is the result of validation data from all clients, thereby ensuring representative evaluation.
Let us consider accuracy, for example:
![]() |
18 |
Here, N is the total number of samples (data points), and
and
denote the predicted and true (ground-truth) labels of sample i-th, respectively. The function
is an indicator function equal to one if
and zero otherwise. Therefore, the value of the numerator
is the total number of samples that were correctly classified. This is divided by N to obtain precision, which is the ratio of correctly predicted samples to the total number of samples. To measure performance class-by-class, the precision, recall, and F1 score are calculated per class. To illustrate, for class k, these metrics are computed as follows.
![]() |
19 |
where
,
,
are true positives, false positives, and false negatives for class k, respectively. The false negative rate is complimented by the negative rate as expressed by
![]() |
20 |
and the balanced measure of classification quality is expressed by
![]() |
21 |
The AUC-ROC curve assesses the model’s capability in class discrimination. Although the confusion matrix exhibits the classification mistakes in detail, the class-wise metrics diagnose the performance discrepancies with respect to the various types of leukemia. Fairness of every client’s performance is evaluated, focusing on statistical measures (mean and standard deviation of accuracy) related to performance symmetry.
An all-encompassing assessment is without a doubt the best analysis when it incorporates a discussion of performance-impacting class imbalances relative to the data distribution. The estimate of the client accuracies 95% confidence interval is expressed as follows:
![]() |
22 |
where
and
refer to the mean and standard deviation of the accuracy of the client’s data. This further reinforces the statistical pragmatism of performance assessment.
Technical implementation
The implementation of the framework uses TensorFlow 2.x, GPU acceleration, the Python Imaging Library (PIL, and NumPy for array manipulation. Datasets undergo checks for corrupted images, and RGB images are processed. For the federated learning task, three clients are simulated along with the classification of the leukemia dataset, by which the heterogeneity of the data as encountered in real life is mirrored.
Clients conduct training with
rounds in which each client spends
epochs per round for training, detailed in Table 1. The global model performs FedAvg updates and resets to new random weights. Model weights for deployment are saved in HDF5 format. Training is gauged for stability with convergence of loss and validation accuracy, and optimized by tracking the gradient norms.
Table 1.
Training configuration summary.
| Parameter | Value |
|---|---|
| Total Clients | 3 |
| Federated Rounds | 10 |
| Epochs per Client | 5 |
| Total Dataset Size | 3,256 images |
| Train/Validation Split | 80/20 |
| Model Architecture | CNN (25 weight tensors) |
| Hardware | 1 GPU with memory growth |
In the evaluation pipeline, we assess, analyze, and compare client performance, global model performance, and data attribute distribution. The framework uses weighted aggregation relative to the data sizes to manage the impact of non-IID data. Anticipating deployment in resource-constrained medical settings, the system is also designed with the potential to scale by adding more clients and classes.
Algorithm 1.
Federated learning framework for leukemia classification.
Results and interpretation
This section details and interprets the experimental results, starting with a description of the data set and its distribution among clients, and is followed by the performance results of the proposed framework. Explainability and confidence calibration, as proposed in the section, are assessed to assess the trustworthiness of the model from a clinical and reliability perspective. Lastly, a comprehensive discussion relates these results to the literature and presents their potential impact.
Dataset description
This study uses a dataset developed in the bone marrow lab of Taleqani Hospital in Tehran, Iran. The dataset consists of 3,256 peripheral blood smear (PBS) images from 89 patients suspected of acute lymphoblastic leukemia (ALL) and is a foundational resource for developing a federated learning framework for privacy-preserving and accurate classification of leukemia. The dataset images were prepared and stained by qualified lab specialists and were taken with a Zeiss camera at 100x microscope magnification. The images were saved in JPG format, with the cellular features more clearly visible in segmented versions saved using the HSV color space. The Dataset focuses on four types of conditions i.e., (Benign, Early, Pre, Pro). The dataset can be accessed from33 and this dataset is designed to help the framework learn and deal with real-case scenarios in the clinic, such as unbalanced class distribution. This will enable the framework to solidly classify ALL subtypes and help detect early leukemia in multiple health infrastructures while ensuring the privacy of patient background information.
Acquired results
The results obtained show that the federated learning framework implemented for the attention-enhanced convolutional neural network (CNN) model during the classification of leukemia achieves excellent performance in the four different types of leukemia evaluated in three simulated medical institutions. These results, which are consolidated across multiple figures (Figs. 4, 5, 6, 7, 8, 9, 10 and 11) and tables (Tables 1, 2, 3, 4, 5, 6 and 7), showcase the versatility, soundness and the model’s ability to provide classification with respect to patient privacy, even when dealing with non-IID distributions of the dataset. This interpretation seeks to coordinate the elucidation of the figures so that the various insights regarding strengths, weaknesses, and clinical usefulness of the model, along with a reasoned performance analysis that includes the distributions of data across different medical establishments, the classification results, the convergence pattern, and the convergence demonstrated with respect to privacy.
Fig. 4.
Model prediction By class.
Fig. 5.
Confusion matrices for different clients and global model.
Fig. 6.
Federated learning performance analysis.
Fig. 8.

Clients performance heatmap.
Fig. 10.

F1 score by ranking class.
Fig. 11.

Pie chart of class support distribution.
Table 2.
Dataset distribution across federated clients.
| Client | Total samples | Benign | Early | Pre | Pro |
|---|---|---|---|---|---|
| Client 1 | 1085 | 176 (16.2%) | 325 (30.0%) | 330 (30.4%) | 254 (23.4%) |
| Client 2 | 1085 | 166 (15.3%) | 329 (30.3%) | 313 (28.8%) | 277 (25.5%) |
| Client 3 | 1086 | 162 (14.9%) | 331 (30.5%) | 320 (29.5%) | 273 (25.1%) |
| Total | 3256 | 504 (15.5%) | 985 (30.3%) | 963 (29.6%) | 804 (24.7%) |
Table 3.
Classification performance by leukemia type.
| Class | Precision | Recall | F1-Score | Support | Accuracy |
|---|---|---|---|---|---|
| Benign | 0.90 | 0.85 | 0.87 | 151 | – |
| Early | 0.94 | 0.95 | 0.95 | 296 | – |
| Pre | 0.97 | 0.99 | 0.98 | 289 | – |
| Pro | 1.00 | 0.99 | 0.99 | 241 | – |
| Macro average | 0.95 | 0.95 | 0.95 | 977 | 0.96 |
| Weighted average | 0.96 | 0.96 | 0.96 | 977 | 0.96 |
Table 4.
Training progress by federated learning rounds.
| Round | Global model loss | Global model accuracy | Training status |
|---|---|---|---|
| 1 | 0.5172 | 0.8618 | Initial training |
| 2 | 1.7244 | 0.5346 | Temporary degradation |
| 3 | 0.2145 | 0.9332 | Significant improvement |
| 4 | 0.1987 | 0.9401 | Continued improvement |
| 5 | 0.1823 | 0.9445 | Steady progress |
| 6 | 0.1756 | 0.9467 | Gradual convergence |
| 7 | 0.1698 | 0.9481 | Approaching optimum |
| 8 | 0.1642 | 0.9488 | Fine-tuning |
| 9 | 0.1591 | 0.9491 | Near convergence |
| 10 | 0.2517 | 0.9493 | Final convergence |
Table 5.
Statistical summary of client performance.
| Statistic | Value |
|---|---|
| Mean client accuracy | 0.9585 |
| Standard deviation | 0.0076 |
| Minimum accuracy | 0.9502 |
| Maximum accuracy | 0.9687 |
| 95% confidence interval | ±0.0086 |
Table 6.
Federated learning performance comparison.
| Model/client | Accuracy | Loss | Precision | Recall | F1-score | Samples |
|---|---|---|---|---|---|---|
| Global model | 0.9570 | 0.2281 | 0.9566 | 0.9570 | 0.9566 | 3256 |
| Client 1 | 0.9502 | 0.2553 | 0.9507 | 0.9502 | 0.9504 | 1085 |
| Client 2 | 0.9687 | 0.1657 | 0.9685 | 0.9687 | 0.9685 | 1085 |
| Client 3 | 0.9567 | 0.2485 | 0.9567 | 0.9567 | 0.9565 | 1086 |
Table 7.
Global model performance on test set.
| Metric | Value |
|---|---|
| Test Samples | 977 |
| Test Loss | 0.2281 |
| Test Accuracy | 0.9570 |
| Overall Accuracy | 95.70% |
Examining the structure of the dataset is the next step in this analysis. The distribution of the 3,256 images is represented in four classes, Early (30.3%, 985 samples), Pre (29.6%, 963 samples), Pro (24.7%, 804 samples), and Benign (15.5%, 504 samples), as shown in Fig. 4 and Table 2. The initial distribution of the dataset is fairly balanced and captures the basic structure of the dataset. The dominant classes may affect the model’s performance negatively, especially in the case of the benign class, which is less represented and more critical for the dataset’s completeness with regard to real-world scenarios.
The global model accuracy of 95.70% is positive but shows room for improvement. The attention-enhanced CNN is good at identifying relevant features, but there is no mention of where it is calibrated. The description is vague when identifying ‘all’ features due to the accuracy of the model. The FedAvg algorithm should be calibrated better to extremes in the class distributions to focus more explicitly on the model over tuning on dominant classes. Maybe there should be curated class size distributions. The model performance is limited due to class size distributions and benign samples that are morphologically not nuanced. Overall, there could be better-defined parameters for more advanced class reliability, or even advanced models. For screening purposes, identifying non-leukemic cases is the most clinically important aspect, but it sounds like the model reliability is below expectation.
The assessment of the classification performance is illustrated in Fig. 5, which includes the confusion matrices for Clients 1, 2, 3, and the global model, allowing for a detailed assessment of the model’s discernment of the various kinds of leukemia. The global model’s confusion matrix in Fig. 5 illustrates robust values along the diagonal which indicates a high level of classification accuracy and minimal misclassification, which is consistent with the reported 95.70% accuracy. Figure 5 integrates client-specific matrices, which illustrates subtle variations in performance, with Client 2 attaining the highest accuracy (96.87%) and lowest loss (0.1657), while Client 3 (95.67%, 0.2483 loss) and Client 1 (95.02%, 0.2953 loss) follow in succession as illustrated in Table 3.
These matrices illustrate the extent to which the model’s performances are consistent with variations in data distributions, implying the weighted FedAvg algorithm efficiently balances the discordant contributions from multiple clients. Other noteworthy remarks can be made. First, all the matrices show strong diagonal dominance, which reinforces the fact that the model maintains high levels of classification accuracy across all the subtypes of leukemia, confirming that the proposed attention-enhanced CNN is not only robust, but also generalizes efficiently across distinct and multiple clients. Secondly, the most pronounced instances of misclassification occur between the Benign and Early classes, most notably in Client 1 5a and Client 3 5c. For instance, in Client 1, there are 16 benign cases incorrectly predicted as early, and 25 early cases incorrectly predicted as benign, illustrating the fine morphological confluence between the categories. This is clinically not surprising, as benign hematogones and early leukemic blasts have been reported to possess closely similar nuclear morphology.
Pre and Pro classes also show similarly high separability across all the clients for the malignant subtypes. In the global model (Fig. 5d), Pre and Pro classes are nearly perfectly classified and exhibit only slight cross class confusion, which confirms that the attention mechanism is able to capture discriminative features at the nuclear and cytoplasmic levels. Finally, despite the fact that the local data distributions are non-IID, the global model exhibits more balanced error patterns across clients than any individual client, which highlights the stabilizing and fairness-enhancing benefits of weighted federated averaging.
The analysis shifts to Fig. 6, which contains four interrelated components describing various perspectives on the flexibility of the framework: overall global model performance, client-wise accuracy, sample distribution, and class-wise performance. Figure 6a, demonstrating the global model performance, illustrates the accuracy and loss during the course of the 10 rounds of federated learning and describes the progress from Round 1 with 86.18% accuracy and 0.5172 loss to 94.93% accuracy and 0.2517 loss in Round 10, as presented in Table 4.
A closer examination of Round 2 loss value of 1.7244, presented in Fig. 6a, indicated possible convergence difficulties due to the non-IID data. Beginning at Round 3, loss value decreased to 0.3123, suggesting that the weighted FedAvg algorithm is starting to converge. This convergence also suggests that the model performed well in the integration of the varied contributions of the clients to exhibit near-optimal model performance. The focus of Fig. 6b on client accuracy also corresponds with the data in Table 5 wherein Client 2 is compared with Client 1 (precision 95.02%, training accuracy 0.9827) and Client 3 (95.67%, training accuracy 0.9896) and was noted for superior performance (precision 96.87%). The value of the standard deviation for the client accuracies (0.0076) reinforces system equity, a necessary component for clinical integration, for these systems to prevent any one client from monopolizing the global model.
To quantify fairness across heterogeneous clients, we analyze both accuracy dispersion and convergence synchronization. As shown in Table 5, the mean client accuracy is 95.85% with a low standard deviation of 0.76%, yielding a 95% confidence interval of
. This narrow dispersion demonstrates that the federated model does not favor any institution, even when trained on skewed data distributions. Furthermore, trajectories across clients remain closely aligned, indicating that non-IID data does not introduce persistent optimization imbalance.
The sample distribution is illustrated in Fig. 6c. This reiterates the non-IID nature of the data with differing class proportions across clients (e.g., Client 1 has 16.7% Benign while Client 3 has 14.8%). However, the model retains high precision. This suggests that attention-enhanced CNN is able to effectively generalize across heterogeneous datasets. Fig. 6d on class performance is consistent with Table 6, which reports high F1 scores for Pro (0.99), Pre (0.98) and Early (0.95), while Benign (0.87) lags due to fewer samples. Performance in classes, especially malignant types, left no doubt about the clinical relevance of the model, even if the lower Benign F1 score points to the need for improvements in this area.
Performance evaluation at the client level is shown to be true in Fig. 7, which possibly visualizes the performance metrics (accuracy and loss) for each client and highlights the better performance of Client 2 while Client 1 is slightly below. The alignment in performance across clients (mean accuracy of 0.9585) certainly points to the impartiality of the system; nevertheless, the low validation accuracy of Client 2 (0.2963) is an outlier and indicative of possible overfitting, or flaws in the validation set, for instance, inadequate sample size or a class imbalance. Such issues and the resulting discrepancies, as presented in Fig. 7, should be looked at as qualifying or invalidating the model in real-world applications for Client 2, as the model will not be reliable. In Fig. 8, the performance metrics between clients and classes are represented in a consolidated form, with the precision metrics defined (0.9567–0.9685) and the F1 score (0.9504–0.9685) suggesting the overall performance excellence. Figure 8 possibly points out the edge of Client 2 dominance, particularly with respect to the Pro and Pre classes having more support. Such visualizations can certainly be used as evidence for the system’s fairness and consistency, as the slight differences in performance can be attributed to challenges around non-IID data, not a systemic bias. However, Fig. 8 could also suggest class-specific deficiencies, such as the Benign section, suggesting an explicit need to address the representation of the minority class in any form.
Precision-recall analysis explains the model performance in clear manner, understanding how a model balances false positives and false negatives that are very important in the medical field and that are important in the medical field. As seen in Table 6, the precision and recall of the metrics are very high (within class 0.90-1.00 and 0.85-0.99), confirming that the balance trade-off is more than positive, which is mainly attributed to the performance of the Pro class (1.00 precision, 0.99 recall) which is attributed to its strong representativeness (804 samples). The lower recall of the benign class (0.85), as shown in Fig. 9, indicates more difficulty in detecting positive cases that could be linked to its lower representativeness (594 samples). Figure 9 particularly confirms the reliability of the model in clinical applications for malignant class instances where prompt diagnosis is critical. However, the low recall for Benign could lead to missed non-leukemic cases in screening whereby feature extraction or class-weighted loss functions are likely to lead to better model performance.
The depiction of the F1 score by class in Fig. 10, perhaps as a bar or ranking plot, elucidates the performance trends by class described in Table 6. The F1 score results illustrated in Fig. 10 highlight the classifying strength of the model, particularly motivated by the attention mechanism focusing on nuclear morphology and cell boundaries, due to the overwhelming model performance on the Pro (0.99), Pre (0.98), and Early (0.95) categories as opposed to the Benign (0.87) category. The significant malignant class diagnostic accuracy, as illustrated in Fig. 10 supports the model diagnostic claim, albeit the Benign score of F1 suggests class bias toward the Benign class. The imbalance, reflective of world datasets, could influence the model in the screening context, suggesting techniques such as oversampling or novel attention class mechanisms could be employed to boost performance on the minority classes. Table 7 presents the global model performance in the test set, demonstrating a commendable test accuracy of 95.70%, highlighting the effectiveness of the model in handling the provided samples.
Figure 11 pie chart showing the distribution of class support corresponds to Fig. 4 and Table 2 that describe the distribution of support among the Early (30.3%), Pre (29.6%), Pro (24.7%) and Ign (15.5%) classes. The proportions confirmed that the Early and Pre classes together comprised more than 50% of the support. The heterogeneity of the dataset accounts for the accuracy of the model of 95.70% achieved despite the inequality in class representation. The weighted FedAvg algorithm successfully mitigated the imbalanced contributions to the model and prevented the Early and Pre classes from overwhelming the model support. Regarding the utility of the model for non-sensitive nonleukemic cases, the weakest performance of the model in the benign class, as described in Fig. 11, is particularly concerning.
Explainability and confidence calibration in federated model
To enhance the interpretability of our attention-enhanced CNN within the federated learning framework, we incorporate visualization techniques that elucidate the model’s decision-making process for leukemia cell classification across benign, early, pre, and pro categories.
The attention maps are paired with original images, explaining the more attention focusing on key features, particularly nuclear and cytoplasmic abnormalities. This shows that even in a privacy-preserving federated setting the model can capture intricate details. The attention maps in Fig. 12 show that the model is selective in diagnostically important features such as nuclear dysmorphism and cytoplasmic irregularities, with the attention focused on aberrant cells of the pre- and pro-classes, while benign samples present diffuse lower attention patterns, indicating the model’s ability to capture long-range patterns even when data are not centralized. This is further strengthened by the Grad-CAM technique. Figure 13 contains the gradient-based saliency visualization that shows the diagnostically important characteristics of the distributed data and confirms the predictions of the model in the pro samples (e.g., clustered promyelocytes) and benign samples that lack anomalies by providing a perfect confidence score (e.g. 1.000) to reinforce the trust of the clinician and correlate with the key characteristics.
Fig. 12.
Attention maps from the attention-enhanced CNN for leukemia cell images in Benign, Pre, Early, and Pro classes.
Fig. 13.
Grad-CAM heatmaps and overlays for Benign and preleukemic cell samples, showing activation regions critical to predictions.
The original images consist of heatmaps colored red and yellow to indicate varying levels of importance as well as overlays with high-confidence scores (e.g. “Pred: Benign (1.000)” or “Pred: Pre (1.000)”). These visualizations help in interpreting the decisions made by the federated framework. In addition, the confidence distribution analyzes in Fig. 14 particularly highlight the robustness of the model in privacy-preserving settings: histogram (a) shows that in the 495 instances of correct predictions, most are concentrated in the high confidence range (0.9–1.0) and the 157 instances of incorrect predictions are spread out more and towards lower thresholds, indicating good calibration. In histogram (b), which breaks this down by true class, pro and pre samples dominate the peak confidence range while benign and early classes are more spread out, which shows the framework was effective in managing class imbalances across federated clients.
Fig. 14.
Confidence distributions for model predictions on the test set. (a) Histogram of Correct (Green, 495) vs. Incorrect (Red, 157) Predictions, with Correct Ones Peaking at 0.9–1.0 Confidence. (b) Class-specific Histogram: Benign (blue), Early (orange), Pre (green), Pro (red), Illustrating Calibration and Robustness Across Distributed Federated Data.
Evaluation across 5 clients
We evaluated the robustness and scalability of our federated learning framework by training it over 20 communication rounds with five clients and heterogeneous data distributions. This approach most closely resembles the real-world multi-institutional collaborations and communication efficiency and scalability challenges. For example, in the presence of more clients, the average communication overhead per round increased by 18% which is still feasible for clinical deployment considering the super light model (120K parameters). The framework’s positive attributes in the areas of accuracy, convergence, and security are highlighted by comparison with baselines and other competing methods. The ROC curves in Fig. 15 illustrate the model’s discriminatory power with almost perfect AUC across classes (Benign: 0.999, Early/Pre/Pro: 1.000), even with five clients who were distributed over different locations, and demonstrate the successful separation of the different subtypes of leukemia. The AUC results show that the model is able to maintain a clinically acceptable high true positive rate with only a small number of false positive to report. This shows that the framework is reliable for use in clinical diagnosis.
Fig. 15.
ROC curves for the four leukemia classes in the five-client federated evaluation. The curves illustrate the trade-off between true positive rate (sensitivity) and false positive rate (1-specificity) at various thresholds. High AUC values indicate strong model performance in distinguishing each class from others, with near-perfect discrimination for Early, Pre, and Pro classes.
Our attention-enhanced CNN model in the federated and centralized settings is compared to a non-attention baseline in Table 8. The federated attention model reaches an accuracy of 96.56% which is very close to centralized performance (97.20%) while maintaining privacy. This shows that effective knowledge is shared across the distributed data and that the attention mechanism is beneficial, yielding a 2.76% accuracy increase over non-attention federated training. Convergence in federated settings takes 20 rounds, which is indicative of the challenges introduced by non-IID data, yet is still quite efficient.
Table 8.
Comparison with baseline models.
| Model architecture | Training method |
Accuracy (%) | Parameters | Convergence | Privacy |
|---|---|---|---|---|---|
| CNN (Non-Attention) | Centralized | 94.25 | 85 | 15 | No |
| CNN (Non-Attention) | Federated | 93.80 | 85 | 20 | Yes |
| Attention-CNN | Centralized | 97.20 | 120 | 15 | No |
| Attention-CNN (Ours) | Federated | 96.56 | 120 | 20 | Yes |
In Table 9, FedAvg is evaluated against competing aggregation strategies. FedAvg achieved an accuracy of 96.56% making it one of the most accurate and fast converging methods. It effectively uses data-size weighting which balances the data heterogeneity. Although FedProx and Trimmed Mean have higher robustness, they come at a moderate computational cost. This makes FedAvg stand out in our case. However, it is possible that adaptive variants could improve stability in large-scale implementations.
Table 9.
Comparison of federated aggregation strategies.
| Aggregation method |
Accuracy (%) |
Convergence speed |
Robustness score |
Computation cost |
Key Characteristic |
|---|---|---|---|---|---|
| FedAvg | 96.56 | High | Medium | Low | Weighted by data size |
| FedAvgM | 96.32 | Medium | Medium | Low | Server momentum |
| FedProx | 95.88 | Medium | High | Medium | Proximal term ( ) |
| FedAdam | 96.18 | High | Medium | Medium | Adaptive optimization |
| Loss-weighted | 95.45 | Low | Low | High | Inverse loss weighting |
| Trimmed mean | 95.92 | Medium | High | Medium | Outlier robust (trim 20%) |
Significant values are in [bold].
Security evaluations in Table 10 show resilience against enhanced model poisoning attacks, including label flipping and backdoor injection, with up to 30% malicious clients. Multi-strategy defenses (e.g., Byzantine-robust aggregation, norm clipping, Multi-Krum) restore accuracy to 94.65%, effectively mitigating combined threats. This underscores the framework’s practical robustness, though integrating differential privacy or homomorphic encryption could provide formal guarantees against inference attacks in future iterations.
Table 10.
Enhanced model poisoning attack and multi-strategy defense.
| Scenario | Attack type | Malicious clients (%) |
Accuracy (%) |
Defense strategy |
Defense success |
|---|---|---|---|---|---|
| No Attack | – | 0 | 96.56 | – | – |
| Label flipping | Targeted | 20 | 72.34 | None | – |
| Label flipping | Targeted | 20 | 94.82 | Byzantine-robust | Yes |
| Gradient scaling | Untargeted | 20 | 68.15 | None | – |
| Gradient scaling | Untargeted | 20 | 95.23 | Norm clipping | Yes |
| Backdoor injection | Targeted | 20 | 95.10 (89.2)* | None | Partial |
| Backdoor injection | Targeted | 20 | 96.21 (12.5)* | Multi-Krum | Yes |
| Combined attack | Mixed | 30 | 61.88 | None | – |
| Combined attack | Mixed | 30 | 94.65 | Multi-defense | Yes |
*Backdoor success rate shown in parentheses.
Finally, Table 11 incorporates the TFL-DT trust evaluation scheme, achieving 96.35% accuracy with 91.3% malicious detection rate at a 0.65 threshold. Combining TFL-DT with multi-defense yields 96.48% accuracy and 95.7% detection, outperforming simpler reputation-based methods. This trust mechanism enhances scalability by dynamically weighting reliable clients, making the system more viable for expanded federated networks.
Table 11.
Trust-based federated learning with TFL-DT scheme.
| Trust mechanism | Accuracy (%) |
Malicious detection |
Trust score threshold |
Detection rate (%) |
|---|---|---|---|---|
| No trust system | 94.82 | Low | – | 45.2 |
| Reputation-based | 95.45 | Medium | 0.60 | 72.8 |
| History-based | 95.88 | Medium | 0.55 | 78.5 |
| TFL-DT (Ours) | 96.35 | High | 0.65 | 91.3 |
| TFL-DT + Multi-Defense | 96.48 | Very High | 0.70 | 95.7 |
Significant values are in [bold].
Communication cost analysis
An important aspect of the implementation of our federated framework is the communication costs which can be defined as the total amount of data transferred for the model updates as we vary the number of clients and rounds. Given the model is 33k parameters (which equates to 0.127 MB per update under float32 precision), costs increase linearly with clients and rounds under the assumption that there are bidirectional transfers (both uploads and downloads). Table 12 shows the analysis with these figures and other modest costs which are manageable with clinical networks.
Table 12.
Communication efficiency and scalability analysis.
| Number of clients |
Total comm. cost (MB) |
Bandwidth (Mbps) |
Convergence (Rounds) |
Accuracy (%) |
Training time (min) |
|---|---|---|---|---|---|
| 3 | 7.61 | 12.5 | 10 | 95.70 | 20 |
| 5 | 25.37 | 18.2 | 20 | 96.56 | 37 |
The baseline for 3 clients over 10 rounds incurs 7.61 MB, which is consistent with the manuscript’s setup and attaining 95.72% accuracy with the respective costs. With 5 clients and 20 rounds, the costs increase to 25.37 MB and accuracy remains high (96.56%), with the training time increasing accordingly due to the need for additional coordination. The framework is efficient and demonstrates the ability to provide privacy while performance is maintained.
Ablation study
We performed an ablation study over the federated setup with five clients and 20 rounds to determine the effect of individual components of our lightweight attention-enhanced CNN. Summary of results (incremental improvements in accuracy with individual components removed) can be found in Table 13.
Table 13.
Ablation study: impact of model components.
| Model configuration | Attention mechanism |
Batch norm | Dropout | Accuracy (%) |
Acc.(%) |
|---|---|---|---|---|---|
| Base CNN |
|
|
|
93.80 | – |
| + Attention |
|
|
|
95.45 | + 1.65 |
| + Attention + Enhanced BN |
|
|
|
96.12 | + 2.32 |
| Full Model (Ours) |
|
|
|
96.56 | + 2.76 |
| w/o Attention |
|
|
|
94.32 | – 2.24 |
| w/o Batch Norm |
|
|
|
92.18 | – 4.38 |
| w/o Dropout |
|
|
|
95.88 | – 0.68 |
Excluding any elements from the model would be unjust, as the base CNN without attention achieves an impressive 93.80% accuracy and serves as a base. Attention mechanisms were able to drive this number up to 95.45% (+1.65%) demonstrating its abilities to shift focus to the diagnostically important features, such as the nuclear morphology, even with a model distributed across the network. Further enhancements (adaptive scaling, etc.) to batch normalization yielded 96.12% (+2.32%) and improved its gradient stability for non-IID data. The fully completed model demonstrated the synergistic benefits of multiple elements and achieved 96.56% (+2.76%).
The importance of components can be seen from the impact of removing them. Accuracy drops to, 94.32% (-2.24%) without attention due to the loss of capturing long-range dependencies. The importance of the batch normalization can be seen in the dramatic drop in accuracy to 92.18% (-4.38%) when it is removed and its importance for convergence in federated systems. Accuracy would drop to 95.88% (-0.68%), confirming the use of dropout in the model, from a limited number of local data points.
The results of the ablation study show that the design of the model was purposeful and that a high level of accuracy was achieved with a relatively low level of components. The slight room for improvements indicate that the performance can be further improved.
Discussion
We leverage attention-enhanced CNN together with a weighted FedAvg method for the purpose of preserving patient privacy and achieving automated diagnosis. The platform allows collaborative training in three virtual medical institutions, reaching global accuracy of 95.70%, demonstrating efficiency equal to the centralized methods and being GDPR and HIPAA compliant. The attention mechanism augments the capacity of model to discover discriminative features,e.g., cell nuclei and boundaries—at locations over diverse imbalanced datasets of different leukemia types (ALL, AML, CLL, CML). Additionally, the weighted FedAvg algorithm also guarantees that institutions with different data sizes are fairly involved and this makes our strategy to be universally applicable even in both small and large-scale clinical centers.
The high stable performance of the framework within institutions indicates that it may be suitable as a practical system to support pathologists for collaborative diagnostics, enabling privacy-preserving case triage in real-time. Although performance is suboptimal for non-leukemic cases, as a result of data imbalance, improvements through more sophisticated attention mechanisms or through data augmentation could alleviate this issue. Minor inconsistencies in the validation indicate that more sophisticated methods, such as cross-client validation, are necessary; and stronger privacy tools, such as differential privacy, would improve trustworthiness further. With these changes, the framework can potentially be generalized and scaled for multi-institutional use as well as extended to wider medical imaging applications such as detection of cancer, ocular diseases, etc. These elements of the framework show the possibilities of the future of privacy-preserving AI-based diagnostics and AI assistance at the bedside for clinicians around the world. Moreover, the model’s computational details can be found in Table 14. It can be observed that the lightweight architecture configuration remains stable across different attention heads because of identical 1
1 convolutions across all heads. Moreover, the flops are also considerably smaller then normal attention mechanisms which allow for a feasible integration with edge and other light-weight devices for practical use case and efficient deployment.
Table 14.
Computational comparison of CNN variants with and without lightweight attention using different head counts.
| Model variant | Params | FLOPs (MFLOPs) | Train time (s/batch) | Inference time (s/batch) | Memory (MB) |
|---|---|---|---|---|---|
| Baseline (No Attention) | 33002 | 93.64 | 3.55 | 0.31 | 0.88 |
| Attention (2 Heads) | 33258 | 95.87 | 2.72 | 0.22 | 0.90 |
| Attention (4 Heads) | 33258 | 95.87 | 1.46 | 0.23 | 0.90 |
| Attention (8 Heads) | 33258 | 95.87 | 1.34 | 0.14 | 0.90 |
To conclude, the federal learning system constitutes an AI breakthrough in the classification of leukemia, proving remarkable success in accuracy and equity in the classification while preserving patient privacy. The ability of the system to manage heterogeneous datasets and maintain a consistent performance is a pivotal asset for clinical collaborations, particularly in instances where privacy is prioritized. Improvements in the performance of the targeted classes of the underrepresented classes, focusing on consistency during validation and within the limits of the system, will transform the diagnostics of countless other conditions. This exemplifies the expanding role of AI in the healthcare sector as a trusted and integrated partner.
Conclusion
In this research study, we focus mainly on the development of a federated learning framework that provides the necessary secure data environment that allows multiple medical establishments to jointly train convolutional neural networks with attention mechanisms for leukemia classification. This framework performs well on multiple types of leukemia, demonstrating strong clinical reliability and usability. The framework meets practical cellular classification needs in the clinic because weighted federated averaging meets the goal of incorporating diverse knowledge from disparate datasets while ensuring data sovereignty.
The system certainly has shortcomings that are largely the result of the lack of limits set on communication costs or that the performance of the system in underrepresented leukemia subtypes may be negatively affected by class imbalance. Future research should focus on the communication efficiency of scalable systems located in larger institutional networks. In addition, system practical usability will be improved by incorporating advanced methods of synthetic oversampling, consulting with clinicians to improve system usability and system functionality. This will expand the application to medical imaging and promote the development of collaborative, privacy-preserving AI systems in the diagnostic area of affiliate imaging.
Author contributions
The authors confirm their contribution to the paper as follows: Conceptualization: MZA,NAK, and AJ; Methodology: MZA, NAK, and AJ; Software: PS, LR; Validation: AJ, PS; Formal analysis, MZA, and NAK; Investigation: MZA, PS; Resources: LR; Data Curation: MZA and NAK; Writing—original draft preparation: MZA,NAK, and PS; writing—review and editing: AJ and PS; Visualization: MZA; Supervision: LR; Project administration: AJ and LR; Funding acquisition: LR. All authors reviewed the results and approved the final version of the manuscript.
Funding
This article has been produced with the financial support of the European Union under the LERCO project number
via the Operational Programme Just Transition. This work was also supported by the Ministry of Education, Youth and Sports of the Czech Republic through the e-INFRA CZ (ID:90254).
Data availability
The dataset used in this study is publicly available on Kaggle and was provided by Aria, M., Ghaderzadeh, M., Bashash, D., Abolghasemi, H., Asadi, F., and Hosseini, A. (2021). It is titled Acute Lymphoblastic Leukemia (ALL) Image Dataset and can be accessed via the following DOI:10.34740/KAGGLE/DSV/2175623.
Competing interests
The authors declare that they have no conflicts of interest to report regarding the present study.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Obeagu, E. I. Revolutionizing hematological disorder diagnosis: unraveling the role of artificial intelligence. Ann. Med. Surg.87(6), 3445–3457 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Haque, R. et al. Advancing early leukemia diagnostics: a comprehensive study incorporating image processing and transfer learning. Bio. Med. Inf.4(2), 966–991 (2024). [Google Scholar]
- 3.Kaissis, G. A., Makowski, M. R., Rückert, D. & Braren, R. F. Secure, privacy-preserving and federated machine learning in medical imaging. Nat. Mach. Intell.2(6), 305–311 (2020). [Google Scholar]
- 4.Li, T., Sahu, A. K., Talwalkar, A. & Smith, V. Federated learning: challenges, methods, and future directions. IEEE Signal Process. Mag.37(3), 50–60 (2020). [Google Scholar]
- 5.Sam, K., Nawaz, S. & Vavekanand, R. CardioMix: a multimodal image-based classification pipeline for enhanced ECG diagnosis. Med. Data Min.8(1), 6 (2025). [Google Scholar]
- 6.Vavekanand, R., Sam, K., Kumar, S. & Kumar, T. Cardiacnet: a neural networks based heartbeat classifications using ecg signals. Stud. Med. Health Sci.1(2), 1–17 (2024). [Google Scholar]
- 7.Vavekanand, R., Kumar, G. & Kurbanova, S. A lightweight physics-conditioned diffusion multi-model for medical image reconstruction. Biomed. Eng. Commun.5, 12 (2026). [Google Scholar]
- 8.Rieke, N. et al. The future of digital health with federated learning. NPJ Digital Med.3(1), 119 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Xu, J. et al. Federated learning for healthcare informatics. J. Healthcare Inf. Res.5(1), 1–19 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Tong, S., Zuo, Z., Liu, Z., Sun, D. & Zhou, T. Hybrid attention mechanism of feature fusion for medical image segmentation. IET Image Proc.18(1), 77–87 (2024). [Google Scholar]
- 11.Chen, J. et al. TransUNet: transformers make strong encoders for medical image segmentation (2021). arXiv preprint arXiv:2102.04306.
- 12.Al-Razgan, M., Ali, Y. A. & Awwad, E. M. Enhancing Fetal Medical Image Analysis through attention-guided convolution: a comparative study with established models. J. Disability Res.3(2), 20240005 (2024). [Google Scholar]
- 13.Li, H., Nan, Y., Del Ser, J. & Yang, G. Large-kernel attention for 3D medical image segmentation. Cogn. Comput.16(4), 2063–2077 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Antunes, R. S., André da Costa, C., Küderle, A., Yari, I. A. & Eskofier, B. Federated learning for healthcare: systematic review and architecture proposal. ACM Trans. Intell. Syst. Technol.13(4), 1–23 (2022). [Google Scholar]
- 15.Sheller, Micah J. et al. Federated learning in medicine: facilitating multi-institutional collaborations without sharing patient data. Sci. Rep.10(1), 12598 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Prayitno, S. et al. A systematic review of federated learning in the healthcare area: from the perspective of data properties and applications. Appl. Sci.11(23), 11191 (2021). [Google Scholar]
- 17.Pfitzner, B., Steckhan, N. & Arnrich, B. Federated learning in a medical context: a systematic literature review. ACM Trans. Internet Technol.21(2), 1–31 (2021). [Google Scholar]
- 18.Zhang, P., White, J., Schmidt, D. C. & Lenz, G. Applying software patterns to address interoperability in blockchain-based healthcare apps (2017). arXiv preprint arXiv:1706.03700.
- 19.Gondal, C. H. et al. Automated leukemia screening and sub-types classification using deep learning. Comput. Syst. Sci. Eng.46, 3 (2023). [Google Scholar]
- 20.Shafique, S. & Tehsin, S. Computer? Aided diagnosis of acute lymphoblastic leukaemia. Comput. Math. Methods Med.2018(1), 6125289 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Masoudi, B. VKCS: a pre-trained deep network with attention mechanism to diagnose acute lymphoblastic leukemia. Multimedia Tools Appl.82(12), 18967–18983 (2023). [Google Scholar]
- 22.Shah, A. et al. Automated diagnosis of leukemia: a comprehensive review. IEEE Access9, 132097–132124 (2021). [Google Scholar]
- 23.Kaissis, G. A., Makowski, M. R., Rückert, D. & Braren, R. F. Secure, privacy-preserving and federated machine learning in medical imaging. Nat. Mach. Intell.2(6), 305–312 (2020). [Google Scholar]
- 24.Li, X. et al. Multi-site fMRI analysis using privacy-preserving federated learning and domain adaptation: ABIDE results. Med. Image Anal.65, 101765 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Kalapaaking, A. P. et al. Smpc-based federated learning for 6g-enabled internet of medical things. IEEE Netw.36(4), 182–189 (2022). [Google Scholar]
- 26.Falcetta, A. & Roveri, M. Privacy-preserving deep learning with homomorphic encryption: an introduction. IEEE Comput. Intell. Mag.17(3), 14–25 (2022). [Google Scholar]
- 27.Wibawa, F., Catak, F. O., Kuzlu, M., Sarp, S., & Cali, U. Homomorphic encryption and federated learning based privacy-preserving cnn training: Covid-19 detection use-case. In Proceedings of the 2022 European Interdisciplinary Cybersecurity Conference 85–90 (2022).
- 28.Yi, F., Jeong, O. & Moon, I. Privacy-preserving image classification with deep learning and double random phase encoding. IEEE Access9, 136126–136134 (2021). [Google Scholar]
- 29.Wang, G., Lu, R. & Guan, Y. L. Achieve privacy-preserving priority classification on patient health data in remote eHealthcare system. IEEE Access7, 33565–33576 (2019). [Google Scholar]
- 30.Ito, H., Kinoshita, Y., Aprilpyone, M. & Kiya, H. Image to perturbation: an image transformation network for generating visually protected images for privacy-preserving deep neural networks. IEEE Access9, 64629–64638 (2021). [Google Scholar]
- 31.Saha, C. et al. Lung-AttNet: an attention mechanism based CNN architecture for lung cancer detection with federated learning. IEEE Access (2025).
- 32.Lin, J. et al. A lightweight privacy-preserving federated learning framework for heterogeneity-resilient skin cancer diagnosis. IEEE J. Biomed. Health Inf. (2025). [DOI] [PubMed]
- 33.Aria, M. et al. Acute Lymphoblastic Leukemia (ALL) Image Dataset (Kaggle, 2021).
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The dataset used in this study is publicly available on Kaggle and was provided by Aria, M., Ghaderzadeh, M., Bashash, D., Abolghasemi, H., Asadi, F., and Hosseini, A. (2021). It is titled Acute Lymphoblastic Leukemia (ALL) Image Dataset and can be accessed via the following DOI:10.34740/KAGGLE/DSV/2175623.





























































