1. Introduction
Malaria remains a significant parasite disease worldwide, with elevated morbidity and mortality rates in tropical and subtropical regions [
1]. Expert microscopy of Giemsa-stained blood smears is a significant component of clinical protocols. This approach can identify species-level differences, but it is time-consuming, requires considerable expertise, and is susceptible to variations in staining and image quality, complicating large-scale quality-assured screening. Expedited diagnostic methods might accelerate the process; nevertheless, their efficacy can decrease in cases of low parasitemia or infections not attributable to falciparum. Microscopy is a crucial component of numerous programs and laboratory networks [
2]. The issue of generalisation for algorithms trained in limited environments is further exacerbated in practice, as images increasingly originate from diverse sources, including standard microscopes with varying optics and configurations, as well as those captured on cell phones [
3]. The optical systems of conventional microscopes differ.
In the last ten years, machine learning (ML) and deep learning (DL) have emerged as potentially effective instruments for analysing malaria-related images [
4]. These systems operate efficiently in curated datasets; however, they frequently face issues related to stain/device variability and class imbalance [
5,
6].
Conventional machine learning techniques have demonstrated the feasibility of automated malaria screening; however, they often face challenges in preprocessing and feature generation [
7]. Errors in segmentation within packed fields and staining variability can distort color and texture descriptors. This can alter decision boundaries and diminish performance when microscopes or slide preparation techniques are modified [
5]. Reviews indicate that the evolution of imaging pipelines requires recalibrating features and thresholds. This not only increases maintenance costs, but also complicates the addition of additional locations [
6]. Employing non-imaging machine learning for incidence forecasting underscores that distributions are dynamic and that thorough validation must account for changes in data-generating methods. The data indicate that malaria CAD has become a distribution-shift issue. This implies that models must maintain stability throughout variations in staining, optics, and processes, rather than excelling solely on a singular curated dataset.
Contemporary CNN backbones have significantly reduced discrepancies between automated and expert analyses by directly learning features from pixel data and employing transfer learning to modify pre-trained filters for RBC morphology [
3,
8]. Comparative and application studies indicate that residual and efficient families offer significant trade-offs between accuracy and efficiency, which is crucial in resource-constrained scenarios [
9]. Hybrid multi-branch architectures that integrate EfficientNet-style stems with Dense, Residual, and Inception blocks can more effectively delineate the configuration of local parasites and the context of larger cells. This results in scores deemed superior on publicly available thin-smear datasets. Surveys indicate that the domain shift persists in laboratories, the quality of the labels varies, and insufficient validation can lead to metric inflation if split leakage is poorly managed within the laboratory. Empirical assessments indicate that even reliable backbones may lose robustness beyond the training distribution. This has led to the development of solutions that integrate complementary talents rather than relying on a single model [
8,
10]. Research on deployment highlights the necessity for compact models and pragmatic augmentation in scenarios with limited memory or computational resources. This illustrates the significance of selecting the appropriate approach for the field [
11].
We propose an ensemble that integrates multiple CNN backbones and employs non-uniform weighting to ensure that the most credible experts govern each distribution. For pragmatic purposes, a lightweight metaheuristic may be used to optimise mixture weights on a reserved validation subset. This enables the ensemble to focus on complementary error patterns without altering the backbones themselves. This weighting method works with classification-aware experts that require improved masks and efficient backbones for resource-constrained deployments, thus balancing accuracy, robustness, and efficiency [
12]. These design decisions directly tackle the documented issues of domain transitions, acquisition unpredictability, and deployment limitations, while remaining adaptable to more robust frameworks identified in the literature [
10].
The remainder of this document is structured as follows:
Section 2 offers an extensive review of current studies on malaria detection. In
Section 3, we present our proposed framework, which comprises a comprehensive account of preprocessing procedures, data augmentation techniques, feature extraction methods, and an ensemble learning architecture that employs deep classifiers and an optimisation algorithm.
Section 4 discusses the experimental setup, encompassing the dataset, evaluation metrics, and baseline configurations.
Section 5 presents the empirical findings. This entails evaluating individual models against our ensemble method and assessing the efficacy of the hybrid attributes. In conclusion,
Section 5 encapsulates the principal contributions and discusses potential avenues for future research.
3. Proposed Approach for Malaria Detection
We propose a dual-track pipeline: (A) Data augmentation → CNN feature extraction → classical machine learning classification; and (B) end-to-end deep models → paired ensembles → weighted fusion, with weights optimised by a hybrid Whale Optimisation Algorithm (WOA) and Genetic Algorithm (GA).
Our approach, presented in
Figure 1, integrates neural representations, traditional machine learning decision functions, contemporary deep architectures, and systematic ensemble optimisation to achieve robust, reproducible malaria detection from thin blood smear images. Significant data augmentation is applied at the beginning of the pipeline to mitigate the effects of class imbalance, microscopy variability, and staining alterations. Track A either immobilises or refines the CNN backbone based on validation signals after extracting discriminative features. It provides a range of machine learning classifiers, including SVM, KNN, Random Forest, Gradient Boosting, Logistic Regression, AdaBoost, Decision Tree, Gaussian Naive Bayes, and MLP, with fixed-length embeddings. In concurrent training, Track B trains multiple advanced deep neural networks from inception to completion, with each network providing calibrated class probabilities. To optimise the models’ disparities, we construct pairwise ensembles and use a convex combination to aggregate the probabilities.
We utilise a hybrid meta-heuristic model to optimise weights, defining fitness as the ratio of validation accuracy to the area under the receiver operating characteristic curve (F1/ROC-AUC). Initially, WOA is employed to cultivate a high-quality populace in proximity to potential places. Subsequently, GA adjusts the weights to converge towards a robust local optimal solution. This incremental optimisation technique accelerates convergence and reduces the likelihood of issues arising from random initialisation. The final report includes ablations (with or without augmentation; single versus ensemble) and comprehensive diagnostics (confusion matrix, ROC/PR curves, Cohen’s kappa, and MCC). The study additionally contrasts Track A and Track B under identical splits.
3.1. Dataset Description
We use a public NIH malaria dataset with Infected/Uninfected classes (27,558 images) to ensure comparability and accessibility.
The dataset comprises 27,558 RGB cell images, categorised into two files: “Infected” and “Uninfected.” This dataset is sourced from the National Institutes of Health’s malaria repository (
https://ceb.nlm.nih.gov/repositories/malaria-datasets/ accessed on 1 December 2025). It is commonly used as a standard for comparing parasitised cells with non-parasitised cells. To expedite the onboarding process and prevent prolonged downloads from the main website, we utilise a mirrored copy of the website. The images exhibit various alterations in cellular shape, magnification, focus, staining intensity, and artefacts. This diversity compels us to select augmentation and robust modelling. We typically employ the following methodologies: stratified train/validation/test divides, patient-level de-duplication when feasible, and uniform pre-processing. Utilising a public dataset enables objective comparisons with prior research and facilitates the replication of results through standardised protocols and seeds. We maintain comprehensive file lists for each split to ensure that future studies may be consistently replicated with various model families and ensemble configurations.
To ensure a reliable and unbiased assessment of our proposed framework, the dataset is partitioned into three distinct subsets: 70% for training, 10% for validation, and 20% for testing. The training subset is used to optimize the model parameters, while the validation subset supports hyperparameter tuning and early stopping. Importantly, the test subset is kept completely separate from the training process and is not used in any form of model optimization. This strict separation allows the test set to serve as a realistic benchmark, providing an accurate reflection of how the model would perform on previously unseen data in real-world diagnostic scenarios.
3.2. Data Augmentation
Augmentation is the process of incorporating additional data types, such as geometry, colour, and texture. This enhances generalisation across slides, microscopes, and staining conditions.
We employ a meticulously designed, balanced augmentation policy customised to our requirements for blood smear imaging. Geometric modifications include refractions, minor scaling or zooming, slight affine perturbations, and arbitrary rotations. Random rotations measure around x degrees. These algorithms replicate genuine acquisition settings, encompassing slide inclination, camera misalignment, and slight focus discrepancies. They precisely replicate these conditions. Photometric modifications, including regulated brightness and contrast adjustments, HSV and saturation adjustments, and per-channel noise, can effectively simulate staining discrepancies and illumination variations while preserving the morphology of chromatin and parasitic structures, which is crucial for precise identification. We also utilise Random Erasing, also known as small occlusions, to reduce the model’s reliance on artificial pixels confined to specific locations. The validation pipeline controls the intensity of these enhancements, as excessive blending can obscure minor parasite characteristics.
3.3. Ensemble Machine Learning for Malaria Detection
Classical machine learning ensembles, when utilised with CNN embeddings, establish robust baselines that require less computational effort and are more comprehensible.
We can train several machine learning classifiers with partially related errors by utilising CNN features as static embeddings. This approach is advantageous when computational or memory resources are limited or when elucidating the model’s functionality is crucial, for example, when evaluating feature importance in tree models or analysing margins in support vector machines.
3.3.1. Feature Extraction Based on CNN
We convert images into compact, distinctive vectors with a CNN backbone. Subsequently, we either freeze or slightly adjust the vectors to balance stability and task specificity. Images are resized (e.g., to ), normalised, and then processed by a truncated CNN prior to the classifier head. To obtain a fixed-length embedding (512–2048 dimensions), we use pooled feature maps obtained via global average pooling. To mitigate noise and enhance the efficacy of subsequent machine learning training, we can use a bottleneck (e.g., 256–512 dimensions) with dropout. We standardise embeddings and subsequently store them on disc for reproducible machine learning studies.
3.3.2. Classification Based on ML Models
We train several complementary ML classifiers on the CNN features and calibrate their outputs to obtain reliable probability estimates.
Support Vector Machine (SVM): It achieves this by maximising the margin in the embedding space. Utilising RBF kernels facilitates the capture of non-linear boundaries, while class weighting helps maintain balance. Support Vector Machines (SVMs) are robust to small amounts of noise in the samples and often produce distinct decision boundaries.
Primal (soft-margin, linear):
Kernel decision:
K-Nearest Neighbours (KNN):A non-parametric baseline utilising local neighbourhoods in feature space; this baseline is straightforward and performs effectively when embeddings are appropriately clustered. The distance measurements and k are adjusted to balance bias and variation. In feature space, the distance-weighted vote, sometimes referred to as the majority vote:
Decision Tree:Hierarchical splits that are comprehensible and exhibit feature thresholds; although these splits may tend to overfit independently, they are valuable for identifying significant dimensions and for employing weak learners. Split by impurity minimization:
Random Forest (RF):An ensemble of bagged trees that reduces variation through averaging; it accommodates non-linearities and feature interactions, and includes inherent out-of-bag validation for stability assessment. Bagged trees with feature sub-sampling:
Gradient Boosting (GB):With stringent regularisation (depth, learning rate, and subsampling), sequential trees that address prior residuals perform effectively on tabular embeddings.
Additive model via pseudo-residuals:
with
, and
line-searched.
Exponential loss, reweighting:
Gaussian Naive Bayes (GNB): Fast, probabilistic baseline assuming conditional independence; valuable as a lightweight reference for calibration and error analysis.
Class-conditional independence:
Logistic Regression (LR): Strong linear classifier with calibrated probabilities; with L1/L2 regularisation provides a sparse, interpretable decision surface.
Linear log-odds with cross-entropy:
MLP Classifier: A shallow, fully connected network utilising embeddings can capture minor non-linearities without the full complexity of end-to-end CNN training. Feed-forward network with softmax head:
3.4. Ensemble Deep Learning for Malaria Detection
We extensively train many contemporary CNN architectures from inception to completion, utilising paired ensembles and optimal weight fusion. We then utilise the distinction among these designs.
We employ a collection of deep models characterised by varying receptive fields, depths, and design paradigms to obtain the most complementary errors. Each model generates a calibrated probability. Various augmentations, seeds, and minor modifications to the training protocol (optimizers/schedules) enhance the complexity. We combine ensemble models, initially using identical weights and subsequently employing optimised weights (
Section 3.4.2).
Residual skip connections mitigate disappearing gradients, facilitating the stable training of deeper networks. Bottleneck blocks enhance efficiency; however, multi-stage downsampling balances detail and context, proving advantageous for diminutive parasitic structures. V2 variations enhance pre-activation and normalisation sequencing, resulting in improved gradients [
32].
Skip connections ease optimization:
VGG-16:A basic arrangement of three-by-three convolutions accompanied by maximum pooling. It has several parameters yet provides robust baselines and comprehensible layer activations. It is a straightforward model that performs effectively against contemporary concepts [
33].
where the convolutional base (
) is a sequence of blocks (Conv(F) denotes a
convolution with F filters, followed by ReLU, and MaxPool denotes
max pooling):
Block 1:
Block 2:
Block 3:
Block 4:
Block 5:
And the final classification head uses these steps:
: Flattens the final feature map () into a vector.
FC-1: Fully Connected layer (4096 units, with weights ) + ReLU.
FC-2: Fully Connected layer (4096 units, with weights ) + ReLU.
FC-3: Fully Connected layer (1000 units, with weights ) + Softmax activation.
InceptionV3: Factorised convolutions and “Inception” blocks with many branches effectively capture features at varying scales. This is beneficial when the parasite’s morphology changes in size and contrast across images [
34].
Multi-branch factorization for multi-scale capture:
Xception:Depthwise separable convolutions separate spatial and channel dimensions, thereby enhancing computational efficiency and improving feature extraction. These convolutions are pretty effective at smearing, producing subtle textural patterns [
35,
36].
Depthwise separable convolutions:
stacked within residual blocks.
Incorporating inverted residuals and linear bottlenecks enables the creation of lightweight models that are sufficiently effective for practical use [
37]. Despite its low FLOPs, it maintains considerable accuracy due to depthwise operations.
Inverted residual with linear bottleneck:
DenseNet121Dense connections frequently perform effectively on medical images with limited data, as they enhance feature reuse and gradient propagation. Fine-grained characteristics can transition across levels [
38].
Dense connectivity for feature reuse:
NASNetMobile:The mobile version strikes an effective balance between speed and accuracy, enhancing the ensemble’s architectural diversity. The architecture was identified by neural search [
39].
Searched cells (normal/reduction) forming the macro-net:
EfficientNet-B0/B7 & EfficientNetV2-B0/V2-S: It is remarkable how effectively Fused-MBConv blocks (V2) and compound scaling (depth/width/resolution) harmonise accuracy and efficiency [
40]. Elevated resolutions (B7, V2-S) might encompass a more comprehensive background when variations increase [
41].
With MBConv/Fused-MBConv and squeeze–excitation.
ConvNeXt-Large: A modernized ConvNet with transformer-inspired design cues (large kernels, layer scaling, simpler stems), often yielding excellent performance on vision tasks while remaining CNN-like [
42].
Modernized ConvNet with large kernels:
3.4.1. Ensemble Learning
We amalgamate probabilities and create aligned ensembles to mitigate volatility and optimise complimentary strengths.
We initiate the procedure of enumerating paired ensembles and determining the fused probability, denoted as , utilising deep models independently trained. With a value of set at 0.5, equal weights establish a robust baseline that enhances calibration and stability due to error decorrelation. We employ a validation split to evaluate each pair and identify combinations that consistently perform optimally, such as EfficientNetV2S and ConvNeXtLarge. Ensembles typically enhance ROC-AUC, PR-AUC, and Specificity without compromising Sensitivity, which is advantageous for screening applications. We additionally affirm that the enhancements remain consistent despite minor test-time augmentations (TTA) and when comparing folds. To prevent overfitting the validation set, we either employ layered validation or maintain a tiny tuning subset exclusively for weight selection. This systematic pairing provides the candidate set for weight optimisation, which will be discussed in the subsequent section.
Given two calibrated predictors with probabilities
and
, we use
Equal weights (
) serve as a strong baseline; optimized weights are obtained in
Section 3.4.2.
3.4.2. Weight Selection for Ensemble Learning Based on Optimization Algorithm
We employ constrained optimisation to select our weights, utilising accuracy as the fitness metric, and apply the F1 and ROC-AUC criterion to resolve ties.
We seek weights
on the simplex defined by
, with each
constrained to the interval [0, 1]. This is accomplished using a model pair (A, B). When multiple weights achieve equivalent accuracy, we select the one with superior accuracy to achieve an optimal balance between precision and recall. The fitness is denoted by Accuracy
for a specific system in the partitioning validation. Our approach emphasises robust operational points rather than overly confident ones. To prevent oscillations, we restrict the step size or mutation range and terminate early when improvements stabilise. The resulting weights are evaluated on an unused test set to obtain an impartial assessment of their efficacy.
3.4.3. WOA and GA Hybridization
The Weight Optimisation Algorithm (WOA) generates a superior weight population, while the Genetic Algorithm (GA) enhances and utilises this population to identify more optimal solutions.
The Whale Optimisation Algorithm (WOA) is inspired by the hunting techniques of humpback whales utilising bubble nets. The objective is to achieve a balance between exploration (seeking numerous alternatives) and exploitation (concentrating on optimal choices). It employs encircling, spiral bubble-net manoeuvres, and random search with diminishing control parameters over time to transition from exploration to exploitation and refine viable solutions. In our context, WOA can rapidly identify intriguing locations on the simplex represented as . This results in the establishment of a diverse and high-quality initial population. A standard, complete WOA runs until full convergence, meaning all whales have essentially landed on . This algorithm is designed to run only for a fixed number of iterations (). By stopping after iterations, the population of whales will have moved into a promising region, but they will not have fully collapsed onto a single point yet.
The Genetic Algorithm (GA) evolves populations over time through selection, crossover, and mutation processes. It accomplishes this by aggregating the weights of highly fit individuals to identify children with superior fitness. The genetic algorithm (GA) excels at local exploitation within favourable basins through elitism and adaptive mutation. It can also escape shallow local optima.
We initiate our hybridisation method by executing WOA for a limited number of iterations to generate a population concentrated on promising weight combinations. This cohort is the inaugural batch utilised by genetic algorithms (GAs) for targeted exploitation. Selection prioritises individuals with superior precision, crossover facilitates the amalgamation of complementary weights, and mutation seeks minor alterations within the simplex while ensuring that . The WOA→GA pipeline minimises the impact of random initialisations on outcomes, accelerates convergence, and establishes stable weights applicable for both validation and testing. The next step involves utilising the selected to amalgamate probabilities during inference. Subsequently, we present the whole array of metrics, including accuracy, precision, recall/sensitivity, specificity, F1 score, ROC-AUC, PR-AUC, Cohen’s kappa, and the Matthews correlation coefficient (MCC). We also present confusion matrices to aid elucidation.
Unlike existing malaria detection studies that rely on simple majority voting or fixed averaging of CNN models, our method introduces a two-branch architecture that unifies CNN based embeddings with classical ML and diverse deep networks into a single framework. Furthermore, we integrate a hybrid WOA→GA mechanism for continuous convex weight optimization. This model presented by the Algorithm 1. WOA explores wide regions of the weight simplex to identify high quality candidate solutions, while GA refines these solutions through elitism and adaptive mutation. This hybrid strategy improves convergence smoothness, avoids grid search discretization bias, and yields more stable operating points compared with Bayesian or grid based tuning methods.
| Algorithm 1 Hybrid Weight Selection for Pairwise Ensemble (WOA → GA) | |
Require: Validation set ; probabilities ; sizes ; iterations | |
1: Fitness: for , | |
2: Initialize WOA whales uniformly | |
3: for to do | ▹ WOA exploration/exploitation |
4: Evaluate ; let be the best | |
5: ; draw ; , | |
6: for each whale i do | |
7: if then | ▹ encircling best |
8: | |
9: else | ▹ random search |
10: pick random ; | |
11: end if | |
12: With prob. p, spiral update: | |
13: Project | |
14: end for | |
15: end for | |
16: Initialize GA population by sampling from final WOA whales | |
17: for to do | ▹ GA exploitation |
18: Evaluate fitness and select parents (e.g., tournament) | |
19: Crossover: , | |
20: Mutation: , | |
21: Elitism: keep top-k individuals | |
22: end for | |
23: return | |
24: | |
4. Results and Discussion
The proposed framework for malaria detection was rigorously evaluated across four experimental phases, as detailed in the following subsections.
Section 4.1 establishes a baseline using prevalent machine learning algorithms, including Support Vector Machines (SVMs), Random Forests (RFs), and k-Nearest Neighbours (k-NN). These classical models could generalise only to a limited set of complex parasitic cell topologies, albeit with a reasonable level of realism.
Section 4.2 details how deep learning architectures such as VGG16, ResNet50, and EfficientNet significantly outperformed standard models. These designs might autonomously acquire multiscale spatial and textural features, thereby improving sensitivity and F1-score.
Section 4.3 addresses ensemble learning. This entails aggregating the probabilistic outputs of multiple deep models to enhance their stability and robustness. This ensemble technique outperformed others on Receiver Operating Characteristic (ROC) and Cohen’s Kappa, indicating greater model concordance and lower variance. Finally,
Section 4.4 presents a method for selecting weights that uses an optimisation strategy to determine each classifier’s contribution to the ensemble. This ensures the optimal equilibrium between precision and generalisation.
To quantitatively assess performance, seven well-known evaluation metrics were employed: Accuracy, Precision, Recall (Sensitivity), Specificity, F1-score, ROC-AUC, and Cohen’s Kappa. Let
,
,
, and
denote true positives, true negatives, false positives, and false negatives, respectively. The mathematical definitions of these metrics are given as follows:
The Receiver Operating Characteristic–Area Under the Curve (ROC-AUC) quantifies the model’s ability to distinguish between positive and negative classes by integrating the true positive rate (TPR) and the false positive rate (FPR) over all decision thresholds.
Cohen’s Kappa coefficient, which evaluates the agreement between the predicted and actual labels while adjusting for chance agreement, is defined as:
where
is the observed accuracy and
is the expected accuracy due to random chance.
4.1. Machine Learning for Malaria Detection
This phase of the approach employed deep feature extraction alongside standard machine learning algorithms to build a hybrid classification framework. The utilisation of Convolutional Neural Networks (CNNs) as feature extractors enabled the automatic generation of high-level representations from thin blood smear pictures. These representations precisely captured spatial and textural indicators relevant to malaria diagnosis. Subsequently, these distinctive features were integrated into various conventional machine learning classifiers, yielding a CNN-based hybrid architecture. This architecture was designed to leverage the representational capabilities of deep learning while maintaining the interpretability and efficiency of classical models.
The results presented in
Table 1 demonstrate the efficacy of the hybrid CNN–ML approach for malaria identification. The CNN-based feature extraction method markedly improved the discriminative power of all traditional classifiers compared to the use of CNN-based feature extraction on manually generated features. Despite the detailed nature of CNN embeddings, simpler techniques such as Gaussian Naïve Bayes and Support Vector Machines (SVMs) generally exhibit lower accuracy, ranging from 63% to 69%. This is due to their inability to represent non-linear decision boundaries fully. Conversely, ensemble methods such as Random Forest and Gradient Boosting achieved accuracies exceeding 82%, non-parasitised and ROC-AUC values of approximately 0.91. These methods were advantageous as they could integrate multiple weak learners and replicate intricate relationships among CNN features. Logistic Regression and the MLP classifier achieved the highest predictive accuracies, with values of 0.8714 and 0.8828, respectively. The Cohen’s Kappa scores were 0.7427 and 0.7656, indicating substantial agreement between the labels. The MLP exhibited the highest overall ROC-AUC (0.9549) and Specificity (0.9343), indicating superior performance in accurately rejecting non-parasitized samples. The results suggest that employing CNN-based deep feature extraction alongside traditional machine learning models yields a robust hybrid solution that harmonises interpretability, efficiency, and predictive performance. Therefore, further exploration of authentic deep architectures and ensemble fusion techniques is essential, as detailed in the following subsections.
We examined many classifiers, including Support Vector Machine (SVM), K-Nearest Neighbours (KNN), Decision Tree (DT), Random Forest (RF), Gradient Boosting (GB), AdaBoost (AB), Gaussian Naïve Bayes (GNB), Logistic Regression (LR), and Multi-Layer Perceptron (MLP). Each model utilised the feature vectors generated by the CNN as input. A stratified 10-fold cross-validation method was used during training to ensure the models’ robustness. The grid search optimisation method was employed to reduce bias and variance by tuning hyperparameters. The objective of this hybrid approach was to evaluate the efficacy of traditional models in utilising CNN-derived embeddings to differentiate between red blood cells infected with parasites and those that are uninfected.
4.2. Deep Learning Model for Malaria Classification
We developed and analysed various deep convolutional neural network (CNN) architectures to classify blood smear images as either infected with malaria or not. This phase utilised comprehensive deep learning models that independently execute feature extraction and classification within a unified framework. In the final section, we discus a hybrid CNN–ML pipeline. This differs from independent models. The weights for each model were initially trained on ImageNet and subsequently fine-tuned using the malaria dataset. This was implemented to accelerate convergence and prevent overfitting to a limited set of medical samples. To enhance generality, we employed various data augmentation techniques, including rotation, horizontal flipping, contrast normalisation, and others. The Adam optimiser was employed to improve the procedure. This optimiser had an adjustable learning rate, used categorical cross-entropy loss, and incorporated an early-stopping criterion based on validation performance.
The evaluated models include
ResNet50,
EfficientNetB0,
EfficientNetV2B0,
InceptionV3,
Xception,
MobileNetV2,
DenseNet121,
NASNetMobile,
ResNet101V2,
EfficientNetB7,
EfficientNetV2S,
ConvNeXtLarge, and
VGG16. These architectures represent various CNN families designed to balance model depth, parameter efficiency, and receptive-field size. Their comparative performance metrics are summarized in
Table 2.
The results in
Table 2 and in
Figure 2 indicate that all deep CNN architectures performed exceptionally well in classification tasks. All architectures achieved accuracies exceeding 93% and area under the curve (AUC) scores exceeding 0.98. The findings indicate that contemporary CNN designs are proficient at distinguishing individuals with malaria from those without. The ConvNeXtLarge model achieved the highest overall accuracy (0.9579), F1 Score (0.9581), and ROC AUC (0.9918) among all evaluated models. This is demonstrated by its ability to accurately depict intricate cellular classifying malaria images, therebymorphology and hierarchical spatial patterns. The EfficientNet family performed admirably, particularly EfficientNetV2S and EfficientNetB7, which achieved Kappa values over 0.91 and accuracies exceeding 0.954. This demonstrates the efficacy of these models in balancing performance and computational cost.
Legacy architectures such as VGG16, InceptionV3, and Xception exhibit marginally inferior metrics (around 0.93–0.94 accuracy) because of their greater number of parameters and less adaptable scaling techniques. The metrics produced by these architectures were slightly worse. Deep learning effectively reduces both false positives and false negatives, thereby achieving reliable diagnostic sensitivity, as evidenced by the consistently high Precision and Recall across all models. The inclusion of the PR-AUC, Kappa, and MCC metrics further substantiates the model’s stability and concordance with ground-truth annotations. In conclusion, the findings indicate that deep convolutional neural networks (CNNs) significantly outperform conventional machine learning baselines in the classification of malaria images, hence demonstrating enhanced reliability and generalisability. These findings encourage the implementation of ensemble and optimisation approaches, which will be detailed in the following subsections, to improve robustness and interpretability.
4.3. Ensemble Learning for Malaria Detection
Upon concluding our evaluation of the efficacy of several deep learning architectures, we explored ensemble learning to enhance categorisation stability and prediction reliability. The primary objective was to combine the probabilistic outputs (posterior probabilities) of two separately trained CNN models using pairwise averaging. This would enable the acquisition of complimentary feature representations from diverse architectures. This stage is an intermediate fusion level that preserves the diversity of base learners while ensuring computational efficiency.
The final forecast was obtained by averaging the softmax probabilities of both models. We amalgamated each pair of models with equal weights (
=
= 0.5) to obtain the final forecast. This straightforward yet effective combination operates on the premise that different designs discern distinct attributes of cell morphology, such as texture, colour, and structural cues. Integrating their assessments helps mitigate overfitting and enhance generality.
Table 3 presents a summary of all the pairwise ensembles created during the process. We employed the same test partition and performance metrics for each ensemble. The metrics employed were accuracy, precision, recall, F
1-score, ROC-AUC, and PR-AUC. This was executed to ensure uniformity across all elements.
The statistics in
Table 3 indicate that ensemble fusion resulted in a consistent enhancement in performance relative to standalone deep neural networks. ROC-AUC values beyond 0.99 demonstrated that the majority of pairwise combinations attained accuracies exceeding 95%, hence validating the complimentary characteristics of the aforementioned CNN architectures. The combination of EfficientNetV2S and ConvNeXtLarge achieved commendable performance, with the highest overall accuracy (0.9632) and F1 Score (0.9631). Comparable high-performing pairs, such as EffNetV2B0 + ConvNeXtLarge and ResNet101V2 + EfficientNetV2S, exhibit robust ROC-AUC values (exceeding 0.992) and stable Precision–Recall AUC scores. The findings indicate that these couples exhibit resilience despite the disparity in class status.
It is particularly crucial to emphasise that ensembles comprising models from diverse architectural families, such as residual (ResNet) and compound-scaled (EfficientNet) networks, outperformed those consisting of closely related variants. This indicates the need to present a diverse array of models to reduce the incidence of interconnected errors. Ensemble averaging optimally leverages each network’s capabilities to produce a more stable and generalisable classifier. This is evidenced by improvements across all performance indicators (Accuracy, Precision, Recall, F1, ROC-AUC, and PR-AUC). We observed an increase in all performance metrics. The paired findings formed the basis for the subsequent phase of the optimisation procedure, which uses adaptive weight selection to further enhance the ensemble’s performance.
4.4. Explainability Analysis Using Grad-CAM
To further validate the reliability of the proposed models and ensure that their decisions are guided by clinically meaningful image regions, we employed Gradient-weighted Class Activation Mapping (Grad-CAM) to visualize the spatial attention of each deep network. Grad-CAM produces a heatmap from the final convolutional layer, highlighting the areas that most strongly influence the model’s prediction. As shown in
Figure 3, these quantitative findings are further supported by the Grad-CAM visualizations, which confirm that the models focus on biologically meaningful regions.
For Uninfected samples, the Grad-CAM visualizations consistently showed weak and diffuse activation, primarily concentrated around the red blood cell boundary. This indicates that the models do not mistakenly focus on irrelevant intra-cellular regions, and correctly identify the absence of parasite-like structures. The low-intensity response across the interior of healthy cells confirms that no false parasite patterns were detected. In contrast, for Parasitized samples, the heatmaps revealed strong, highly localized activation corresponding to canonical morphological patterns of Plasmodium infection. Bright yellow and red regions typically aligned with chromatin dots, ring forms, and other parasite-induced features within the cell cytoplasm. This demonstrates that the CNNs learned to rely on parasite-specific regions rather than staining artifacts or background noise, which improves the interpretability and trustworthiness of the system. Among all evaluated architectures, EfficientNetV2S and ConvNeXtLarge exhibited the most concentrated and biologically coherent activation patterns. Their heatmaps showed precise focus on intra-cellular parasite regions, reflecting their superior classification performance. Since these two models constitute the final hybrid ensemble, their Grad-CAM results effectively represent the interpretability of the overall system. As ensemble fusion operates at the probability level, the hybrid model has no convolutional layers of its own; therefore, Grad-CAM cannot be computed directly on the ensemble. Instead, the attention maps of the constituent CNNs serve as the interpretable explanation of the hybrid classifier. Overall, the Grad-CAM visualizations confirm that the proposed models do not act as “black boxes.” Rather, they base their predictions on medically relevant parasite structures, thereby enhancing confidence in the diagnostic decisions produced by the hybrid deep learning framework.
4.5. Weight Selection for Ensemble Learning
To surpass simple averaging, we learn the contribution of two top-performing CNNs—EfficientNetV2S and ConvNeXtLarge—via an
optimized Algorithm. Let
and
denote the posterior probabilities for the positive class. The fused probability is a convex combination
We formulate weight learning as a single-variable constrained optimization:
The optimisation approach maintains a set of potential weights, selects those exhibiting optimal fitness, merges parent solutions (crossover) to explore promising regions, and introduces stochastic alterations (mutation) to prevent premature convergence. This search approach is practical in the continuous space
and yields a solution that approximates the optimal one without employing derivatives.
Table 4 presents a summary of the optimal individuals from each generation of the Genetic Algorithm (GA) retained throughout the adaptive weight optimisation for EfficientNetV2S and ConvNeXtLarge. Each item corresponds to the weight pair
recognised for its exceptional performance within a population. The results indicate a distinct evolutionary pattern: the initial generations explore a broad spectrum of weight choices, but subsequent generations progressively converge on a small optimal range centred around
. This indicates that the search process is robust and the fitness landscape is substantial.
Throughout all stored populations, accuracy gradually increases, reaching a maximum of 0.9635% at convergence. In the initial generations, it was approximately 0.958 percent. The F1-scores for the optimal solution exhibit a consistent pattern, attaining a value of . The ROC-AUC and PR-AUC scores remain exceptionally high, at 0.9918 and 0.9926, respectively. Most of the enhancements result from minor adjustments to the equilibrium among Precision, Recall, and Specificity, rather than from significant changes in separability. The genetic algorithm appears to have identified a globally stable region rather than an overfitted local extremum, as evidenced by the narrow plateau observed at the optimal value.
Furthermore, the evolutionary archive indicates that further generations yield minimal performance variations (<0.001) when the algorithm reaches this plateau, so validating the convergence criterion and demonstrating the reproducibility of the selected weights. The GA-based ensemble tuning is reliable, comprehensible, and reliably convergent. This makes it a reliable method for adaptively weighting multiple deep networks for effective malaria diagnosis. The results of this evolutionary selection indicate that the optimal choice is a harmonious equilibrium between the discriminative capabilities of ConvNeXtLarge and the efficient feature encoding attributes of EfficientNetV2S.
The data in
Table 4 indicates that the test performance is evaluated across a substantial quantity of weights. The landscape exhibits a broad optimal zone centred on
–
. This indicates that ConvNeXtLarge provides a significantly greater contribution. The optimal accuracy occurs at
and
, whereas the highest PR-AUC is seen for
. The ROC-AUC will be effectively maximised at approximately
across the whole ideal plateau. This indicates that separability will remain robust at all times. The equal-weight baseline
demonstrates commendable performance, with an Accuracy of 0.9630 and a F
1 score of 0.9629. Adjusting it with optimal results in a modest yet consistent increase in both Accuracy and F
1, while preserving exceptional calibration (PR-AUC).
In our practical application, we utilise the value of (specifically, and ), which yields , , ROC-AUC = 0.9930, and PR-AUC = 0.9937. The results indicate that optimised weight selection is an effective method for improving the performance of equal averaging and single-model baselines. This results in a robust operating point characterised by balanced Precision and Recall, together with persistent Specificity.
4.6. Validation of the Proposed Approach Using a Large Thick and Thin-Smear Dataset
We used the Malaria Dataset from the Nelson Mandela African Institution of Science and Technology (NM-AIST) [
43] to do a full evaluation of the adaptive-weighted ensemble architecture we showed. This was to prove that it works and is reliable. This dataset, released in 2024, comprises 3544 images acquired using two smear preparation techniques: thick films (2210 images) and thin films (1334 images). The thick-smear subset enables a thorough, unbiased evaluation because it has a balanced class distribution (Thick-Infected = 1139; Thick-Uninfected = 1071). Even though it is slightly unbalanced (Thin-Infected = 1064 and Thin-Uninfected = 270), the thin-smear subgroup provides additional information on cell shape needed for a full multimodal evaluation.
Table 5 shows examples of thick and thin smear microscopy images that are typical of the total. In thick smears that have been infected, you can usually see little chromatin foci that are darkly stained and clustered parasite remains that are embedded in dense proteinaceous material. You can see parasite parts because these structures are either purple or blue and stand out against a background that is not very clear. Thick smears that are not infected, on the other hand, have diffuse stain deposits, platelet-like particles, or non-parasitic debris without any visible chromatin signals. The NM-AIST dataset contains thin-smear images showing staining patterns different from those seen in typical Giemsa thin films, and was used in the first part of our research. The NM-AIST thin smears don’t always preserve the full shape of each red blood cell, as shown in the example image and in
Figure 4.
On the other hand, the smear frequently exhibits partially lysed or deformed red blood cells, resulting in sections that are cloudy, diffuse, and characterised by varying background density. You may see parasite chromatin as small, purple or blue dots scattered across these diffuse regions. However, compared with the best thin-smear preparations, the parasite chromatin within intact erythrocytes is less clear. Uninfected NM-AIST thin smears exhibit heterogeneous staining and amorphous material, rather than clearly defined RBC boundaries. These traits suggest that the “Thin” subset in NM-AIST is more like a weakly lysed preparation than a standard monolayer thin film. Consequently, it serves as an additional component of the thick-smear subset, providing a second smear type that is also visually distinct. The first dataset we used in our research came from thin blood smears; thick films have quite different morphological and optical properties. Thick smears purposefully lyse red cells, creating a granular, heterogeneous matrix characterised by increased stain density and heightened background variability. Thin smears, on the other hand, preserve the shape of red blood cells, making the edges of cells crisper and the shapes of parasites more structured. Images from thin smears show the parasite’s internal phases, whereas images from thick smears show the concentrated parasite chromatin against a thicker background. To ensure the adaptive ensemble model works well across different microscopy modes and preparation techniques, the suggested method should be tested on a specific thick-film dataset. These inherent disparities among smear types emphasise the need to evaluate the proposed procedure.
Thick smears present unique diagnostic challenges due to their disrupted cellular structure, varied background appearance, and increased parasite density. Testing the proposed methodology on this dataset allows us to evaluate its efficacy in both realistic and visually complex scenarios. The data in
Table 6 indicates that the adaptive-weighted ensemble frequently outperforms its individual deep components. It has superior accuracy, precision, recall, and agreement coefficients (Kappa and MCC). The results indicate that the ensemble framework effectively integrates complementary deep representations, thereby facilitating the differentiation of thick-film malaria detection.
The trial results utilising the NM-AIST thick-smear dataset illustrate the robustness and efficacy of the adaptive-weighted deep ensemble developed for malaria parasite detection. Thick-film microscopy introduces significant variability in staining density, background texture, and parasite concentration, rendering automated analysis in this domain particularly challenging. Nonetheless, the group consistently performed well across all rating criteria. EfficientNetV2S and ConvNeXtLarge are two complementary backbone architectures, each possessing distinct advantages that synergise effectively. These strengths significantly influenced the observed performance. ConvNeXtLarge offers enhanced specificity and stability across many backgrounds, whereas EfficientNetV2S exhibits increased sensitivity to even the most nuanced parasite characteristics. The enhanced algorithmic weighting may effectively integrate these strengths into a unified decision-making mechanism, resulting in superior overall performance.
The results indicate that the ensemble is not significantly reliant on the feature space of a singular model. Rather, it maximises the interactions among multiple profound representations. In thick-film analysis, where visual intricacy may diminish the accuracy of individual models, this adaptability is crucial as it enhances control over the results. The findings indicate that adaptive ensemble learning may be a reliable method for screening for thick-smear malaria.
4.7. Evaluation of the Combined Thick–Thin Training Strategy
To evaluate the efficacy of the proposed adaptive-weighted ensemble in diverse imaging conditions, we performed an extensive experiment using both thick and thin blood-smear pictures from the NM-AIST dataset for concurrent training and assessment. This was executed to demonstrate that the ensemble can accommodate various image conditions. The model undergoes significant alterations in staining, morphology, background structure, and parasite appearance when used in this combinatorial arrangement, compared with research that relies solely on a single smear-preparation technique. Thin smears preserve the integrity of red blood cell membranes and reveal intracellular parasitic species characterised by distinct ring or chromatin structures. Thick smears, conversely, lyse red blood cells, resulting in dense backgrounds and freely floating chromatin puncta. Training the network on this multimodal distribution equips the model with a broader array of discriminative features that can accommodate variations in morphology and staining.
The entire dataset was divided into three segments: 70% for training, 10% for validation, and 20% for testing. This was executed to ensure an adequate mixture of infected and uninfected samples within each subset. Label stratification was maintained throughout the entire process. Data augmentation was utilised just during the training phase to improve generalisation and reduce overfitting. We trained two advanced convolutional backbones, EfficientNetV2S and ConvNeXtLarge, using the same methodology. Subsequently, we integrated their outputs utilising our genetic algorithm (GA)-optimized adaptive weighting method.
Table 7 illustrates the performance of each model and the optimised ensemble. EfficientNetV2S achieved an accuracy of 95.63%, a precision of 98.35%, and a recall of 94.56%. Conversely, ConvNeXtLarge achieved an accuracy of 95.07% and a slightly superior recall. The proposed GA-optimised ensemble regularly outperformed individual models, achieving 96.62% accuracy, 97.25% F1-score, and improved agreement metrics (Kappa = 0.9287, MCC = 0.9291). The results indicate that the ensemble effectively harnesses the strengths of the various models rather than merely averaging their deficiencies.
Further insight into the ensemble’s predictive behaviour is provided by the confusion matrix in
Figure 5, which shows excellent discrimination between the two classes. Out of 710 test images, the ensemble correctly classified 262 uninfected and 424 infected samples, resulting in only 24 misclassifications (7 false positives and 17 false negatives). The very low false-positive rate is particularly important in clinical screening scenarios, as it minimizes unnecessary follow-up tests on healthy individuals.
These findings strongly indicate that training on a combined Thick–Thin dataset improves the model’s ability to generalize across diverse smear preparation techniques and imaging characteristics. The adaptive-weighted fusion further enhances robustness by integrating complementary recognition patterns from EfficientNetV2S and ConvNeXtLarge. Overall, the results confirm that the proposed ensemble architecture offers a reliable and scalable solution for malaria parasite detection across heterogeneous microscopy data.
4.8. Limitations and Future Work
Despite the positive results on the NM-AIST dataset, it is essential to acknowledge certain limitations. Although it is one of the largest publicly accessible datasets of thick-film microscopy, it is limited to data from a single location and employs uniform staining procedures, microscope apparatus, and acquisition parameters. Secondly, thick smears fail to reveal red blood cell morphology, and patterns may vary significantly depending on dye concentration, illumination, and slide preparation quality. The current evaluation may not fully demonstrate performance disparities across laboratories or variations in clinical workflows. Due to the absence of standardised acquisition data, it is unfeasible to examine how these factors influence the model’s behaviour or generate latent biases.
Moreover, while effective, the application of optimisation techniques incurs additional computational costs during the offline weight search phase. Nonetheless, this expenditure occurs only once, and the ultimately deployed ensemble necessitates no additional effort beyond standard inference.
The current study focuses solely on classifying diseases into two distinct categories. In the real world, diagnostic tests may require additional capabilities, such as staging parasites, quantifying them, or differentiating them by species. The existing thick-smear datasets are insufficient for the comprehensive annotations required for these activities.
Future research will investigate multi-centre thick-smear collections, focusing on the evaluation of generalisability across various acquisition contexts: (i) domain adaptation methods to reduce sensitivity to staining and imaging variability; (ii) lightweight model compression for deployment in resource-constrained environments; (iii) extension to species-level detection; and (iv) enhanced interpretability through advanced explainability frameworks beyond Grad-CAM. These represent other domains of inquiry now under investigation.
4.9. Comparative Analysis with Existing Malaria Detection Approaches
To contextualise the hybrid and optimised ensemble architecture we developed, we juxtapose our findings with contemporary research on automated detection of malaria using microscopic blood smear images. Utilising handcrafted features such as texture descriptors, colour histograms, or morphological traits in conjunction with classifiers 85% to 90% in conventional machine learning pipelines. Despite their apparent simplicity, these procedures are fraught with numerous issues. For instance, their efficacy depends on the quality of feature engineering, and they cannot capture deep spatial hierarchies in cellular images.
As shown in
Table 8, deep learning has significantly enhanced the efficacy of convolutional neural networks (CNNs) such as VGG16, InceptionV3, and ResNet50 in object detection. These CNNs have achieved accuracy rates of 93% to 95%. Although these structures may autonomously extract multiscale visual features, their efficacy may still be compromised by overfitting and differences across datasets. Recent experiments utilising lightweight or compound-scaled designs, such as MobileNetV2 and EfficientNetB0, have demonstrated improved computational efficiency. However, this augmentation typically results in a slight decrease in overall precision and recall.
Compared with these established approaches, our results demonstrate a significant performance improvement. The proposed combination of EfficientNetV2S and ConvNeXtLarge, optimised by a Genetic Algorithm for weight selection, achieves an overall Accuracy of 0.9635, F1 score of 0.9635, ROC-AUC of 0.9930, and PR-AUC of 0.9937. This approach surpasses individual CNN models and previous ensembles that used static averaging or voting, which often yield ROC-AUC values below 0.985. The enhancement results from the collaboration of three synergistic components. The components are: (i) CNN-based feature extraction, which identifies robust spatial patterns; (ii) ensemble fusion, which reduces variance and enhances generalisation; and (iii) adaptive genetic weighting, which maintains balanced contributions from the model.
Furthermore, our architecture demonstrates greater consistency across all assessment criteria than hybrid frameworks reported in the literature that combine CNN-extracted features with traditional classifiers. It also demonstrates excellent specificity (exceeding 96%), an essential factor in reducing false positives in medical diagnostics. The results indicate that employing evolutionary optimisation on deep model ensembles represents a significant advancement in automated malaria detection. This advancement yields more reliable diagnoses, improved generalisation across diverse sample types, and a valuable foundation for therapeutic applications in resource-limited settings.