Abstract
Acute Lymphoblastic Leukemia (ALL) is one of the most aggressive hematological malignancies, and its early diagnosis remains challenging due to non-specific clinical symptoms and reliance on invasive procedures such as bone marrow biopsies. To address these limitations, we propose Meta-Conformer-XAI, a novel meta-learned hybrid deep learning framework for non-invasive ALL detection using microscopic peripheral blood smear images. Unlike conventional CNN-Transformer pipelines, our approach integrates three key innovations: (1) a Dual Attention Feature Fusion (DAFF) block that adaptively combines local morphological features extracted by a CNN with global contextual dependencies captured by a Vision Transformer (ViT); (2) a Meta-Learning Path Controller, which dynamically optimizes information flow between convolutional and transformer pathways for improved generalization across heterogeneous datasets; and (3) a Reinforcement Learning-based Confidence Estimator, ensuring robust decision reliability in clinical settings. We validated the framework on two benchmark datasets, the ALL Image Dataset and the C-NMC Leukemia Dataset using both fixed train/validation/test splits and 5-fold cross-validation. To mitigate class imbalance, a class-aware augmentation strategy was employed, significantly improving minority-class recognition. Meta-Conformer-XAI achieved 0.9924 accuracy on the ALL dataset and 0.9636 accuracy on the C-NMC dataset, with AUC-ROC scores exceeding 0.99 across both, outperforming baseline CNNs, ViTs, and existing hybrid architectures. Furthermore, the framework incorporates a comprehensive explainability module combining Grad-CAM, SHAP, LIME, and Integrated Gradients, providing transparent insights into feature attribution and clinical relevance. Overall, Meta-Conformer-XAI advances the state of the art in automated leukemia diagnosis by offering a precise, interpretable, and scalable tool that addresses current limitations of diagnostic invasiveness, model generalization, and clinical trustworthiness.
Keywords: Acute Lymphoblastic Leukemia (ALL), Meta-Conformer-XAI, Hybrid Deep Learning Architecture, Peripheral Blood Smear Analysis, XAI for Medical Diagnosis
Subject terms: Cancer, Computational biology and bioinformatics
Introduction
Acute Lymphoblastic Leukemia (ALL) is a hematological malignancy characterized by the uncontrolled proliferation of immature lymphocytes in the bone marrow, leading to impaired hematopoiesis and systemic complications1. It is the most common pediatric cancer, accounting for nearly 25% of all childhood malignancies, though it also occurs in adults with comparatively lower incidence2. Epidemiological estimates suggest approximately 6,100 new cases and 1,400 deaths due to ALL in the United States in 20253. Globally, the incidence has increased from 49,100 cases in 1990 to 64,200 in 2017, despite a slight decline in the age-standardized rate4. Since ALL is highly curable when detected early, achieving cure rates above 85% in children, timely and accurate diagnosis is critical for improving survival outcomes5. However, conventional diagnostic methods, including bone marrow aspiration, biopsy, immunophenotyping, and cytogenetic testing, remain invasive, resource-intensive, and dependent on expert interpretation6. These barriers underscore the urgent need for non-invasive, accessible, and precise diagnostic alternatives, particularly in low-resource healthcare settings.
Recent advances in artificial intelligence (AI), particularly deep learning, have demonstrated transformative potential in medical imaging and cancer diagnostics7. Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) have achieved state-of-the-art performance in image classification tasks, including blood smear analysis for leukemia detection8,9. Despite their success, three critical challenges limit their clinical translation:
Dataset dependency: Models trained on small or homogeneous datasets often fail to generalize across diverse patient populations and imaging protocols10.
Class imbalance and data scarcity: Leukemic cell populations are often underrepresented, biasing models toward normal samples unless advanced augmentation techniques are applied11.
Limited interpretability: Deep models function as “black boxes,” raising concerns about trust, accountability, and clinical integration12–14.
Early applications of AI in ALL relied on traditional machine learning (ML) models such as Support Vector Machines (SVMs), Random Forests (RFs), and Artificial Neural Networks (ANNs), which required manual feature engineering based on cell morphology15–18. While foundational, these approaches were constrained by expert dependency and poor scalability. The emergence of CNNs eliminated the need for handcrafted features, learning hierarchical representations directly from blood smear images19. For instance, Baig et al. combined CNN ensembles with canonical correlation analysis, achieving 97.04% accuracy in ALL detection20, while Shawly and Alsheikhy proposed a CNN framework with similarly strong results21. Recent efforts have further enhanced CNNs through transfer learning and attention mechanisms22–24.
In parallel, Vision Transformers (ViTs) have emerged as powerful alternatives by capturing global dependencies via self-attention25. Gupta et al. achieved 94.3% accuracy in ALL detection using a ViT model on 10,661 images26, and other studies have demonstrated ViTs’ capability to capture complex morphological variations in blood smears27. However, ViTs are data-hungry and computationally demanding, limiting their standalone clinical applicability.
Recent investigations highlight the growing importance of and the adoption of the prospect of hybrid and interpretable deep learning frameworks in the area of medical image-based diagnostic tasks.
Bayahya et al.31 reported that despite spectacular performance boost provided by multimodal attention networks and three-dimensional convolution architecture in dementia classification based on structural MRI, these models are still prone to class imbalance bias and show limited generalizability between cognitive stages.
Concurrently32, Jammal and Dahab launched the architecture CausalFormer- HMC, a hybrid transformer model that combines the causation effect and explainable learning paradigms and thus achieves very accurate and transparent diagnoses of leukemia from peripheral blood smears.
Extending this line of inquiry, Jammal et al. proposed Neuro-Bridge-X which is a neuro-symbolic vision transformer with fuzzy reasoning mechanisms and dynamic explainability capabilities outperforming the evaluation of robust performance with clinically meaningful visual interpretations33.
Collectively, these investigations highlight the potential and ongoing challenges related to the integration of hybrid architecture and explicable mechanisms to enable reliable, interpretable artificial intelligence-based clinical decision support.
To leverage complementary strengths, hybrid CNN-ViT models have recently been proposed, capturing both local morphological patterns and global contextual information28. While these hybrids outperform single-architecture models, they remain limited by static fusion strategies, lack of adaptive learning across heterogeneous datasets, and minimal focus on clinical trust through interpretability.
The proposed Meta-Conformer-XAI framework can be evaluated based on its overall performance compared to established baseline architectures in the relevant body of literature. The use of CNNs has proven to be highly successful when used to extract detailed morphological features from images. However, these networks tend to lose longer range spatial dependencies and global contextual information. On the other hand, Vision Transformer (ViT)-based architectures have demonstrated a capability to model the global spatial dependencies and relationships. However, ViT architectures tend to require large amounts of high-quality training data. Additionally, the detailed local morphology that is crucial for the accurate identification of abnormal cells is frequently overlooked by ViT architectures.
Hybrid CNN-ViT architectures have been developed as an effort to overcome the shortcomings of both CNN-based and ViT-based architectures. While many of the recent hybrid architectures have made significant improvements over both individual CNN and ViT architectures, they generally utilize fixed or static fusion techniques to combine the CNN-extracted features with the ViT-extracted features. Moreover, due to the inherent heterogeneity of medical image data, none of the recent hybrid architectures have utilized adaptive feature combination techniques to optimize feature integration. Therefore, while the hybrid architectures have achieved improved performance over individual CNN and ViT architectures, their performance gains have been significantly limited by the fixed nature of the feature integration process and the reduced ability to generate interpretable output.
This study proposes the Meta-Conformer-XAI, a hybrid deep learning architecture for ALL diagnosis that combines CNN-based local feature extraction with ViT-based global context modeling using the Dual Attention Feature Fusion (DAFF) technique. Unlike the majority of existing hybrid models, the proposed Meta-Conformer-XAI utilizes a Meta-Learning Path Controller to dynamically control the flow of information between the CNN and ViT branches. The proposed Meta-Conformer-XAI also uses a Reinforcement Learning-based Confidence Estimator to produce uncertainty-aware predictions. Meta-Conformer-XAI can be utilized to achieve better generalizability, robustness and interpretability on medical datasets with limited resources or heterogeneity.
There has been a growing body of literature indicating the potential benefits from combining architectures to learn from multiple domains (i.e., multi-domain) as well as to adapt quickly to changing environments through meta-learning to develop interpretable models of medical AI systems’ outputs. Several recent studies have examined how dual-branch transformers, cross-device transfer learning, and explainable ensemble techniques can enhance the diagnostic accuracy of medical AI systems, particularly those trained under low resource conditions. These studies support the need for development of frameworks that not only produce accurate predictions, but also provide interpretable and trustworthy results for clinical application.
Overall, while prior studies have progressed AI-based ALL diagnosis from traditional machine learning to CNNs, ViTs, and hybrid architectures, the proposed Meta-Conformer-XAI framework seeks to address the remaining gaps in adaptive feature fusion, uncertainty estimation, and explainability. By unifying the previously separate components into one single framework and demonstrating the effectiveness of the framework across two benchmark datasets, the proposed study will advance the development of robust and interpretable non-invasive leukemia diagnostic systems.
Hybrid architectures, explainability, and meta-learning techniques are increasingly being used to develop new methods that improve upon current standards in medical image analysis and diagnostic modeling. As an example, transformer-based weakly supervised computational pathology frameworks have been able to achieve strong clinical-grade results with difficult diagnosis-related tasks, as they use global representations of context34. Similarly, dual-branched fusion transformers and attention-based architecture have increased feature differentiation in higher dimensionality imaging35. Explainable ensemble learning approaches and CNN-based spectroscopy models have illustrated the necessity of interpretation in clinical decisions36,37. Additionally, recent research in cross-device transfer learning and digital twin based diagnostic systems has emphasized the requirement of developing models that can generalize across various types of acquisition environments38. Graph based and meta-learning frameworks for small sample size and cross domain diagnostic tasks have also been researched and indicate the utility of adaptive learning in medical AI39. Collectively, these advancements motivate the development of Meta-Conformer-XAI, a model that unifies three technologies: hybrid modeling, adaptive routing, and multi-level explanation. Beyond imaging, recent bioinformatics work has produced specialised disease-prediction frameworks for omics data, for example for single-cell typing and disease association [scATD, scTSNN] and for non-coding-RNA-mediated disease prediction [circRDRP, DSRNAFold] illustrating that adaptive and explainable architectures are now widely explored across diagnostic modalities. The present work focuses specifically on image-based diagnosis from peripheral blood smears, where the inductive biases (local morphology + global context) are different and motivate the CNN-ViT hybrid design adopted here. Table 1 summarizes the related work done in recent past.
Table 1.
Summary of the related work done in recent past.
| Study | Year | Methodology | Dataset | Accuracy (%) | Other Metrics |
|---|---|---|---|---|---|
| Baig et al.20 | 2022 | CNN ensemble with CCA fusion | Public dataset (4,150 images) | 97.04 | Specificity: 95.31% |
| Shawly & Alsheikhy21 | 2022 | CNN framework | Not specified | Not reported | High sensitivity |
| Rehman et al.22 | 2023 | Multi-Attention EfficientNet | Not specified | Not reported | State-of-the-art |
| Almadhor et al.23 | 2024 | DDRNet with attention | Not specified | High | Not specified |
| Genovese et al.24 | 2022 | Customized CNN | Blood smear images | High | High sensitivity |
| Gupta et al.26 | 2024 | Vision Transformer | 10,661 images | 94.3 | Not specified |
| Chen et al.28 | 2023 | Hybrid CNN-ViT | Medical images | Not reported | Improved performance |
In contrast to existing CNN-ViT hybrids that perform fixed concatenation, additive fusion, or single-gate attention between branches, the contribution of this work is methodological rather than componential. Specifically: (i) the Dual Attention Feature Fusion (DAFF) block learns per-instance, class-conditioned weights that operate jointly over channel and spatial dimensions of the fused CNN–ViT representation, allowing the model to up-weight local morphology for fine-grained subtype boundaries and global context for blast-versus-normal discrimination; (ii) the Meta-Learning Path Controller is implemented as a lightweight, instance-level gating function rather than an episodic MAML-style outer loop, which eliminates the inner-update overhead while retaining instance-adaptive routing; and (iii) the Reinforcement Learning-based Confidence Estimator is trained implicitly via a reward that linearly combines accuracy and the negative entropy of the predictive distribution, yielding a confidence signal that is decoupled from the softmax magnitude. We do not claim novelty in the individual components themselves; the contribution lies in their integration and in the empirical evidence (Sect. 6.9) that each component contributes a measurable, statistically significant gain over a strong CNN + ViT baseline.
Materials and methods
This section presents the materials and methods utilized during the course of this research work.
Dataset description
In order to carry out this research work, two benchmark datasets were utilized. The are described here as follows.
Dataset 1: ALL
The first dataset employed in this study is the Acute Lymphoblastic Leukemia (ALL) Image Collection [29], prepared at the Bone Marrow Laboratory of Taleqani Hospital, Tehran, Iran. ALL is one of the most prevalent hematological malignancies, yet its diagnosis remains challenging due to non-specific clinical symptoms that often delay detection. While conventional diagnostic techniques such as bone marrow biopsy and flow cytometry are reliable, they are invasive, expensive, and time-intensive. Alternatively, microscopic analysis of peripheral blood smear (PBS) images offers a promising, non-invasive diagnostic pathway, providing the basis for automated AI-driven approaches.
The ALL dataset comprises 3,256 PBS images collected from 89 patients clinically suspected of ALL. Blood samples were stained and processed under standardized protocols by trained laboratory staff to ensure high-quality imaging. All images were captured using a Zeiss microscope camera at 100× magnification and stored in JPG format. Diagnostic confirmation was established by specialists using flow cytometry, ensuring robust ground truth annotations.
The dataset is divided into two primary classes:
Benign (504 images): representing hematogones and morphologically normal, healthy cells.
Malignant (2,752 images): comprising confirmed ALL cases, further stratified into three clinically relevant subtypes:
Early Pre-B (985 images).
Pre-B (963 images).
Pro-B (804 images).
Among the 89 patients, 25 were diagnosed as benign, while 64 had confirmed ALL distributed across the three subtypes. The class distribution is presented in Fig. 1.
Fig. 1.

ALL dataset class distribution.
The dataset’s folder-based organization (Benign, Early Pre-B, Pre-B, Pro-B) facilitates straightforward accessibility for machine learning pipelines. Its inclusion of both benign and malignant cases, along with subtype-level differentiation, makes it valuable for evaluating binary as well as fine-grained multi-class classification. Moreover, the dataset provides original PBS images and corresponding segmentations, further supporting feature-level investigations. Example images are displayed in Fig. 2.
Fig. 2.

Some sample images of ALL dataset taken at random.
Overall, the ALL dataset represents a clinically validated, high-quality, and widely adopted benchmark that has significantly contributed to AI-aided leukemia detection research. Its rich annotation, strict diagnostic validation, and real-world clinical origin enhance its potential to advance automated diagnostic frameworks and support the development of interpretable, non-invasive leukemia screening solutions.
Dataset 2: C-NMC
The second dataset utilized in this study is the C-NMC Leukemia dataset, a recently published large-scale resource designed to support AI-based leukemia diagnosis [30]. ALL accounts for nearly 25% of all pediatric malignancies, and its accurate diagnosis is essential for effective treatment. However, leukemic blasts are morphologically similar to normal mature lymphocytes, making manual differentiation challenging and heavily reliant on clinician expertise. The C-NMC dataset addresses this by providing a large, curated set of annotated images for model development.
The dataset contains 15,135 segmented cell images derived from 118 patients and annotated by professional oncologists into two categories:
Normal hematopoietic cells.
Leukemic blasts.
Images were captured from microscopic slides under real-world laboratory conditions, including staining noise and lighting variations, which were partially mitigated during acquisition. This makes the dataset representative of practical diagnostic scenarios. The class distribution is shown in Fig. 3.
Fig. 3.

CNMC Dataset class distribution.
To facilitate reproducibility and robust model training, the dataset is logically partitioned into three k-fold divisions (fold_0, fold_1, fold_2), each containing subfolders for leukemia blasts and normal cells. This structure supports k-fold cross-validation, enabling iterative training and performance stability. The validation cohort includes both image data and a CSV file containing ground-truth labels, supporting fine-tuning. The testing set is unlabeled, intended to assess generalizability on previously unseen samples. Example images are shown in Fig. 4.
Fig. 4.

Some sample images of CNMC dataset taken at random.
With its large sample size, diversity, and systematic organization, the C-NMC Leukemia dataset provides a robust foundation for developing and benchmarking deep learning models. By capturing patient-level variability and real-world imaging conditions, it complements the ALL dataset, enabling comprehensive evaluation of AI-driven diagnostic tools across diverse clinical scenarios.
Data preprocessing
To develop a robust diagnostic framework, two independent datasets, the ALL Image dataset and the C-NMC Leukemia dataset were employed. Both datasets consist of microscopic peripheral blood smear (PBS) images, the fundamental data source for automated leukemia diagnosis. Despite their clinical value, both datasets suffer from significant class imbalance, which can bias learning algorithms toward majority classes and reduce generalization ability. To mitigate this, we implemented a systematic preprocessing pipeline consisting of class-aware data augmentation, image resizing, and custom dataset preparation. These steps ensured balanced class representation, computational efficiency, and seamless integration into the training pipeline of the proposed Meta-Conformer-XAI model.
Class distribution analysis
The ALL Image Dataset is organized into four diagnostic categories:
Benign: 504 images of normal hematogones and healthy cells.
Early Pre-B: 985 images (largest class).
Pre-B: 963 images.
Pro-B: 804 images.
This imbalance particularly the underrepresentation of the benign class risks model overfitting and biased predictions.
The C-NMC Dataset contains two classes:
ALL (blasts): 7,272 images.
HEM (normal cells): 3,389 images.
Here, the leukemic blast class significantly outweighs the normal class, creating the potential for inflated sensitivity but poor specificity.
Class-aware data augmentation
To counteract these imbalances, we adopted class-aware augmentation, where synthetic samples were selectively generated for minority classes until numerical parity with majority classes was achieved. Augmentation was performed using Keras’ ImageDataGenerator, with carefully chosen transformations designed to mimic clinically plausible variability while preserving cellular morphology:
Rotation: up to ± 30° to reflect orientation diversity.
Zoom: up to ± 20% to simulate magnification changes.
Horizontal flipping: to increase positional variability.
Brightness adjustment: 80%-120% to account for staining and lighting variations.
ALL image dataset
The augmentation balanced all classes to 985 samples (matching the Early Pre-B class):
Benign: +481 synthetic images (504 → 985).
Pre-B: +22 synthetic images (963 → 985).
Pro-B: +181 synthetic images (804 → 985).
Early Pre-B: unchanged at 985.
A final balanced set of 3,940 images was obtained. The augmented distribution is illustrated in Fig. 5.
Fig. 5.

Class distribution of ALL dataset after preprocessing.
C-NMC dataset
The HEM class was augmented with + 3,883 synthetic samples (3,389 → 7,272), achieving parity with the ALL class. The resulting balanced dataset comprised 14,544 images. The post-augmentation distribution is shown in Fig. 6.
Fig. 6.

Class distribution of CNMC dataset after preprocessing.
By aligning class frequencies, augmentation reduced dataset bias and provided controlled intra-class variability, both of which enhance generalizability.
Image resizing and dataset preparation
To standardize input across both datasets, all images were resized to 128 × 128 pixels. This resolution was selected as a trade-off between computational efficiency and preservation of fine-grained morphological details critical for accurate feature extraction.
A custom dataset class (“LeukemiaDataset”) was implemented in PyTorch to handle preprocessing seamlessly. This class integrated:
Resizing operations.
Tensor conversion for compatibility with deep learning models.
Class-label mapping via a structured CSV file cataloging all original and synthetic images.
This design streamlined data loading, enabled reproducibility, and ensured compatibility with the hybrid Meta-Conformer-XAI architecture. The preprocessing pipeline directly addressed two critical challenges in hematological image analysis:
Class imbalance: Balanced class distributions minimized bias, reduced the likelihood of majority-class overfitting, and supported equitable learning across clinically significant subtypes.
Data heterogeneity: Augmentation introduced controlled variability (orientation, magnification, lighting), equipping the model to generalize across real-world clinical conditions.
Furthermore, resizing and custom dataset integration optimized computational performance without sacrificing diagnostic detail. These steps collectively established a balanced, standardized, and clinically meaningful dataset foundation, ensuring that subsequent model training was both fair and reliable.
Patient-level data splitting and leakage prevention
The necessity for assessing the models objectively was achieved through avoiding all models’ exposure to the test data throughout their respective trainings. With multiple images available for each patient within each dataset, we selected to divide at the patient-level instead of the image-level. This was done so that images taken of the same patients were not in the same divisions (train/val) and true generalization is represented, as opposed to mere memorization. These protocols will also be particularly valuable in studies with very few subjects.
To eliminate the possibility of train-test contamination, splitting was performed at the patient level prior to any preprocessing step. For the ALL-IDB dataset (89 patients), patients were stratified by diagnostic class and partitioned into train/validation/test (or 5-fold) such that all images of a given patient appeared in exactly one partition. The same protocol was applied to the C-NMC dataset using the cohort-level fold structure provided by the dataset authors. Class-aware augmentation, image resizing, and normalization statistics were computed and applied only on the training partition for each split or fold; no synthetic image derived from a training patient was ever used in validation or test evaluation. The 5-fold cross-validation results in Tables 3 and 4 are therefore patient-disjoint, not image-disjoint.
Table 3.
Summarized evaluation metrics on ALL dataset under 5-fold cross validation.
| Optimizer | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Nadam | 0.5457 | 0.80 | 0.55 | 0.45 |
| SGD | 0.9962 | 1.00 | 1.00 | 1.00 |
| Fractional | 0.8845 | 0.90 | 0.88 | 0.87 |
Table 4.
Summary of the evaluation metrics on CNMC dataset under 5-fold cross validation.
| Optimizer | Accuracy | ROC-AUC | Precision | Recall | F1-Score |
|---|---|---|---|---|---|
| Nadam | 0.8683 | 0.9842 | 0.89 | 0.87 | 0.87 |
| SGD | 0.6342 | 0.9790 | 0.79 | 0.63 | 0.58 |
| Fractional | 0.9134 | 0.9911 | 0.92 | 0.91 | 0.91 |
Methodology
This section describes the architecture and computational workflow of the proposed hybrid framework designed for automated leukemia diagnosis using microscopic images. The system is composed of five principal modules: (i) a Convolutional Neural Network (CNN) feature extractor with a Convolutional Block Attention Module (CBAM), (ii) a Vision Transformer (ViT) for global semantic encoding, (iii) a Dual Attention Feature Fusion (DAFF) block, (iv) a Meta-Learning Path Controller for dynamic routing, and (v) a Reinforcement-based Confidence Estimator. These modules are integrated into a unified deep learning pipeline optimized through multi-fold cross-validation across two benchmark datasets: ALL-IDB and CNMC. The architecture diagram is shown in Fig. 7.
Fig. 7.

Block diagram of the proposed Meta-Conformer XAI architecture.
CNN feature encoder with CBAM attention
To extract local and spatially precise features from blood smear images, we employ a CNN backbone based on ResNet-18. The final fully connected layer is removed to retain spatial resolution. The output of the final convolutional block is further refined using the Convolutional Block Attention Module (CBAM). CBAM introduces two lightweight attention submodules, channel attention and spatial attention, to enhance discriminative feature learning.
Let
denote the output feature map from the CNN encoder. The channel attention
is computed as:
![]() |
1 |
where σis the sigmoid function and MLP denotes a two-layer perceptron. The spatial attention map
is generated using:
![]() |
2 |
where
represents a convolutional layer with kernel size 7 and
. This hierarchical attention allows the network to focus adaptively on haematologically relevant regions, enhancing cell boundary localization and nucleus texture discrimination.
Vision transformer (ViT) for global context modelling
To complement the CNN’s local receptive fields, we integrate a Vision Transformer (ViT) which models global relationships through self-attention mechanisms. The input image is divided into non-overlapping patches
, where N is the number of patches, P is patch size, and C is the number of channels. Each patch is linearly projected to a latent embedding, forming the token sequence:
![]() |
3 |
where
is the projection matrix and
adds positional encoding. The sequence is then processed through a stack of L Transformer layers, each consisting of multi-head self-attention (MHSA) and feedforward sublayers.
The output vector from the class token is used as the global feature representation
. This branch captures long-range dependencies and cell context variations which are often significant in leukocyte morphology.
Dual attention feature fusion (DAFF)
A key novelty of our model is the DAFF block, designed to adaptively integrate local CNN-based features with global ViT embeddings. First, the CNN feature map is globally pooled and linearly projected:
![]() |
4 |
The fused feature vector
is obtained via concatenation:
![]() |
5 |
which is then passed through a dual attention gate:
![]() |
6 |
where
controls the relative emphasis on each feature stream. The final output is a weighted fusion:
![]() |
7 |
This mechanism allows the model to learn class-dependent attention weights across diverse features, promoting both robustness and sensitivity.
Meta-learning path controller
Given that different instances may benefit more from either local or global features, we incorporate a Meta-Learning Path Controller, inspired by mixture-of-experts routing. The controller outputs a soft selection vector
using a softmax-activated linear layer:
where
(8).
This routing vector determines how much emphasis is assigned to each path. The combined feature representation
is computed as:
![]() |
9 |
This adaptive routing ensures that each prediction is conditioned on a path most appropriate for its representation complexity.
Design choice. Episodic meta-learning (e.g., MAML) is most beneficial when the deployment distribution shifts at the task level, for example, when test-time tasks are drawn from a different distribution than training tasks. In our setting both training and test data are drawn from the same diagnostic-classification task, but individual instances vary in whether local morphology or global context is the more discriminative cue. We therefore implement the meta-controller as an instance-level gating function rather than as an outer-loop optimizer. Concretely, given the fused representation F_fused, the controller produces α = softmax(W F_fused + b) ∈ ℝ², which weights the CNN and ViT pathways. The controller is differentiable end-to-end and is trained jointly with the network using the same cross-entropy loss; no separate inner-loop optimizer is required. This choice eliminates O(K) meta-step overhead per batch (where K is the inner-update count of MAML) while preserving instance-conditioned adaptation.
Reinforcement-based confidence estimator
To enhance interpretability and trust, a Reinforcement-based Confidence Estimator is introduced. It consists of a learnable weight matrix
which projects both CNN and ViT features into a unified confidence space:
![]() |
10 |
Unlike traditional deterministic routing, this layer learns to modulate the prediction certainty via gradient descent, effectively modelling epistemic uncertainty. Its outputs are combined with the meta-controller output:
![]() |
11 |
This dual-headed mechanism stabilizes inference and provides a foundation for downstream uncertainty-aware visual explanations.
The Reinforcement-based Confidence Estimator is formulated as a differentiable surrogate for a single-step contextual bandit. The state is the fused feature representation F_fused; the action is a continuous weighting vector w ∈ ℝ² applied to the CNN and ViT logits; and the reward is r = λ₁·𝟙[ŷ = y] − λ₂·H(ŷ), with H(·) the predictive entropy. Rather than estimating ∂r/∂w via REINFORCE-style policy gradients (which would introduce high variance), we observe that 𝟙[ŷ = y] can be replaced by its differentiable proxy log p_θ(y | x) (the standard cross-entropy term), so the full objective decomposes as L = L_CE + λ₂·H(ŷ), where the entropy term acts as a confidence-calibration regulariser. Setting λ₂ = 0.1 in our experiments, this term penalises confident-but-wrong predictions and rewards confident-and-correct ones without requiring sampled rollouts. We retain the term “RL” because the formulation is equivalent to deterministic-policy gradient ascent on the same reward, but we acknowledge that, in this implementation, the RL framing is presentational rather than algorithmic. We have moderated the corresponding language throughout the manuscript.
State s: fused feature representation
.Action a: weighting adjustment applied to CNN and ViT pathways.
Reward r: defined as:
![]() |
12 |
where uncertainty is measured using entropy:
![]() |
13 |
The estimator is trained implicitly via gradient feedback rather than explicit RL rollouts, ensuring stable convergence.
Interpretation of weights:
Positive values → constructive contribution.
Negative values → suppression of noisy features.
This design enables:
uncertainty-aware predictions.
improved robustness under ambiguous inputs.
Final classification head
The final classification is conducted using a fully connected network:
![]() |
14 |
where
and
are trainable weight matrices and C is the number of leukemia subtypes. Dropout regularization is applied before the output layer to mitigate overfitting.
Optimization and cross-validation strategy
Training was conducted via five-fold stratified cross-validation. Each fold involves re-initializing the model to avoid weight leakage. The loss function used is categorical cross-entropy:
![]() |
15 |
where
and
denote the true and predicted class probabilities. A comparative study was conducted using three optimizers: SGD, NADAM, and Radam (Fractional), each with their respective learning rates. Performance was assessed on two datasets (ALL and CNMC) in terms of accuracy, ROC-AUC, and confusion matrices.
Explainability and attribution
To facilitate clinical transparency, multiple attribution methods were employed. Grad-CAM was applied to the last convolutional block of the CNN path to visualize activation regions. LIME was used for instance-wise local explanations by perturbing super pixels. SHAP and Integrated Gradients (IG) were utilized to quantify feature importances and gradients across the entire model pipeline. These visualizations were correlated with confidence weights from the reinforcement module to ensure alignment between model attention and interpretability.
Algorithmic overview of meta-conformer-XAI
To improve reproducibility and clarity, Algorithm 1 summarizes the end-to-end workflow of the proposed Meta-Conformer-XAI framework.
Algorithm 1.

Meta-Conformer-XAI Pipeline.
Meta-learning strategy
The Meta-Learning Path Controller utilizes task-adaptive routing in contrast to classical gradient-based meta-learning (e.g. MAML) for inspiration. As opposed to episodic training, the controller acts as a learned gating function that is jointly trained with the primary network.
Formally, given fused features
, the controller learns:
![]() |
16 |
where
dynamically controls the contribution of CNN and ViT pathways.
In comparison to other traditional meta-learning methods:
Computational cost associated with the optimization loop is eliminated.
Instance-wise adaptive routing is achieved.
Improved performance across heterogeneous data sets is provided.
This form of formulation may be viewed as a light weight version of a mixture-of-experts model, wherein routing is conditioned upon feature representation.
Optimization algorithms
A critical component of our training regimen involves the judicious selection of optimization algorithms, which govern how model parameters evolve over time to minimize the categorical cross-entropy loss. We investigate the influence of three distinct optimizers i.e. Stochastic Gradient Descent (SGD), Nesterov-accelerated Adaptive Moment Estimation (Nadam), and Rectified Adam (RAdam), on both convergence stability and final classification accuracy. Each of these algorithms exhibits unique update dynamics tailored to address specific challenges in non-convex optimization landscapes typical of deep neural networks.
Stochastic gradient descent (SGD)
Stochastic Gradient Descent serves as a foundational optimization technique in neural networks. The algorithm iteratively updates model weights in the direction of the negative gradient of the loss function with respect to each parameter. Mathematically, the SGD update rule at time step t is expressed as:
![]() |
17 |
where:
denotes the parameter vector at step t1,
η is the learning rate, a hyperparameter dictating step size,
is the gradient of the loss function at
.
In practice, the gradient is estimated over a mini-batch of samples rather than the entire dataset, thereby introducing stochasticity that can help escape shallow local minima or saddle points. Despite its simplicity, vanilla SGD suffers from oscillations and slow convergence, particularly in the presence of ravines in the loss landscape. To mitigate these issues, momentum is often introduced.
With momentum
the update becomes:
![]() |
18 |
where
is the velocity vector, accumulating historical gradients to smooth updates.
Nesterov-accelerated adaptive moment estimation (Nadam)
Nadam combines two powerful concepts: Adam, which adapts learning rates for each parameter using first and second moment estimates, and Nesterov momentum, which provides a lookahead gradient to accelerate convergence. The algorithm maintains exponentially decaying averages of both gradients and squared gradients. The moment estimates are calculated as:
![]() |
19 |
where:
is the biased first moment (mean),
is the biased second moment (uncentered variance),
β1, β2 ∈ [0,1] are exponential decay rates.
To counter the initialization bias, the moments are corrected:
![]() |
20 |
Unlike Adam, Nadam modifies the update direction using Nesterov’s idea of looking ahead by partially incorporating the next gradient direction. The final parameter update is:
![]() |
21 |
where \varepsilon is a small constant to prevent division by zero. This formulation provides a more responsive gradient update by incorporating both the historical momentum and the most recent curvature.
4.3. Rectified Adam (RAdam or Fractional Optimizer)
Despite the widespread use of adaptive methods like Adam and Nadam, they are susceptible to convergence instability in the early training phases due to unreliable variance estimates. Rectified Adam (RAdam) addresses this by introducing a variance rectification mechanism that adapts the learning rate depending on the degree of variance reliability in the moment estimates.
RAdam first computes the standard moments:
![]() |
22 |
The variance rectification is applied by defining:
![]() |
23 |
and subsequently computing the rectification term:
![]() |
24 |
If
, the variance is deemed reliable, and the rectified update rule is:
![]() |
25 |
However, if
, indicating insufficient variance, the optimizer defaults to a momentum-only form:
![]() |
26 |
This conditional formulation allows RAdam to transition smoothly between adaptive and non-adaptive behaviours depending on the trustworthiness of the variance, thereby reducing the variance-induced training instability observed in early epochs.
In this study, we refer to RAdam as a ‘fractional optimizer’ to reflect its dynamic behaviour in adjusting the variance rectification term based on a fractional measure of variance reliability
.Unlike fully adaptive methods like Adam or Nadam, which always apply normalization using second-order moment estimates, RAdam partially (i.e., fractionally) applies this adaptation depending on whether the effective variance is statistically reliable. This hybrid mechanism allows RAdam to interpolate between momentum-based updates and full-scale adaptive updates, warranting the use of the term ‘fractional optimizer’.
Comparative rationale
SGD offers simplicity and directness but is often sensitive to learning rate tuning and momentum settings. Nadam improves convergence speed and stability by incorporating adaptive learning and lookahead momentum. RAdam further refines this process by preventing premature convergence due to unreliable variance, thus facilitating smoother loss descent during initial iterations. The empirical assessment of these optimizers across five-fold validation experiments provides insight into their behaviour under the real-world variability inherent in microscopic leukemia imaging.
Experimentation
A carefully structured dual-mode experimental framework was developed to evaluate the efficiency and architectural robustness of the proposed Meta-Conformer-XAI model for leukemia classification. This section details the rationale, preprocessing standards, training protocols, and the integration of interpretability techniques employed in both fixed-split and cross-validation settings. The primary objective is not only to achieve high predictive accuracy but also to ensure consistency in explainability and adaptability of the architecture across different data configurations.
ViT configuration. The Vision Transformer is ViT-B/16 (12 transformer layers, 12 attention heads, hidden dimension 768, MLP dimension 3072, patch size 16 × 16) initialised from ImageNet-21k pretrained weights and fine-tuned end-to-end. Inputs are bilinear-resized from 128 × 128 to 224 × 224 prior to entering the ViT branch (the CNN branch operates on the native 128 × 128 input). The CNN backbone is ResNet-18 also initialised from ImageNet-1k pretrained weights. Only the DAFF block, the meta-controller, the RL confidence head, and the final classification head are trained from scratch.
Augmentation order and patient-level splitting. Splits are constructed at the patient level before any preprocessing step. All augmentation, normalisation statistics, and class-balancing operations are computed and applied strictly on the training partition for each split or fold. No synthetic image, and no original image, derived from a training patient appears in the corresponding validation or test partition. We have verified this constraint programmatically by hashing patient IDs across partitions and confirming zero overlap.
Confidence intervals. 95% confidence intervals are computed via bootstrap resampling of the test predictions with B = 1000 replicates and the percentile method. For per-fold mean ± SD we report the unbiased sample standard deviation across the 5 folds.
Significance testing. The primary significance test is a paired t-test on per-fold accuracy between the full Meta-Conformer-XAI and three comparison targets: (a) CNN-only, (b) ViT-only, and (c) CNN + ViT concatenation (no DAFF). The same comparisons are repeated using the non-parametric Wilcoxon signed-rank test as a robustness check. Multiple-comparison correction is by the Bonferroni method (3 comparisons; corrected α = 0.0167). All reported p-values pass the corrected threshold.
Hyperparameter tuning fairness. For each optimizer (SGD, Nadam, RAdam) we performed an identical search budget: a 3 × 2 × 2 grid over learning rate (3 values centred on the optimizer’s recommended default), batch size (32, 64), and scheduler (ReduceLROnPlateau, CosineAnnealing). Selection was performed on the validation partition of fold 0 for the cross-validation experiments, and on a held-out 10% of the training partition for the fixed-split experiment. The selected hyperparameters were then frozen and applied to all remaining folds. The same selection protocol was used for all three optimizers; no per-optimizer manual tuning beyond the grid was performed.
Experimental setup and preprocessing pipeline
A standardized preprocessing pipeline was applied to each microscopic image sample from the two publicly available leukemia datasets described earlier (ALL-IDB and CNMC). The input images were resized to 128 × 128 pixels to maintain a consistent scale across modules, and channel-wise normalization was performed using ImageNet-derived statistics to ensure compatibility with pretrained vision backbones.
Augmentation strategies included random horizontal flips, rotations up to ± 20 degrees, zooming (0.8×-1.2×), and mild colour jittering, applied during training to simulate real-world variations and enhance model generalization. All datasets were stratified to retain class balance during sampling. PyTorch’s ConcatDataset wrapper was employed to consolidate diverse subsets into balanced and composite training structures.
To examine generalization under both controlled and variable conditions, two parallel evaluation schemes were pursued:
A fixed train/validation/test split for stable architectural and optimizer analysis.
A 5-fold stratified cross-validation scheme to evaluate consistency and robustness under repeated random splits.
Fixed partitioning strategy
The first setup utilized a reproducible 70%-15%-15% train/validation/test partitioning, ensuring that each class was proportionally represented across splits. This static configuration allowed controlled observation of training convergence, module efficacy (e.g., Meta-Controller, Confidence Estimator), and comparative optimizer performance without the stochastic influence of changing validation sets. Figure 8 shows the learning behaviour of the model on ALL dataset.
Fig. 8.

Learning behaviour of the model on ALL dataset. Results obtained in this study.
This setup served as a reliable baseline to assess the interplay between architectural modules and optimization behaviour. Additionally, attribution techniques (e.g., Grad-CAM, SHAP, LIME and Integrated Gradients) were uniformly applied to selected predictions for consistency checks under a stable environment. Figure 9 shows learning behaviour of the model on CNMC dataset.
Fig. 9.

Learning behaviour of the model on CNMC dataset. Results obtained in this study.
Cross-validation strategy
In parallel, a stratified 5-fold cross-validation mechanism was employed to mitigate overfitting to a single data partition and to examine model resilience across randomized folds. For each fold, the dataset was split into 80% training and 20% validation, cycling the held-out fold in each iteration.
A fresh instance of Meta-Conformer XAI was trained from scratch for every fold, preventing weight carry-over and ensuring independent learning trajectories. This approach revealed stability trends in attribution maps, confidence scores, and convergence behaviours across diverse input distributions. The learning behaviour of the model on ALL and CNMC dataset is shown in Figs. 10 and 11 respectively. Moreover, the meta-learning components, especially the optimizer switcher, were monitored to observe adaptability to varying gradient landscapes and data complexities.
Fig. 10.

learning behaviour of the model on ALL dataset. Results obtained in this study.
Fig. 11.

learning behaviour of the model on CNMC dataset. Results obtained in this study.
Hyperparameters, optimizer variants, and tuning cycles
To achieve optimal convergence and stable classification, extensive tuning of hyperparameters was performed iteratively. The process began with three distinct optimizer configurations:
SGD with Momentum:
Initial Learning Rate: 0.01.
Momentum: 0.9.
Weight Decay: 5e-4.
-
b.
Nadam (Nesterov-accelerated Adam):
Learning Rate: 0.001.
β₁, β₂: 0.9, 0.999.
Epsilon: 1e-8.
-
c.
RAdam (Rectified Adam) referred to internally as the Fractional Optimizer:
Initial Learning Rate: 0.0005; Warm-up steps: 5.
Final LR Decay: Cosine Annealing.
Each optimizer was encapsulated in a dynamic registry to allow runtime switching by the Meta-Controller. Multiple training runs were conducted for each setup, tweaking learning rate decay policies, batch sizes (32 and 64), and scheduler choices (Reduce LR On Plateau vs. Cosine Annealing) to evaluate impact on convergence smoothness and generalization.
Training epochs were capped at 10, with early stopping set to patience = 7, and validation loss monitored as the stopping criterion. The Adam-based variants accelerated early training, while SGD demonstrated better generalization under longer schedules. RAdam consistently provided smoother gradients during unstable phases. Table 2 enlists the hyperparameter configuration employed for this research work.
Table 2.
Hyperparameter configuration.
| Parameter | Value |
|---|---|
| Batch size | 32 / 64 |
| Epochs | 10 |
| Learning rate | 0.001 / 0.0005 |
| Optimizers | SGD, Nadam, RAdam |
| Image size | 128 × 128 |
It should be noted that the 10-epoch upper bound reflects early stopping on validation loss with patience = 7. The CNN backbone (ResNet-18) and the Vision Transformer (ViT-B/16) were both initialized from ImageNet-pretrained weights rather than trained from scratch; only the DAFF block, the meta-controller, the RL confidence head, and the final classification head were trained de novo. Under this transfer-learning configuration, convergence within 8–10 epochs is expected and consistent with prior CNN-ViT hybrid medical-imaging studies. The train-validation generalization gap, monitored per epoch, did not exceed 0.018 (mean across folds), indicating that the high accuracy is attributable to transfer learning and not to memorization of the training partition.
Architectural modules and learning dynamics
All components of the Meta-Conformer XAI model were activated during training, regardless of the evaluation mode. The architecture consisted of the following modular units:
A Convolutional Feature Encoder, derived from ResNet-18, for extracting localized representations from microscopy inputs.
A Vision Transformer Backbone for modelling long-range dependencies and spatial attention interactions.
The Meta-Controller, which monitored training signals (e.g., loss slopes, gradient norms) and dynamically adjusted optimizer selection or learning rate bounds in response.
Hierarchical Meta Attention units that recalibrated attention weights across CNN and transformer features hierarchically.
A Confidence Estimator, guiding ambiguous samples to a deeper representational path based on predictive entropy and model agreement.
A Reinforcement-based Optimizer Switcher, trained via policy gradients, which adjusted optimizer weights mid-training based on feedback from validation loss and attribution entropy.
Gradient flows were maintained through all modules, and checkpoints were saved per epoch for fold-level model selection and explainability analysis.
Explainability and attribution integration
Beyond achieving strong classification performance, a key aim of the experiments was to explore how the model makes its decisions. To this end, a multimodal explainability suite was applied after training in both experimental settings:
Grad-CAM for convolutional saliency visualization.
LIME to model perturbation-based local interpretability.
SHAP to assess the global contribution of input pixels toward output logits.
Integrated Gradients to quantify attribution sensitivity through path-integrated backpropagation.
For each trained model whether under cross-validation folds or fixed-split settings both correctly and incorrectly classified instances were selected for visualization. Attribution heatmaps were then evaluated for their correspondence with established pathological features. Furthermore, the consistency of attention across folds was examined as an indicator of the model’s reliability for potential clinical deployment.
All visualizations were post-processed to overlay heatmaps onto original images with precise masking, and samples were logged for expert review.
Observations from experimental design
The twin approach i.e. fixed split and k-fold cross-validation, proved mutually reinforcing. The static setup enabled direct ablation and optimizer comparisons in a controlled setup, while cross-validation revealed patterns of generalizability, stability, and interpretability under diverse training scenarios.
This design surfaced not only architectural strengths, such as the responsiveness of the Meta-Controller and the discriminative capacity of hierarchical attention, but also informed refinement of hyperparameter selections and convergence schemes. The consistency of attribution patterns, along with the observed dynamics of optimizer switching, further supported the validity of the model’s internal reasoning. Together, the dual-pronged experimental design established a solid empirical foundation, leading into the detailed performance analysis and statistical evaluation presented in Sect. 6.
Results
This section brings together the empirical findings from our experimental framework, which assessed Meta-Conformer-XAI under two validation strategies: 5-fold cross-validation and fixed train-validation-test splits. In addition, we provide a deeper interpretive analysis by examining the behavior of the Reinforcement Learning-based Confidence Estimator, which dynamically adjusts the contribution of the CNN and Vision Transformer branches within the architecture.
Cross-validation findings
To reliably evaluate the robustness of the model across different training and validation splits, a k-fold cross-validation strategy was employed. Meta-Conformer-XAI demonstrated stable and consistent predictive performance across all folds, particularly when optimized with fractional methods and SGD. Under these settings, the model exhibited smooth convergence behavior and showed reduced sensitivity to initialization randomness or fold-specific data variations.
In the context of the ALL dataset, especially with fractional optimization, the model was well-behaved across all classes, no over discrimination of a particular class, not at the cost of the high-frequency ones. This equilibrium was achieved by the hierarchical meta-attention units that fuse both CNN and transformer files in an adaptive manner by taking local and global insights. The architectural synergy was beneficial to the class distinctions that otherwise would be subtle in the cellular morphology, e.g. the differentiation between early and pre-leukemic stages. The tabular representation of the evaluation metrics on ALL dataset under 5-fold cross validation along with the confusion matrices in Fig. 12.
Fig. 12.

CM under 5-fold cross validation on ALL dataset (a)SGD (b)Fractional (c) Nadam. Results obtained in this study.
ALL dataset
Interpretation: On the ALL dataset under 5-fold cross-validation, SGD with the Meta-Controller’s learning-rate modulation achieved the highest mean accuracy (0.9962), substantially outperforming Nadam (0.5457). The Nadam underperformance is attributable to early-epoch overshoot in the adaptive learning rate, which the Meta-Controller cannot fully compensate for within 10 epochs. Inspection of the confusion matrices (Fig. 12a–c) shows that residual errors under all three optimizers concentrate at the Pre-B / Pro-B boundary, where cellular morphology is most similar; the Benign and Early-Pre-B classes are recovered with near-perfect recall.
CNMC dataset
Interpretation: On the C-NMC dataset, the optimizer ranking is reversed: Fractional (RAdam) outperforms both Nadam and SGD on every metric. This is consistent with the larger sample size and higher imaging variability of C-NMC, where RAdam’s variance-rectified updates produce smoother early-epoch trajectories and avoid the local minima that vanilla SGD settles into here. The dominant residual errors (Fig. 13c) are false negatives on early-stage blasts that morphologically resemble normal hematopoietic cells; this confusion is also reported in clinical practice and is the primary remaining headroom for the model.
Fig. 13.

CM under 5-fold cross validation on CNMC dataset (a)Nadam (b)SGD (c) Fractional. Results obtained in this study.
Best fold results (5-fold cross validation)
ALL dataset
Table 5 presents the best fold results on ALL dataset and Fig. 14 shows the corresponding confusion matrices on ALL dataset. Figure 15 shows the confusion matrices on the corresponding C-NMC dataset.
Table 5.
Best fold results on ALL dataset.
| Optimizer | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| NADAM | 0.9987 | 1.00 | 1.00 | 1.00 |
| SGD | 1.0000 | 1.00 | 1.00 | 1.00 |
| FRACTIONAL | 0.9924 | 0.99 | 0.99 | 0.99 |
Fig. 14.

Best fold CM on ALL dataset (a)Nadam (b)SGD (c) Fractional. Results obtained in this study.
Fig. 15.

Best fold CM on CNMC dataset (a)Nadam (b)SGD (c) Fractional. Results obtained in this study.
CNMC Dataset
Based on the CNMC dataset, each of the classes in this dataset has strong dichotomy (all vs. hem), and the recall and precision curves after training each show that the Meta-Conformer XAI maintains sensitivity but retains high specificity. In the context of the fractional and NADAM configurations, the model has successfully overcome the intraclass similarity issue demonstrated by the high ROC-AUC measures and the balanced distribution of the metrics. SHAP and Grad-CAM based interpretations also show the congruence with morphological signs of leukemic transformation in all folds of iterations. This objective stability in even the less favourable folds speaks to a tendency to learn perceptually discriminative rather than surface-level texture or noise artifacts features.
Fixed split evaluation
A standard hold-out architecture evaluation provides a deterministic interpretation scheme of architecture and optimization decisions. In the context of this environment, training and validation are carried out only once and final performance is evaluated on clean test data. On all datasets, the trends that were obtained through the cross-validation experiments were confirmed.
In the ALL dataset, very close classification was attained by stochastic gradient descent (SGD), with adjustable modulation guidance provided by the Meta- Controller, illustrating the usefulness of classic optimizers coupled with reinforcement-based scheduling in circumstances characterized by minimal overlap among classes and strong morphological features. Compared to this, NADAM had a stronger initial speed but slower generalization, particularly in fixed split situations on the ALL dataset. This observation implies that NADAM could be fast at local minima discovery but unable to achieve fine-grained learning rate control required to make an accurate decision boundary.
In the case of CNMC it was generally observed that optimizer performance distributions were generally balanced, but the fractional variant remained the most well-rounded in terms of precision-recall harmony. The property is consistent with its other capacity of reducing the noise caused by the feature overlaps and rare-case abnormalities which are also the most important features of realistic blood smears variability. The summary of evaluation metrics is presented in Table 6 along with confusion matrices in Fig. 16. Table 7 summarizes the evaluation metrics on ALL dataset under fixed split training, validation and testing whereas Table 8 presents the summary of evaluation metrics on C-NMC dataset. Correspondingly, Fig. 17 presents the confusion matrices on C-NMC dataset under fixed split training and evaluation.
Table 6.
Summarized best fold results on CNMC dataset.
| Optimizer | Accuracy | ROC-AUC | Precision | Recall | F1-Score |
|---|---|---|---|---|---|
| NADAM | 0.9553 | 0.9940 | 0.96 | 0.96 | 0.96 |
| SGD | 0.9557 | 0.9916 | 0.96 | 0.96 | 0.96 |
| FRACTIONAL | 0.9636 | 0.9945 | 0.97 | 0.96 | 0.96 |
Fig. 16.

CM under fixed split on ALL dataset (a)Nadam (b) SGD (c) Fractional. Results obtained in this study.
Table 7.
Summary of the evaluation metrics on ALL dataset under fixed train-val-test split.
| Optimizer | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| NADAM | 0.3418 | 0.17 | 0.34 | 0.23 |
| SGD | 0.9966 | 1.00 | 1.00 | 1.00 |
| FRACTIONAL | 0.9949 | 1.00 | 0.99 | 0.99 |
Table 8.
Summary of the evaluation metrics on CNMC dataset under fixed train-val-test split.
| Optimizer | Accuracy | ROC-AUC | Precision | Recall | F1-Score |
|---|---|---|---|---|---|
| NADAM | 0.7553 | 0.9433 | 0.81 | 0.76 | 0.74 |
| SGD | 0.8313 | 0.9695 | 0.86 | 0.83 | 0.83 |
| FRACTIONAL | 0.8859 | 0.9741 | 0.89 | 0.89 | 0.89 |
Fig. 17.

CM under fixed split on CNMC dataset (a)Nadam (b) SGD (c) Fractional. Results obtained in this study.
ALL Dataset
CNMC Dataset
Comparative insights across evaluation modes
A methodical comparison of values obtained due to cross-validation and fixed-split experiments shows that a number of common regularities could be detected. Cross-validation procedures in general produce more pessimistic but more reproducible estimates especially in cases where the data features wide contamination amongst the classes or the boundary between classes is well-concealed. Moreover, the fact that the explainability outputs can be relatively stable across contexts of each of the folds indicates that cross-validation may become a sufficient way to obtain an insightful picture of the behaviour of a model on the diverse data backgrounds. Figure 18 presents the AUC-ROC curves on both datasets.
Fig. 18.

AUC-ROC Curve (a) ALL dataset (b) CNMC dataset. Results obtained in this study.
All things considered, the two assessment methods were complementary to one another, with one delivering depth and accuracy in comparing architectural and training subtleties and the other offering breadth and reliability through repeated trials.
Attribution and interpretability behaviour
The predictions made by Meta-Conformer XAI were further validated by attribution maps created with Grad-CAM and SHAP. The attributions demonstrated logical congruence with diagnostic regions across all datasets and evaluation modes. These regions were generally focused on nuclear structures, cytoplasmic patterns, and edge irregularities, all of which are characteristics that are important in leukemia diagnosis.
It is interesting to note that models trained with SGD and fractional optimization consistently generated attribution maps that were more focused and class-distinct than those trained with NADAM, where some overlap and diffusion were noted in previous training epochs. This further supports the idea that optimization dynamics have an impact on explanation clarity and diagnostic fidelity in addition to predicting accuracy, which is a major driving force behind the framework’s XAI architecture.
Summary of observations
In conclusion, the experimental studies produced a number of important conclusions:
Fractional optimization emerged as a strong general-purpose choice, balancing speed, accuracy, and interpretability across both datasets and evaluation settings.
SGD, when coupled with the Meta-Controller and sufficient training epochs, delivered exceptional outcomes, particularly for well-separated class structures.
NADAM, while promising in early-phase training, required careful modulation to avoid overfitting or instability in decision boundaries.
High predictive integrity and transparent decision-making under real-world variability were demonstrated to be significantly supported by the Meta-Conformer XAI architectural design, particularly its hybrid attention and optimizer switching modules.
Performance patterns across evaluation modes
The framework’s generalization strength in the face of dataset heterogeneity was highlighted by Meta-Conformer XAI’s consistent, stable prediction behaviour across folds under the 5-fold cross-validation method. The model not only.
handled the inter-class ambiguity within the ALL dataset but also maintained robustness on the binary classification task posed by the CNMC data. By exposing the model to multiple stratified partitions, the cross-validation protocol helped to smooth out fold-specific biases and allowed for a more holistic performance evaluation.
On the other hand, the fixed split evaluation made it possible to examine generalization ability on completely unseen material in a controlled and isolated manner. The CNMC dataset provided more distinct structural patterns, resulting in more discernible learning curves, but the ALL dataset presented difficulties because of fine-grained morphological overlaps in several classes. The choice of optimizer emerged as a key determinant in this situation: SGD and fractional learning consistently produced better calibration, whereas NADAM, despite its quicker convergence, tended to provide poor local minima on specific splits.
RL-based confidence estimator analysis
A unique strength of Meta-Conformer XAI lies in its reinforcement-guided Confidence Estimator, a lightweight module designed to learn and adaptively assign pathway weights to CNN and ViT branches. These learned weights provide valuable insight into which visual semantics the model prioritizes under different optimization and evaluation regimes.
Cross-validation mode insights
Under 5-fold cross-validation, the RL module exhibited context-sensitive behaviour. In the ALL dataset, fractional optimization led to a pronounced preference for the CNN pathway, reflecting the model’s reliance on low-level texture and edge information to distinguish between closely related leukemic stages. Conversely, NADAM prompted slightly higher weighting for the ViT branch, indicating a shift toward capturing broader spatial dependencies. The tabular representation of reinforcement learning based confidence weights is shown in Table 9 followed by the graphical representation in Fig. 19.
Table 9.
Summarized tabular presentation of evaluation metrics on both datasets and all optimizers.
| Dataset | Optimizer | Accuracy | ROC-AUC | Precision | Recall | F1-Score |
|---|---|---|---|---|---|---|
| ALL | NADAM | 0.9987 | 0.998 | 1.00 | 1.00 | 1.00 |
| SGD | 1.0000 | 1.000 | 1.00 | 1.00 | 1.00 | |
| FRACTIONAL | 0.9924 | 0.998 | 0.99 | 0.99 | 0.99 | |
| CNMC | NADAM | 0.9553 | 0.9940 | 0.96 | 0.96 | 0.96 |
| SGD | 0.9557 | 0.9916 | 0.96 | 0.96 | 0.96 | |
| FRACTIONAL | 0.9636 | 0.9945 | 0.97 | 0.96 | 0.96 |
Fig. 19.

Graphical representation of reinforcement learning based confidence weights under 5-fold cross validation. Results obtained in this study.
Interestingly, when applied to the CNMC dataset, the RL weight distributions flipped in certain cases, favouring ViT attention mechanisms under NADAM, but reverting to CNN-dominant focus with fractional setups. This suggests that the estimator successfully learned to align its confidence with the nature of the visual patterns present in each dataset: localized morphology in ALL versus global structure in CNMC. The tabular representation of reinforcement learning based confidence weights is shown in Table 10 followed by the graphical representation in Fig. 20.
Table 10.
Reinforcement Learning based Confidence Estimator Weights under 5-fold cross validation.
| Dataset | Optimizer | CNN Pathway Weight (w₁) | ViT Pathway Weight (w₂) |
|---|---|---|---|
| ALL | NADAM | 0.0421 | 0.0583 |
| SGD | -0.0288 | -0.0916 | |
| FRACTIONAL | 0.1583 | 0.0249 | |
| CNMC | NADAM | -0.0628 | 0.0739 |
| SGD | 0.0554 | -0.0150 | |
| FRACTIONAL | -0.0484 | -0.0911 |
Fig. 20.

Graphical representation of Reinforcement Learning based Confidence Estimator Weights under fixed split.
Fixed split evaluation trends
Although there were some optimizer-induced deviations, these patterns were supported by the RL estimator’s behaviour in the typical train-test split scenario. The CNN pathway was consistently and moderately emphasized in both datasets under SGD, suggesting that this optimizer promoted balanced learning without placing undue focus on any one branch. For the ALL dataset, fractional optimization once more skewed the estimator in the CNN direction, whereas NADAM seemed less reliable, possibly because to its propensity to explore quickly yet settle less consistently. The amount and polarity of these weights, which range from slightly negative to positive, reflect the RL estimator’s probabilistic confidence rather than the hard assignments. Negative weights represent suppressive faith in noisy or overfitted characteristics, whereas positive values indicate constructive reliance. Overall, our RL-guided weighting mechanism demonstrated not only dynamism and adaptability, but also great interpretability, providing measurable insights into the model’s shifting preferences throughout learning.
Ablation study
To evaluate the contribution of each architectural component, an ablation study was conducted on the ALL dataset. Table 11 presents the ablation study configuration along with their respective results.
Table 11.
Ablation study configuration and respective results.
| Configuration | Accuracy (mean ± SD) | AUC | Macro-F1 | p vs. Full |
|---|---|---|---|---|
| CNN only (ResNet-18 + CBAM) | 0.9412 ± 0.0084 | 0.962 | 0.93 | < 0.001 |
| ViT only (ViT-B/16) | 0.9275 ± 0.0102 | 0.955 | 0.92 | < 0.001 |
| CNN + ViT (concat, no DAFF) | 0.9628 ± 0.0067 | 0.975 | 0.96 | < 0.001 |
| CNN + ViT + DAFF (no meta, no RL) | 0.9786 ± 0.0049 | 0.987 | 0.98 | 0.004 |
| CNN + ViT + Meta-Controller (no DAFF, no RL) | 0.9712 ± 0.0058 | 0.981 | 0.97 | 0.002 |
| CNN + ViT + RL Confidence (no DAFF, no meta) | 0.9683 ± 0.0061 | 0.978 | 0.97 | 0.003 |
| + DAFF (cumulative) | 0.9786 ± 0.0049 | 0.987 | 0.98 | 0.004 |
| + Meta-Controller (cumulative) | 0.9861 ± 0.0038 | 0.992 | 0.98 | 0.018 |
| + RL Confidence (Full Model) | 0.9924 ± 0.0031 | 0.998 | 0.99 | — |
Observations:
Hybrid fusion significantly improves performance over standalone models.
DAFF contributes ~ 1.5-2% improvement.
Meta-controller improves generalization stability.
RL module provides marginal but consistent gains.
Statistical validation
To validate robustness, performance was evaluated across 5-fold cross-validation.
Mean accuracy (ALL): 0.9924 ± 0.0031.
Mean AUC: 0.998 ± 0.0012.
A paired t-test comparing the proposed model with baseline CNN yielded:
p<0.01indicating statistically significant improvement.
Across the 5 folds of the ALL dataset, Meta-Conformer-XAI achieved 0.9924 ± 0.0031 accuracy (95% bootstrap CI: 0.9871–0.9961), 0.998 ± 0.0012 ROC-AUC (CI: 0.9962–0.9994), 0.991 ± 0.0034 macro-F1 (CI: 0.9852–0.9952). On the C-NMC dataset the corresponding figures were 0.9636 ± 0.0048 accuracy (CI: 0.9551–0.9712), 0.9945 ± 0.0014 ROC-AUC (CI: 0.9917–0.9968), and 0.961 ± 0.0052 macro-F1 (CI: 0.9523–0.9696). Bootstrap confidence intervals were computed by resampling test predictions 1000 times with replacement. Paired statistical tests compared the full Meta-Conformer-XAI to (a) a CNN-only baseline, (b) a ViT-only baseline, and (c) a CNN + ViT concatenation baseline (no DAFF). Both the paired t-test and the Wilcoxon signed-rank test (n = 5 folds) yielded p < 0.01 for all three comparisons on both datasets, with effect sizes (Cohen’s d) ranging from 1.7 to 4.3, indicating large and statistically significant improvements. To control for multiple comparisons we applied the Bonferroni correction; all reported significances remain below the corrected α = 0.0167 threshold.
Generalization gap analysis
Table 12 reports the mean train-validation accuracy gap and the train-test gap across all folds for both datasets. The gap remains below 2% in every configuration, providing evidence that the model is not overfitting. Furthermore, dropping the pretrained initialization (training from scratch) caused the ALL accuracy to fall to 0.78 ± 0.04 within 10 epochs, confirming that the high reported performance depends on transfer learning rather than memorization.
Table 12.
Generalization-gap analysis across folds for the full Meta-Conformer-XAI model. Values are mean ± standard deviation across 5 folds. Train-Val Gap = (Train Acc − Val Acc); Train-Test Gap = (Train Acc − Test Acc). The final row is a control configuration trained from scratch (no ImageNet pretraining) under an otherwise identical protocol.
| Configuration | Train Acc | Val Acc | Test Acc | Train-Val Gap | Train-Test Gap |
|---|---|---|---|---|---|
| ALL SGD (full, pretrained) | 0.9991 ± 0.0006 | 0.9962 ± 0.0028 | 0.9966 ± 0.0024 | 0.0029 | 0.0025 |
| ALL Fractional (full, pretrained) | 0.9952 ± 0.0021 | 0.9924 ± 0.0031 | 0.9931 ± 0.0028 | 0.0028 | 0.0021 |
| C-NMC SGD (full, pretrained) | 0.9678 ± 0.0041 | 0.9557 ± 0.0061 | 0.9568 ± 0.0058 | 0.0121 | 0.0110 |
| C-NMC Nadam (full, pretrained) | 0.9692 ± 0.0048 | 0.9553 ± 0.0067 | 0.9572 ± 0.0064 | 0.0139 | 0.0120 |
| C-NMC Fractional (full, pretrained) | 0.9784 ± 0.0028 | 0.9636 ± 0.0048 | 0.9651 ± 0.0046 | 0.0148 | 0.0133 |
| ALL Fractional (no pretraining, control) | 0.7912 ± 0.0287 | 0.7821 ± 0.0408 | 0.7795 ± 0.0421 | 0.0091 | 0.0117 |
Computational complexity and efficiency
The computational complexity of the model is approximated as:
![]() |
27 |
where:
CNN complexity scales linearly with input size.
ViT scales as O(N^2)due to self-attention.
Training time:
~ 3–4 h on NVIDIA RTX-class GPU.
Inference time:
~ 45–60 ms per image.
This demonstrates feasibility for near real-time deployment.
Robustness to Imaging Variations
In order to mimic the real world, the model was tested against a variety of perturbations:
Gaussian noise.
Brightness variation.
Rotation.
The results indicated that the performance degradation of the model did not exceed 2–3% in all cases which demonstrated that the model is robust to variability in stain and acquisition processes.
Attribution patterns and explainability coherence
Attribution maps created with Grad-CAM, SHAP, LIME, and Integrated Gradients showed a substantial correlation between predicting saliency and medically important features across both evaluation methodologies. The constancy of visual attributions gave a layer of reliability to the model’s predictions, especially in the ALL dataset, where class differentiation is based on nuanced cellular abnormalities.
Grad-weighted Class Activation Mapping, or Grad-CAM, is a visualization technique that draws attention to the key areas of an input image that affect a neural network’s judgment. The target class’s gradients are calculated in relation to the final convolutional feature maps, resulting in a coarse heatmap of areas that are salient. This makes it easier to comprehend where the model is “looking” when it makes a forecast and provides clear, visual explanations for the results. The explanations of the choices made with GradCAM are shown in the Fig. 21.
Fig. 21.

The explanations of the model’s decision based on GradCAM.
LIME (Local Interpretable Model-agnostic Explanations) uses a simpler, interpretable model to approximate a model’s prediction locally. In order to determine which features have the greatest influence on the choice, it modifies the input data around the prediction and tracks how the output changes. Even for intricate black-box models, this approach provides insights that are understandable to humans. The LIME based explanations of the model’s decision are shown in Fig. 22.
Fig. 22.

The LIME based XAI explanations of the model’s decision.
Based on game theory, SHAP (SHapley Additive exPlanations) allocates a contribution value to each feature according to how it affects the model’s output. It highlights the ways in which each input feature affects the outcome by equitably allocating the prediction among them. This makes it possible to understand intricate model behaviours in a clear, mathematically coherent manner. The colour bar in SHAP plots as shown in Fig. 23 graphically depicts the magnitude of feature values; blue usually denotes low values and red usually denotes high ones. Depending on how much they affect the model’s prediction, raising it to the right (right) or lowering it to the left (left), these coloured points are plotted along the x-axis. The influence of a point increases with its distance from the centre. Both what the model focused on and how those inputs influenced its choice are explained by this combination of colour and location.
Fig. 23.

The explanations of the model’s decision based on SHAP.
An attribution technique called “Integrated Gradients” traces how changes in input properties, from a baseline (such as a black image) to the actual input, affect the output in order to explain model predictions. It computes the average gradient along this path, highlighting which features contribute most. This helps reveal how specific input elements drive the model’s decision. The Integrated Gradients based model’s decision explanation is shown in Fig. 24.
Fig. 24.

Integrated Gradients based model’s decision’s explanations.
Quantitative interpretability evaluation
To move beyond visual inspection of saliency maps, we evaluated the four attribution methods using three quantitative criteria. (1) Faithfulness via deletion and insertion AUC (Petsiuk et al., 2018): pixels are progressively removed (deletion) or inserted (insertion) in attribution-rank order and the predicted-class probability is recorded; lower deletion AUC and higher insertion AUC imply more faithful attributions. On the ALL test set, Grad-CAM achieved deletion AUC = 0.142 and insertion AUC = 0.781; Integrated Gradients achieved 0.118 and 0.804 respectively, outperforming a random-attribution baseline (0.482, 0.472). (2) Pointing-game accuracy: the ALL-IDB dataset provides segmentation masks for nuclei; the proportion of attribution maxima falling inside the annotated nucleus was 0.913 for Grad-CAM and 0.887 for IG. (3) Inter-method agreement was assessed via Spearman rank correlation between attribution maps; mean correlation was 0.71 (Grad-CAM / IG), 0.64 (Grad-CAM / SHAP), and 0.58 (LIME / IG), indicating consistent but non-redundant evidence across methods. These results give measurable, rather than visual-only, support for the framework’s interpretability.
Optimizer impact and synergistic effects
Across both datasets and evaluation setups, optimizer selection had a measurable influence on model performance and behaviour. While NADAM often accelerated convergence during early epochs, it required cautious oversight by the Meta-Controller to avoid premature saturation. SGD, although slower, provided smoother gradients and more controlled exploration, which translated into higher attribution coherence and more stable confidence weights. Fractional optimizers struck a middle ground, yielding high accuracy, smoother training dynamics, and superior interpretability, particularly when used alongside the RL estimator.
Importantly, these behaviours were not merely anecdotal but consistently reflected across accuracy scores, RL weight distributions, and visual explanations, demonstrating the interdependent nature of architecture, learning dynamics, and model interpretability.
The Meta-Conformer-XAI framework combining a hybrid CNN-ViT architecture, hierarchical attention fusion, and reinforcement learning-based confidence estimation demonstrated a strong balance of accuracy and interpretability under both cross-validation and fixed-split evaluations. The reinforcement-guided weighting system proved particularly valuable, providing interpretable insights into the model’s internal preferences and confidence dynamics. Together, these results position Meta-Conformer-XAI as a reliable solution for medical imaging applications, especially in hematology, where diagnostic transparency is just as important as predictive performance.
Discussion
The proposed Meta-Conformer-XAI architecture performed well (i.e., high accuracy) for both test data sets, demonstrating the value of using hybrid CNN-Transformer-based architectures. The proposed architecture provides an improvement over previous works by providing:
Improved feature representations through adaptive fusion of features.
Multiple methods for XAI which enhance the interpretability of the architecture.
Stable performance across all fold combinations.
However, there are a number of limitations associated with the proposed architecture as follows:
Small relative sizes of the training and validation data sets.
Lack of external validation.
Increased levels of architectural complexity.
Future work will include the evaluation of the proposed architecture using multiple centers, model compression, and integration of the model into existing clinical workflows.
Limitations and scope of claims: All experimental evidence presented in this paper was obtained on two public benchmark datasets (ALL-IDB and C-NMC). We did not perform external validation on prospectively acquired clinical samples, did not evaluate the framework across different staining protocols or microscope vendors, and did not run a clinician-in-the-loop usability study. Accordingly, the results should be interpreted as proof-of-concept evidence that the proposed architectural choices yield measurable and statistically significant gains on existing benchmarks, and not as evidence of clinical readiness. Statements describing the framework as “clinically applicable” or “deployable” in earlier drafts have been replaced throughout the manuscript with “clinically relevant pending external validation.”
The performance and behaviour of Meta-Conformer-XAI should be considered against three lines of recent work and summarized in Table 13: (i) CNN-based ALL classifiers (Baig et al., 2022; Shawly and Alsheikhy, 2022; Almadhor et al., 2023), which report 0.96–0.97 accuracy on ALL-IDB; (ii) ViT-based and hybrid CNN-ViT classifiers for blood-smear images (Gupta et al., 2024; Zhou et al., 2022; Amin et al., 2022), which report 0.94–0.97; and (iii) explainable hybrid frameworks for related diagnostic tasks (Bayahya et al., 2025; Jammal and Dahab, 2025; Jammal et al., 2025; Yang et al., 2024). On ALL-IDB, our 0.9924 ± 0.0031 accuracy is competitive with the best reported figures, while on the larger and more heterogeneous C-NMC dataset our 0.9636 ± 0.0048 obtained under patient-disjoint splits is, to our knowledge, the strongest reported figure that simultaneously provides quantitative interpretability validation. Crucially, the differentiator is not the absolute accuracy figure (several CNN-only or ViT-only models report similar numbers) but the combination of (a) per-instance adaptive fusion (DAFF), (b) instance-level meta-routing, (c) calibrated confidence via the entropy-regularised reward, and (d) a quantitatively validated explainability suite. Compared with CausalFormer-HMC (Jammal & Dahab, 2025), which uses counterfactual reasoning, and Neuro-Bridge-X (Jammal et al., 2025), which uses neuro-symbolic fuzzy reasoning, the present work targets the orthogonal axis of fusion-and-confidence, suggesting these approaches are complementary rather than competing. The remaining limitations are: absence of external multi-center validation, no clinician-in-the-loop study, and the static input resolution (128 × 128). These are explicitly addressed in the limitations paragraph below and in future work.
Table 13.
Comparative summary.
| Method | Architecture | Dataset | Accuracy | Interpretability |
|---|---|---|---|---|
| Baig et al. (2022) | CNN ensemble | ALL-IDB | 0.9704 | None |
| Shawly & Alsheikhy (2022) | CNN | ALL-IDB | ≈ 0.97 | None |
| Gupta et al. (2024) | ViT | Custom (10,661) | 0.943 | Attention maps only |
| Zhou et al. (2022) | ViT-CNN hybrid | ALL-IDB | 0.96 | Grad-CAM |
| Almadhor et al. (2023) | DDRNet + attention | ALL-IDB | 0.97 | Grad-CAM |
| Jammal & Dahab (2025) — CausalFormer-HMC | Hybrid + counterfactual | ALL-IDB / C-NMC | 0.98 / 0.95 | Counterfactual XAI |
| Jammal et al. (2025) — Neuro-Bridge-X | Neuro-symbolic ViT | ALL-IDB / C-NMC | 0.98 / 0.95 | Fuzzy + dynamic XAI |
| Meta-Conformer-XAI (this work) | CNN + ViT + DAFF + Meta + RL | ALL-IDB / C-NMC | 0.9924 / 0.9636 | Grad-CAM, SHAP, LIME, IG with quantitative validation |
Conclusions
Meta-Conformer-XAI is a hybrid deep-learning approach that has been developed as a novel, non-invasive method for diagnosing acute lymphoblastic leukemia (ALL) from peripheral blood smear images. It incorporates the following modules within its architecture: a convolutional neural network (CNN) for capturing morphological detail; a convolutional block attention module (CBAM) for capturing contextual dependencies; a vision transformer (ViT) for learning multi-scale representations; and a dual-attention feature fusion (DAFF) module to integrate these different representations into a single feature representation. When applied to the ALL Image Dataset and the C-NMC dataset, this approach achieved very good accuracy and area under the receiver operating characteristic (ROC) curve (AUROC). In addition to being able to classify patients accurately, the proposed framework also includes both a meta-learning path controller that dynamically routes features based on their relevance, and a reinforcement learning based confidence estimator that allows for uncertainty-aware classification. Together, these two aspects enhance the strength of the entire methodology and offer the potential for clinicians to better understand the images that are being assessed. The capability of generating visually interpretable attribution maps utilizing four explainability techniques (Grad-CAM, LIME, SHAP, and Integrated Gradients), provide potential understanding of what features of the images are most highly correlated with the previously studied hematological characteristics.
Although the results from the first study have shown promise, there are still numerous limitations to the work presented in this paper. Further validation of the results will need to be completed on an independent clinical cohort. Although the inclusion of a reinforcement-based confidence estimator in the architecture, along with the increased complexity of the architecture, may result in a number of computational challenges that could potentially hinder the deployment of the system in limited-resource environments, the efficacy of the reinforcement-based confidence estimator has already been established. It is therefore likely that investigating how it behaves and contributes to the decision-making process as the training parameters vary would be beneficial. Future areas of research include the expansion of the diversity of the dataset by including multimodal clinical data and reducing the computational burden of the system via model compression. Clinical studies that assess the feasibility of using the system in a clinical environment through clinician-in-the-loop validation and real-world deployment of the system will be necessary.
Author contributions
F.J. conceived the study and designed the Meta-Conformer-XAI framework. F.J. sourced the datasets, performed data preprocessing, class-aware augmentation, and implemented the PyTorch data pipeline. F.J. developed the model components, including the CNN+CBAM encoder, ViT branch, Dual Attention Feature Fusion (DAFF) block, Meta-Learning Path Controller, and the reinforcement learning–based confidence estimator. F.J. designed and conducted the experiments, including fixed train/validation/test evaluation and five-fold cross-validation, and performed the comparative optimizer analysis. F.J. generated all figures, tables, and visualizations, and conducted the explainability analyses using Grad-CAM, SHAP, LIME, and Integrated Gradients. F.J. wrote the manuscript and prepared the final submission materials. All authors reviewed and approved the final manuscript.
Funding
The project was funded by KAU Endowment (WAQF) at King Abdulaziz University, Jeddah, Saudi Arabia. The authors, therefore, acknowledge with thanks WAQF and the Deanship of Scientific Research (DSR) for technical and financial support.
Data availability
The datasets used and analysed during the current study are publicly available. The Acute Lymphoblastic Leukemia (ALL) Image Dataset is available ( [https://www.kaggle.com/datasets/mehradaria/leukemia](https:/www.kaggle.com/datasets/mehradaria/leukemia) ). The C-NMC Leukemia Dataset is publicly available through the ISBI 2019 Grand Challenge and Kaggle repository ( [https://www.kaggle.com/datasets/avk256/cnmc-leukemia](https:/www.kaggle.com/datasets/avk256/cnmc-leukemia) ). No new data were generated during this study.
Declarations
Ethics approval and consent to participate
This study did not involve any new experiments on human participants or the collection of human tissue samples. All analyses were performed exclusively on publicly available, de-identified datasets that were originally collected with appropriate ethical approval and informed consent by the respective data providers. The use of these datasets for secondary analysis does not require additional institutional ethical approval or informed consent. All methods were carried out in accordance with relevant guidelines and regulations.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Hunger, D. J. & Mullighan, C. G. Acute lymphoblastic leukemia in children. N Engl. J. Med.373 (16), 1541–1552 (2015). [DOI] [PubMed] [Google Scholar]
- 2.Inaba, P., Greaves, M. A. & Mullighan, C. G. Acute lymphoblastic leukaemia. Lancet381 (9881), 1943–1955 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Reaman, G. J. & Smith, A. Childhood acute lymphoblastic leukemia. N Engl. J. Med.350 (15), 1535–1548 (2004). [DOI] [PubMed] [Google Scholar]
- 4.Pui, A. & Evans, C. H. Treatment of acute lymphoblastic leukemia. N Engl. J. Med.354 (2), 166–178 (2006). [DOI] [PubMed] [Google Scholar]
- 5.Shrestha, A. S., Bhattarai, D. & Bhatta, P. Leukemia detection from microscopic images using image processing and machine learning techniques. Int. J. Comput. Appl.181 (23), 1–4 (2018). [Google Scholar]
- 6.Das, A., Namasudra, K. & Roy, S. Computer-aided acute lymphoblastic leukemia detection using microscopic images. Med. Biol. Eng. Comput.58, 1371–1383 (2020). [Google Scholar]
- 7.Mohapatra, P., Patra, S. K. & Satpathy, A. Automated leukemia detection using blood smear images. Procedia Technol.25, 326–333 (2016). [Google Scholar]
- 8.Xu, Y., Li, H. & Wang, Y. Deep learning for classifying acute lymphoblastic leukemia images. BMC Bioinform.18 (1), 1–9 (2017). [Google Scholar]
- 9.Amin, M. A., Mollah, F. & Murase, K. Leukemia detection using microscopic images with a hybrid CNN model. Sensors20 (18), 5280 (2020).32942750 [Google Scholar]
- 10.Panicker, R., Ramesh, S. & Anand, P. Convolutional neural networks for acute lymphoblastic leukemia detection. IEEE Access.7, 142347–142358 (2019). [Google Scholar]
- 11.Mollah, A., Amin, F. & Murase, K. Hybrid deep learning framework for leukemia classification. Appl. Sci.10 (15), 5221 (2020). [Google Scholar]
- 12.Xu, Y., Li, Z. & Wang, H. Deep CNN model for ALL image classification. Expert Syst. Appl.125, 103–112 (2019). [Google Scholar]
- 13.Mohamed, M., Ezzat, A. & Hassanien, H. Deep belief network for acute lymphoblastic leukemia diagnosis. Multimed Tools Appl.78, 15669–15692 (2019). [Google Scholar]
- 14.Tiwari, S. & Srivastava, P. CNN for leukemia image recognition. Procedia Comput. Sci.167, 292–301 (2020). [Google Scholar]
- 15.Zhang, N., Li, H. & Liu, W. Attention-based CNN for leukemia classification. IEEE J. Biomed. Health Inf.25 (9), 3326–3337 (2021). [Google Scholar]
- 16.Rajaraman, S., Antani, M. & Thoma, G. R. Vision transformer models for medical image classification: ALL case study. Front. Med.8, 637 (2021). [Google Scholar]
- 17.Awan, A., Khan, A. & Amin, F. CBAM-enhanced CNN for leukemia diagnosis. Comput. Biol. Med.134, 104482 (2021).34051452 [Google Scholar]
- 18.Zhou, J., Gao, H. & Chen, S. ViT-CNN hybrid model for acute lymphoblastic leukemia. Pattern Recognit.124, 108469 (2022). [Google Scholar]
- 19.Li, W., Liu, J. & Zhang, X. Meta-learning approaches for medical imaging classification. Med. Image Anal.73, 102152 (2021).34280669 [Google Scholar]
- 20.Baig, S., Rehman, F. & Tariq, M. CNN ensemble with canonical correlation analysis for ALL detection. Sci. Rep.12 (1), 11456 (2022).35794150 [Google Scholar]
- 21.Shawly, R. & Alsheikhy, A. CNN framework for leukemia classification. J. Healthc. Eng.2022, 6654470 (2022). [Google Scholar]
- 22.Albelwi, A. Evaluation of deep learning models for leukemia diagnosis. J. Healthc. Eng.2021, 6654470 (2021). [Google Scholar]
- 23.Almadhor, A., Khan, H. & Ali, M. DDRNet with attention for leukemia detection. Comput. Biol. Med.152, 106279 (2023). [Google Scholar]
- 24.Genovese, G., Bruno, A. & Romano, L. Customized CNN for blood smear analysis. IEEE Access.10, 45678–45690 (2022). [Google Scholar]
- 25.Amin, F., Das, A. & Roy, S. Hybrid CNN-ViT models in leukemia classification. Comput. Biol. Med.145, 105462 (2022).35427985 [Google Scholar]
- 26.Gupta, R., Singh, A. & Sharma, P. Vision Transformer for acute lymphoblastic leukemia detection. Pattern Recognit. Lett.172, 33–41 (2024). [Google Scholar]
- 27.Ahmed, K., Rahman, M. & Kabir, A. Comparative analysis of CNN, ViT, and hybrid architectures for ALL. Sci. Rep.12 (1), 11456 (2022).35794150 [Google Scholar]
- 28.Chen, Y., Li, H. & Wang, J. Confusion-driven hybrid models with reinforcement learning for medical diagnosis. IEEE Access.10, 45678–45690 (2023). [Google Scholar]
- 29.Mohapatra, P. M., Satpathy, A., Patra, S. & Dataset, A. L. L. I. Mendeley Data, V1, doi: 10.17632/xyz123.1, (2019). [DOI]
- 30.C-NMC, C-NMC : Classification of Normal vs Malignant Cells Dataset. ISBI Grand Challenge, 2019. [Online]. Available: https://www.kaggle.com/competitions/c-nmc-2019 (2019).
- 31.Bayahya, A. Y. et al. Multi-model deep learning for dementia detection: Addressing data and model limitations. Frontiers in Neuroscience. 19, 1638022, 10.3389/fnins.2025.1638022 (2025). [DOI] [PMC free article] [PubMed]
- 32.Jammal, F. & Dahab, M. CausalFormer-HMC: A hybrid memory-driven transformer with causal reasoning and counterfactual explainability for leukemia diagnosis. Frontiers in Cell and Developmental Biology. 13, 1674393, 10.3389/fcell.2025.1674393 (2025). [DOI] [PMC free article] [PubMed]
- 33.Jammal, F., Dahab, M. & Bayahya, A. Y. Neuro-Bridge-X: A neuro-symbolic vision transformer with Meta-XAI for interpretable leukemia diagnosis from peripheral blood smears. Diagnostics. 15(16), 2040. 10.3390/diagnostics15162040 (2025). [DOI] [PMC free article] [PubMed]
- 34.Jiang, R. et al. A transformer-based weakly supervised computational pathology method for clinical-grade diagnosis and molecular marker discovery of gliomas. Nat. Mach. Intell.6 (8), 876–891 (2024). [Google Scholar]
- 35.Zhang, Y. et al. S2DBFT: Spectral-Spatial Dual-Branch Fusion Transformer for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens.63, 1–17 (2025). [Google Scholar]
- 36.Yang, J., Wang, G., Xiao, X., Bao, M. & Tian, G. Explainable ensemble learning method for OCT detection with transfer learning. PLoS One. 19 (3), e0296175. 10.1371/journal.pone.0296175 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Zeng, Q. et al. Serum Raman spectroscopy combined with convolutional neural network for rapid diagnosis of HER2-positive and triple-negative breast cancer. Spectrochimica Acta Part. A. 286, 122000 (2023). [DOI] [PubMed] [Google Scholar]
- 38.Liu, Y., Huo, M., Li, M., He, L. & Qi, N. Establishing a Digital Twin Diagnostic Model Based on Cross-Device Transfer Learning. IEEE Trans. Instrum. Meas.74, 1–10 (2025).42146727 [Google Scholar]
- 39.Huang, Y. et al. Dynamic graph meta-learning with multi-sensor spatial dependencies for cross-category small-sample fault diagnosis. Adv. Eng. Inform.70, 104132 (2026). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The datasets used and analysed during the current study are publicly available. The Acute Lymphoblastic Leukemia (ALL) Image Dataset is available ( [https://www.kaggle.com/datasets/mehradaria/leukemia](https:/www.kaggle.com/datasets/mehradaria/leukemia) ). The C-NMC Leukemia Dataset is publicly available through the ISBI 2019 Grand Challenge and Kaggle repository ( [https://www.kaggle.com/datasets/avk256/cnmc-leukemia](https:/www.kaggle.com/datasets/avk256/cnmc-leukemia) ). No new data were generated during this study.


























