Researchers have built a small convolutional neural network, trained entirely from scratch without pretrained weights, that distinguishes microscopic images of healthy blood cells from cells affected by acute lymphoblastic leukemia (ALL) with 94.50% test accuracy. The model, called CustomLightBloodNet, achieved this performance with only 597,394 trainable parameters, corresponding to roughly 2.279 MB of FP32 parameter storage, and the work is reported in Frontiers in Artificial Intelligence.
The study is a retrospective image-classification experiment, not a clinical trial. The team evaluated the network on the publicly released C-NMC 2019 training collection from The Cancer Imaging Archive, which contains 10,661 microscopic blood-cell images: 3,389 Healthy/hem images and 7,272 ALL/leukemia-positive images. These images come from 73 subjects, 47 with ALL and 26 normal, so the dataset represents many cell crops per person rather than thousands of independent patients. The images are Wright–Giemsa-type stained, bright-field RGB crops of segmented cells, with original annotations provided by an expert oncologist.
The data were divided into three partitions of 7,462 training, 1,599 validation, and 1,600 testing images, approximately 70%, 15%, and 15% of the collection. Importantly, the split was made at the subject level: 51 subjects for training, 11 for validation, and 11 for testing, with zero overlapping subjects, so cells from any one person appeared in only one partition. This design prevents subject-level data leakage, a common concern in medical image datasets where multiple crops of the same patient’s cells can inflate measured performance if spread across splits.
Class imbalance shaped much of the training strategy. Because ALL images outnumber healthy images by more than two to one, the authors argued that raw accuracy alone could mask weak performance on the minority class. The training pipeline therefore combined a WeightedRandomSampler that gives minority-class samples a higher probability of selection, class-weighted focal cross-entropy loss, label smoothing, and checkpoint selection based on validation macro-F1, a metric in which each class contributes equally regardless of frequency. Validation and test sets retained their natural class distributions, so imbalance correction affected only optimization, not evaluation conditions.
Architecturally, the network processes 224 × 224 RGB images through a lightweight stem and five hierarchical stages, with spatial resolution falling from 112 × 112 to 7 × 7 while channel width grows from 24 to 192. It relies on depthwise-separable inverted residual blocks, which use pointwise expansion, depthwise convolution, squeeze-and-excitation, projection, and residual connections with DropPath and LayerScale-style stabilization. The authors stress that no individual component is newly invented; the contribution lies in the targeted integration of these elements within one compact architecture.
A distinctive feature is the multi-scale morphology module, in which parallel branches using 3 × 3, 5 × 5, and dilated 3 × 3 convolutions process intermediate representations simultaneously. The rationale is that differences between healthy and leukemic cells may appear at multiple spatial scales, so a single fixed receptive field may be insufficient. After multi-scale fusion, channel-wise squeeze-and-excitation and lightweight spatial attention emphasize informative channels and locations. For global aggregation, the network does not commit to a single pooling operation: global average pooling, global maximum pooling, and generalized mean pooling are combined through trainable softmax-normalized coefficients, with the generalized-mean exponent itself learnable.
On the held-out test set under standard single-view inference, the model reached 94.50% accuracy, 93.19% balanced accuracy, 93.60% macro-F1, a Matthews correlation coefficient of 0.8723, 94.73% ROC-AUC, and 94.86% PR-AUC. Test-time augmentation, which averages predictions from the original image, a horizontal flip, and a vertical flip, raised accuracy to 94.94% and macro-F1 to 94.13%. The authors characterize these TTA gains as modest refinements rather than large post-hoc improvements, indicating that the standard model already generalizes consistently.
Class-wise analysis showed asymmetric error behavior. The model correctly classified 456 of 509 Healthy/hem test images and 1,056 of 1,091 ALL images, giving a Healthy recognition rate of 89.59% and an ALL recognition rate of 96.79%. Healthy/hem samples achieved precision of 0.9307, recall of 0.8959, and F1-score of 0.9130, while ALL samples achieved precision of 0.9519, recall of 0.9679, and F1-score of 0.9598. Roughly 10.41% of healthy samples were confused with ALL, compared with 3.21% of ALL samples classified as healthy, confirming that minority-class recognition remains the harder part of the task.
Uncertainty was addressed in two complementary ways. Paired stratified bootstrap resampling with 2,000 replicates on the fixed test set produced 95% confidence intervals including accuracy (0.933, 0.956), macro-F1 (0.923, 0.948), and MCC (0.846, 0.898). Separately, five independent training runs with different random seeds yielded mean accuracy of 0.943 ± 0.005 and mean macro-F1 of 0.935 ± 0.006, characterizing optimization variability. The authors note that bootstrap resampling and training repeats measure different sources of uncertainty and are not interchangeable.
Ablation experiments probed each design choice under identical partitions, seeds, augmentation, and optimization budget. Removing the multi-scale morphology block lowered macro-F1 from 0.9360 to 0.9180, and removing both attention modules lowered it to 0.9214. Replacing the learnable pooling with fixed global average pooling reduced macro-F1 to 0.9221. However, the learnable pooling mixture exceeded fixed three-pooling fusion by only 0.0022 macro-F1, with a paired bootstrap 95% confidence interval of (−0.007, 0.011) and a two-sided p-value of 0.62, which the authors describe as a modest point-estimate gain without statistically conclusive evidence of superiority.
The from-scratch model was also compared against matched pretrained references trained under the same protocol. ImageNet-initialized ResNet-18 achieved 0.938 accuracy and 0.927 macro-F1 with 11.7 million parameters; MobileNetV3-Small reached 0.931 and 0.918 with 2.5 million parameters; and EfficientNet-B0 reached 0.946 and 0.935 with 5.3 million parameters. CustomLightBloodNet’s 597,394 parameters place it well below all three, and the authors caution that superiority or generalization against pretrained models requires exactly these matched experiments rather than inference from architecture alone.
External validation used the public ALL-IDB2 dataset from the University of Milan, containing 260 labeled single-cell crops, 130 normal and 130 blast, acquired in a different laboratory context. The frozen C-NMC-trained checkpoint, evaluated without any training or threshold tuning on this data, achieved external accuracy of 0.862, balanced accuracy of 0.858, macro-F1 of 0.856, and ROC-AUC of 0.920. Because ALL-IDB2 is small and optically distinct, the authors advise interpreting these external figures with appropriate caution.
Interpretability was provided through Grad-CAM heatmaps extracted from the final pointwise convolution of the last feature-refinement stage. For correctly classified samples, attention concentrated around prominent cellular structures, suggesting the model uses localized morphological information rather than background regions. A blinded assessment of 80 heatmaps by two hematologists yielded a Cohen’s kappa of 0.72 and a mean expert-mask IoU of 0.59. The authors emphasize that Grad-CAM highlights pixels influencing a class score but does not establish that highlighted regions are malignant cells, validated biomarkers, or causal features, and heatmaps can shift with layer choice or image transformations.
The study’s limitations are stated directly. The results are internal-split findings on a single retrospective dataset, and the authors note that further research should include patient-level separation checks, uncertainty analysis, and independent external validation. Before any clinical implementation, they list prospective multi-institution testing, specimen-level validation, laboratory information-system integration, hematologist-in-the-loop review, bias monitoring, workflow safety checks, and applicable medical-device regulatory assessment as requirements. Within those bounds, the work demonstrates that a purpose-designed, morphology-aware network under one million parameters can jointly deliver compact computation, balanced discrimination, and interpretable predictions for computer-assisted ALL image classification.
The training pipeline itself followed a defined optimization recipe. The network was trained with AdamW at an initial learning rate of 3 × 10−4 with weight decay of 10−4, cosine learning-rate decay toward 10−6, mixed precision, and gradient-norm clipping. Early stopping used a patience of 18 epochs, and training terminated at epoch 90. The selected checkpoint came at epoch 72, where validation macro-F1 peaked at 0.9448, alongside validation accuracy of 0.9462, balanced accuracy of 0.9431, ROC-AUC of 0.9490, and PR-AUC of 0.9479. Macro-F1 was chosen for checkpoint selection because it weights each class equally, an important property when accuracy can be dominated by the larger ALL class.
Image preparation also followed a documented sequence. Cell crops were resized to 224 × 224 pixels with aspect-ratio-preserving padding and normalized with standard channel statistics. Training-only augmentation included horizontal and vertical flips, rotation of ±15 degrees, translation of ±5 percent, mild brightness, contrast, and saturation jitter, and random erasing, while validation and testing used deterministic resizing and normalization only. Augmentation was applied after partitioning so that transformed images could not cross splits, and corrupted files and exact duplicates were screened out using cryptographic hashes.
The imbalance-strategy ablation offered additional detail. Ordinary random sampling with unweighted cross-entropy produced a macro-F1 of 0.902, weighted sampling alone reached 0.912, class weighting alone 0.917, and focal loss alone 0.922. Combining weighted sampling with class weighting raised macro-F1 to 0.929, while the complete strategy reached 0.9360, with a 95% confidence interval of (0.922, 0.949).
The authors also note what their pipeline does not measure. Model efficiency is quantified only by parameter count, trainable parameters, and estimated FP32 storage; FLOPs, inference latency, energy consumption, and real-time capability were not calculated and are therefore not reported.
Subject of Research: A lightweight from-scratch convolutional neural network for classifying acute lymphoblastic leukemia in microscopic blood-cell images
Article Title: A morphology aware lightweight multi scale attention CNN with adaptive mixed pooling for acute lymphoblastic leukemia classification
Article References: Hanif, F., Mohammed, H. A., Raza, A., & Farman, M. (2026). A morphology aware lightweight multi scale attention CNN with adaptive mixed pooling for acute lymphoblastic leukemia classification. Frontiers in Artificial Intelligence, 9, Article 1974196. https://doi.org/10.3389/frai.2026.1974196
Image Credits: AI Generated
DOI: 10.3389/frai.2026.1974196
Keywords: acute lymphoblastic leukemia, blood-cell image classification, convolutional neural network, lightweight architecture, from-scratch training, multi-scale feature extraction, attention mechanism, adaptive pooling, class imbalance, focal loss, Grad-CAM, C-NMC 2019 dataset, test-time augmentation, external validation, subject-level data splitting, macro-F1, depthwise-separable convolution, computer-assisted screening
News Source: Nathaniel Bowman. (December 6, 2026). Compact from-scratch CNN classifies leukemia blood cells with high accuracy. Scienmag.



