Preprint
Article

This version is not peer-reviewed.

MalariaNet: A Microcontroller-Deployable Malaria-Microscopy Detector for Point-of-Care Biosensing Under Leakage-Free Evaluation

A peer-reviewed article of this preprint also exists.

Submitted:

08 June 2026

Posted:

09 June 2026

You are already at the latest version

Abstract
Compact malaria detectors for microcontrollers are almost always benchmarked on the NIH Malaria dataset with a per-cell random split. This leaks slide identity, because the cells come from only about 200 slides and a random split mixes same-slide cells across training and test. Under a leakage-free slide-disjoint protocol, the leakage fabricates architectural conclusions. Per-module ablation gains collapse to seed noise, and an apparent cross-site robustness variant loses most of its advantage. Headline accuracy falls from 97.1% to 95.6%, a gap that sits within the cross-seed noise, and all eight tested architectures move the same way. The evidence is this unanimous direction, not the size of any single gap. This self-critical finding is our main contribution. Two results still survive. First, MalariaNet, our 21K-parameter detector, reaches about 95.6% accuracy at 23.5KB of INT8 weights, with a numerically faithful on-chip forward on an STM32H743 at a 1.2FPS triage rate. Second, it is the second most interference-robust of the eight networks and the most robust microcontroller-deployable model. Scope is limited to P. falciparum thin-smear single cells. Slide-disjoint evaluation should become standard, and we provide MalariaNet as the first leakage-free, on-device-validated point-of-care malaria reference.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

Malaria ranks among the deadliest infectious diseases worldwide, with 249 million cases and 608,000 deaths in 2022, predominantly in sub-Saharan Africa [1]. The gold standard is microscopic examination of Giemsa-stained blood smears. It depends on trained microscopists, who are critically scarce in endemic regions. Each examination takes 20–30 minutes and exhibits significant inter-observer variability [2].
Deep learning has demonstrated remarkable potential for automated malaria detection [3,4]. However, nearly all existing systems depend on GPU servers, cloud connectivity, or, at minimum, smartphone-class hardware. This makes deployment in resource-limited environments challenging. The emerging paradigm of IoT-based edge intelligence runs AI inference directly on low-power microcontrollers (MCUs). It opens a new path toward autonomous point-of-care diagnostic terminals that operate without network connectivity or centralized infrastructure [5].
Modern MCUs such as the STM32H7 series feature a Cortex-M7 core up to 480 MHz, 2 MB Flash, and 1 MB RAM, and cost under $10. They can serve as intelligent edge nodes in healthcare IoT ecosystems. Such nodes perform local inference, display diagnostic results on-device, and optionally report aggregated findings to regional health authorities. To bring malaria detection onto these devices, however, the deployed models must be orders of magnitude smaller than conventional architectures while still preserving clinical-grade diagnostic accuracy.
Progress on automated malaria microscopy is measured almost entirely on one public benchmark, the NIH Malaria Cell Images dataset of 27,558 single-cell images. Crucially, these cells are not independent. They were segmented from the thin blood smears of roughly 200 patient slides, and the originating slide is encoded in every filename. Yet essentially all prior work, and the first version of this study, evaluates with a per-cell random split. Such a split places cells from the same slide into training, validation and test simultaneously. Cells from one slide share staining batch, illumination, focus and background. Per-cell splitting therefore leaks slide identity and optimistically biases every reported number. It is unknown, to our knowledge, whether the headline accuracies and architectural conclusions in the MCU-malaria literature are inflated by slide leakage. This is the central concern of this paper.
To examine it under controlled conditions, we use a compact, interpretable domain-aware detector, MalariaNet, as the testbed. Its design follows a two-domain decomposition of Giemsa microscopy. The first domain is a low-dimensional stain-colour cue, in which parasites stain purple or blue and host cells pink or red. The second is multi-scale parasite morphology across life-cycle stages. This decomposition is realised by three parameter-frugal modules with 21 K parameters in total: a Stain-Colour Feature Extractor (SCFE) on raw RGB, a Multi-Scale Morphology Encoder (MSME) with biologically motivated receptive fields, and a Cross-Domain Diagnostic Gate (CDDG) that fuses the two streams. We stress that we present this decomposition as an interpretable, MCU-frugal design, not as a set of empirically superior modules. As our results show, the apparent per-module advantages are themselves a slide-leakage artefact.
Our contributions, reported without selection, are:
  • Primary contribution: slide leakage fabricates accuracyandarchitectural conclusions on the NIH malaria benchmark. We re-evaluate an identical architecture under a leakage-free slide-disjoint protocol, a group split on the slide identifier with three seeds. Accuracy then drops from 97.06 ± 0.45 % to 95.61 ± 1.02 %. This 1.45  pp fall is itself within the ± 1.02 seed standard deviation. Our evidence is therefore not the headline magnitude but the unanimous direction. Every one of the eight tested architectures inflated the same way, and every design conclusion below collapses. Leakage manufactures spurious design conclusions. First, every per-module ablation gain reported under per-cell splitting, namely +0.78/+0.38/+0.56/+0.37 pp, collapses to within seed noise and partly inverts, as detailed in Section 4.4. Second, a prototype-cosine classifier variant appears to deliver a striking +7.0 pp cross-site robustness gain under per-cell training. When both models are retrained under the leakage-free protocol, it gives only +1.8 pp within ±5.5 pp seed noise. The “robustness variant” is itself a leakage artefact, as shown in Section 4.8. Slide leakage thus invents plausible-looking innovations, not merely larger numbers. We recommend slide-disjoint evaluation become standard for this benchmark.
  • A leakage-free, on-device-validated compact baseline. What survives rigorous evaluation is a single honest artifact. Under the slide-disjoint protocol, the 21 K-parameter detector reaches ≈95.6% while fitting the STM32H743 envelope. On-chip, it uses 23.5 KB INT8 weights and runs a measured 816 ms per 128 × 128 cell, a 1.23 FPS triage rate, for a numerically-faithful forward pass. INT8 preserves FP32 accuracy within 0.05  pp. This provides an honestly benchmarked, deployable reference for point-of-care malaria biosensing rather than an inflated one.
  • A rigorously-validated interference-robustness advantage. The portable-microscope scenario actually requires resilience to imaging degradation. On this property, under a leakage-free 3-seed all-CNN degradation sweep, the compact model is the 2nd-most-robust of eight CNNs, with an accuracy drop of 21.8  pp from S0 to S5, as reported in Section 4.10. It trails only the 530 × -larger, non-deployable ResNet-18, and is, by a seed-consistent margin, the most robust MCU-deployable model. Unlike the per-module ablations and the prototype variant, this advantage survives leakage-free evaluation. Knowledge distillation from the leakage-free EfficientNet-B0 teacher additionally recovers ≈1/3 of the clean-accuracy gap, from 95.6 % to 96.0 %, at zero inference cost, as reported in Section 4.11. We report it honestly as a partial mitigation, not a gap-closer.
The remainder of this paper is organized as follows. Section 2 reviews MCU-malaria detectors and the evaluation practices they adopt. Section 3 describes the MalariaNet testbed and the MalariaNet-P variant. Section 4 defines the per-cell vs. slide-disjoint protocols in Section 4.1.2 and reports leakage-free main results, the ablation collapse, on-device deployment, and cross-site transfer. Section 5 discusses the leakage finding and its implications for the field. Section 6 concludes.

3. Proposed Method

This section details MalariaNet, the compact two-stream detector used as the controlled testbed for this study. We stress at the outset what Section 4 establishes empirically. The stain–morphology decomposition below is presented as an interpretable, MCU-frugal design, not as a set of empirically superior modules. Under leakage-free evaluation, the apparent per-module advantages are a slide-leakage artefact. The module descriptions that follow therefore motivate design choices. They should not be read as claims of validated per-module gains. We present the overall two-stream architecture, the three modules SCFE, MSME and CDDG, and the multi-task head, and close with a per-module complexity analysis.

3.1. Overview

Figure 1 illustrates the overall architecture of MalariaNet. Given a 128 × 128 × 3 input image, two parallel domain-specific streams process it independently. SCFE operates directly on the raw RGB input to capture chromatic staining patterns. In parallel, a lightweight stem extracts low-level features at 32 × 32 resolution, which MSME then processes for structural features. The two streams are fused via CDDG, which adaptively weights each stream’s contribution. A multi-task head produces both infection classification and burden estimation outputs.
Figure 1. Architecture of MalariaNet. Two parallel streams, SCFE and MSME, are fused via CDDG for multi-task output.
Figure 1. Architecture of MalariaNet. Two parallel streams, SCFE and MSME, are fused via CDDG for multi-task output.
Preprints 217498 g001

3.2. Morphology Stem

The stem preprocesses the input for the morphology stream. It consists of a 3 × 3 convolution (stride 2), a 3 × 3 depthwise convolution (stride 2), and a 1 × 1 pointwise convolution, each followed by batch normalization and ReLU6 activation. Together these layers reduce spatial resolution from 128 × 128 to 32 × 32 , expand channels from 3 to 24, and consume only 1,072 parameters in total.
The SCFE stream bypasses the stem entirely and operates directly on raw RGB. This deliberate asymmetry reflects the fundamentally different nature of the two signal domains.

3.3. Stain-Color Feature Extractor (SCFE)

3.3.1. Motivation

Giemsa staining produces a highly structured color distribution in malaria blood smear images. Parasitic structures absorb the basic dye component, staining purple/blue, while host red blood cell hemoglobin absorbs the acidic component, staining pink/red. This chromatic separation provides a fast, reliable discriminative cue that human microscopists exploit as a first-pass filter. Encoding this color information through generic learned filters wastes parameters on re-discovering a well-characterized signal.

3.3.2. Design

Unlike the morphology stream, which operates on stem features, SCFE takes the raw RGB input image directly. It begins with a fixed, non-learnable 1 × 1 convolution that projects the 3-channel RGB to a 3-channel Giemsa stain-relevant representation. The projection matrix is:
P = 0.15 0.70 0.70 0.70 0.15 0.70 0.58 0.58 0.58
Row 1 encodes the purple/blue parasite response (high B, low R). Row 2 encodes the pink/red host cell response (high R, low B). Row 3 encodes the luminance channel. These vectors are derived from Giemsa stain color deconvolution principles [18] and frozen during training, acting as a strong inductive bias that regularizes the color stream.
Following the fixed projection, a lightweight downsampling convolution ( 3 × 3 , stride 4) reduces from 128 × 128 to 32 × 32 . Two depthwise-separable convolution blocks then extract stain intensity patterns while reducing spatial resolution to 8 × 8 . The entire SCFE uses approximately 721 learnable parameters, reflecting the inherently low-dimensional nature of color information. It yields an output F s R C s × 8 × 8 with C s = 24 . Figure 2 visualizes the projection effect: the parasite channel highlights infected regions while the host cell channel captures the red blood cell background.

3.4. Multi-Scale Morphology Encoder (MSME)

3.4.1. Motivation

Malaria parasites at different life-cycle stages present drastically different spatial scales in microscopy images:
  • Ring-form trophozoites: 1–2  μ m diameter, mapping to ∼2–4 pixels at 128 × 128 resolution. Characterized by small, sharp chromatin dots.
  • Mature trophozoites: 5–8  μ m, mapping to ∼8–12 pixels. Larger cytoplasmic area with visible pigment granules.
  • Schizonts: 10–20  μ m, mapping to ∼15–30 pixels. Contain multiple merozoites with distinct boundaries.
A single receptive field cannot efficiently capture all scales. Standard multi-scale approaches such as FPN (∼1.2 M parameters in the lateral pyramid alone) and ASPP (∼0.5 M parameters for the dilated branches) are two to three orders of magnitude beyond the 21 K MCU budget targeted here.

3.4.2. Design

MSME consists of two stages, each containing three parallel depthwise convolution branches with biologically motivated receptive fields:
  • Fine branch: Standard 3 × 3 depthwise convolution, targeting ring-form structures and chromatin dots (2–5 pixel features).
  • Medium branch: Two stacked 3 × 3 depthwise convolutions (effective 5 × 5 receptive field), targeting mature trophozoites (8–12 pixel features). Stacking avoids the parameter cost of a direct 5 × 5 kernel.
  • Coarse branch: 3 × 3 depthwise convolution with dilation rate 2, targeting schizonts and larger structures (15–30 pixel features). The Medium and Coarse branches share a 5 × 5 theoretical receptive field but differ critically in sampling pattern. The Medium branch samples densely to capture continuous textures such as pigment granules. The Coarse branch instead samples sparsely with gaps, capturing boundary and edge features at wider spatial extent. After the stem’s 4 × downsampling, the dilated receptive field covers ∼20 pixels in the original image, matching schizont dimensions.
The three branch outputs are concatenated and fused with a 1 × 1 pointwise convolution followed by a shared batch normalization layer. Using a single shared BN rather than per-branch BN reduces buffer memory on MCU platforms.
The two MSME stages progressively halve spatial resolution while expanding channels, going from 32 × 32 × 24 to 16 × 16 × 32 and then to 8 × 8 × 48 . The resulting output F m R C m × 8 × 8 has C m = 48 and the full MSME costs approximately 9,376 parameters.

3.5. Cross-Domain Diagnostic Gate (CDDG)

3.5.1. Motivation

Stain-color and morphological features are complementary, yet their relative importance varies from sample to sample. For cells with strong and uniform staining, color alone is typically sufficient for accurate discrimination. For cells with faint or uneven staining, a common issue in field samples, morphological structure must take over as the primary basis for judgment. An adaptive gating mechanism that learns to modulate each stream’s contribution effectively mimics the diagnostic reasoning that expert microscopists apply during examination.

3.5.2. Design

Given stain features F s and morphology features F m (spatially aligned to 8 × 8 ), CDDG computes a channel-wise gating vector through global average pooling and a lightweight fully connected bottleneck:
g = σ W 2 · ReLU W 1 · [ GAP ( F s ) ; GAP ( F m ) ]
where W 1 R d × ( C s + C m ) and W 2 R ( C s + C m ) × d are FC weights with bottleneck dimension d = ( C s + C m ) / 4 = 18 , and σ is the sigmoid function.
The gate vector g is split into g s and g m , applied element-wise to each stream:
F fused = [ g s F s ; g m F m ]
Unlike SE-Net [19], which applies channel attention within a single feature map, CDDG performs cross-domain gating: it uses information from both streams to modulate each stream’s contribution. This has a clear diagnostic interpretation: the gate learns which signal domain is more reliable for each specific input.

3.6. Prototype Cosine Head (Variant Used as a Leakage Case Study)

We probe whether slide leakage can fabricate an apparent architectural improvement, and not just an inflated headline. To this end we define a variant, MalariaNet-P, in which only the final classifier is replaced. The Stem, SCFE, MSME, CDDG and shared head are inherited unchanged, so the inference graph and MCU cost are essentially identical, 21,083 vs. 21,085 parameters. The motivation is the standard one for metric classifiers. An unconstrained affine map can transfer poorly under domain shift, because feature scale and offset drift while direction stays discriminative. The head maintains two learnable class prototypes p 0 , p 1 R 64 ; the logit for class c is
z c = s · f p c f 2 p c 2 ,
a scaled cosine similarity. This is the nearest-class-mean or prototypical classifier [20], with no angular margin and s a single learnable scalar. Under per-cell training, this variant appears to give a large, seed-stable cross-site robustness gain, a textbook “contribution.” We deliberately retain it not as a proposed method, but as the clearest case study. It shows that this apparent gain is a training-time leakage artefact that vanishes under leakage-free evaluation (Section 4.8).

3.7. Multi-Task Head

The fused features ( C s + C m = 72 channels at 8 × 8 ) pass through a shared compact head: 1 × 1 pointwise convolution (72 to 48), depthwise 3 × 3 convolution with stride 2 ( 8 × 8 to 4 × 4 ), 1 × 1 pointwise convolution (48 to 64), and global average pooling, producing a 64-dimensional feature vector. All convolutions use BN and ReLU6. This shared feature vector feeds two lightweight task heads:
  • Classification head: A single FC layer (64 to 2) for infection detection (parasitized vs. uninfected).
  • Burden estimation head: A single FC layer (64 to 1) with sigmoid activation, predicting a continuous parasite burden score in [ 0 , 1 ] . The burden score is auto-generated from image analysis as the normalized dark-stain pixel ratio within each cell, serving as a proxy for parasite load.
The multi-task loss combines both objectives:
L = α · L cls + ( 1 α ) · L reg
where L cls is cross-entropy with label smoothing of 0.1, L reg is MSE loss for burden estimation, and α = 0.7 . The burden estimation head adds only 65 parameters (<0.3% overhead), enabling multi-task capability at negligible cost.

3.8. Complexity Analysis

Table 1 summarizes the parameter distribution across MalariaNet’s components.
The total model size is 85.3 KB in FP32 format and 23.5 KB after INT8 quantization of the weights, as confirmed by on-device measurement. Both fit well within the STM32H7’s 2 MB Flash constraint. The numerically-faithful forward keeps fp32 activations to match the quantization scheme of the reported accuracy. It uses a measured 489 KB of activation SRAM at the 128 × 128 evaluation resolution (Section 4, Table 6), comfortably within the 1 MB available.
With the architecture and parameter budget established, the next section uses this design as a controlled testbed. It defines the per-cell versus slide-disjoint protocols, quantifies how slide leakage inflates accuracy and fabricates per-module and variant-level conclusions, then characterises what the design honestly delivers: a leakage-free, on-device-deployable compact baseline.

4. Experiments

This section evaluates MalariaNet along four axes, all under the leakage-free slide-disjoint protocol unless explicitly labelled per-cell.
1.
How much the per-cell protocol inflates the headline accuracy relative to slide-disjoint evaluation, across all models.
2.
Whether the per-module ablation gains reported under per-cell splitting survive leakage-free evaluation; they do not.
3.
On-device deployment measurements on STM32H743 hardware, which are split-independent.
4.
Characterising, not claiming, the cross-dataset failure mode and the per-cell-only robustness illustration.

4.1. Experimental Setup

4.1.1. Dataset

We evaluate MalariaNet on the NIH Malaria Cell Images Dataset, a publicly available benchmark containing 27,558 cell images equally divided between Parasitized (13,779) and Uninfected (13,779) classes. All images are resized to 128 × 128 pixels. Figure 3 shows representative examples.

4.1.2. Evaluation Protocol: Per-Cell vs. Slide-Disjoint

The 27,558 NIH cell images are not independent. They were segmented from the thin smears of roughly 200 patients/slides, and the originating slide is recoverable from the filename (a leading C〈digits〉 clinic/case identifier, parseable for 100 % of the images in both classes). Grouping by this C-number yields 200 unique groups covering all 27,558 cells, the largest holding 2.5 % of the cells. The finer C〈digits〉P〈digits〉 slide token parses only 86.5 % of filenames, so we group at the C-number case level. This level is at or above slide granularity and therefore never splits one case across train and test. The protocol used almost universally in the NIH-malaria CNN literature, and in the first version of this work, is a per-cell random stratified split at 70/15/15. It places cells from the same slide into training, validation and test. Because intra-slide cells share staining batch, illumination, focus and background, this leaks slide-identity across the split and optimistically biases every reported metric.
We therefore evaluate under two protocols and report both. The first is per-cell, the literature-standard, optimistic protocol, retained only for comparability with prior work. The second is slide-disjoint, a leakage-free GroupShuffleSplit on the slide identifier. It splits 70/15/15 by slide group, ≈140/30/30 of the ≈200 slides, with no slide appearing in more than one split and disjointness asserted in code. Unless explicitly labelled per-cell, all headline, ablation and variant results in this paper are reported under the rigorous slide-disjoint protocol, with three seeds 42, 123 and 2024. Quantifying the gap between the two protocols on this benchmark is one of the contributions of this paper, as discussed in Section 5.

4.1.3. Compared Methods

We compare MalariaNet against two categories of models. Large baseline models, representing standard deep learning approaches:
  • ResNet-18 [21]: 11.18 M parameters, a widely used standard CNN.
  • MobileNetV2 [9]: 2.23 M parameters, designed for mobile deployment.
  • EfficientNet-B0 [11]: 4.01 M parameters, NAS-optimized for efficiency.
MCU-comparable lightweight models for fair comparison at similar parameter scale:
  • Tiny-MobileNetV2 (width=0.1): 89 K parameters, MobileNetV2 scaled down with width multiplier 0.1.
  • SingleStream: 8 K parameters, a single-stream depthwise-separable CNN with the same computational budget as MalariaNet but without domain-specific design.

4.1.4. Training Details

All models are trained with the Adam optimizer (lr=0.001, weight decay=1e-4), a cosine annealing learning-rate scheduler with 5-epoch warm-up, batch size 64, and early stopping (patience=15). Large baseline models use ImageNet-pretrained weights, which gives them a significant advantage from transfer learning. MalariaNet and its variants are trained from scratch without pretraining, so they start at a disadvantage relative to pretrained baselines. Data augmentation includes random horizontal/vertical flipping, rotation ( ± 15 ), color jitter, and random affine transformations. To ensure statistical reliability, MalariaNet is trained with three random seeds (42, 123, 2024), and results are reported as mean ± standard deviation. All experiments are conducted on a single NVIDIA RTX A6000 GPU.

4.1.5. Evaluation Metrics

We report accuracy, sensitivity (recall for the parasitized class), specificity (recall for the uninfected class), F1-score, and AUC-ROC. For deployment analysis, we report model size in KB, parameter count, and FLOPs. Due to the balanced 50/50 class split, accuracy and F1-score are numerically similar; we primarily report accuracy for conciseness.

4.2. Main Results Under the Per-Cell Protocol (Literature-Standard, Optimistic)

We first report results under the per-cell protocol that prior work on this benchmark uses, so our numbers are directly comparable to the literature. Section 4.4 then shows what happens to these same numbers under leakage-free slide-disjoint evaluation. The per-cell figures in Table 2 should be read as optimistic upper bounds, not as the operating accuracy of a deployed device.
This table supports the paper’s central claim, but its strength must be stated carefully. First, the load-bearing observation is the unanimous direction: every one of the eight models has Δ < 0 , so the inflation is a property of the per-cell protocol, not of one architecture. The individual per-model magnitudes are mostly within the slide-disjoint seed standard deviation, for example MalariaNet 1.45 against its own ± 1.02 , so we do not rest the claim on any single Δ . The eight models also share the same dataset and leaked slides, so their Δ ’s are not statistically independent and we report no sign-test p-value. We add a test-set sampling check at the headline operating point. A per-cell Wilson 95 % interval on the per-seed slide-disjoint test splits, which hold 3,320 to 4,719 cells across 30 slide groups, is ± 0.6  pp ( [ 94.9 , 96.2 ] at 95.61 % ). This interval assumes cell independence and therefore understates uncertainty, since the cells cluster within the 30 test slide groups. The binding uncertainty we report is the cross-seed standard deviation ± 1.02  pp. It already exceeds this naive interval, and the 1.45  pp gap falls within it. The quantitative strength is the unanimous sign together with the collapse of every design conclusion in Section 4.4 and Section 4.8, not the headline magnitude. Second, there is an apparent differential: the large ImageNet-pretrained backbones move less, 0.25 to 0.47  pp, than the compact from-scratch models, 0.86 to 1.45  pp. This would suggest per-cell evaluation specifically flatters the compact-model regime this literature targets. This pattern is confounded with the from-scratch vs. ImageNet-pretrained distinction, so we ran a controlled experiment: the three large baselines retrained from scratch under both protocols, three seeds, identical recipe. The result is mixed and we report it without selection. ResNet-18 and MobileNetV2 move much more once their ImageNet initialisation is removed. Their leakage Δ grows from 0.25 to 0.75 and from 0.39 to 0.97  pp, into the compact-model range. EfficientNet-B0, however, is essentially unchanged, from 0.47 to 0.56  pp and within its ± 0.79 seed deviation. The protective effect of ImageNet pretraining against slide leakage is therefore real but architecture-dependent, not a universal law. It accounts for two of three large backbones and not the third. We consequently still do not treat the compact-versus-large differential as a load-bearing result. The load-bearing claim remains the unanimous inflation and the collapse of every design conclusion. Full from-scratch numbers are summarised in Section 5. Third, the consequence for the original claim is robust regardless of the above. Under per-cell splitting MalariaNet at 97.06% appears to match MobileNetV2 at 96.90% with 100 × fewer parameters. Under leakage-free evaluation MalariaNet at 95.61% sits ≈1 pp below every larger baseline, namely EfficientNet 96.75, ShuffleNet 96.56 and MobileNetV2 96.51. The “compact model matches large models” narrative was itself a leakage artefact. What remains true and protocol-independent is the deployment envelope: MalariaNet is the only entry simultaneously satisfying <200 KB and <10 M FLOPs, as shown in Table 5. The honest positioning is therefore a radically compact MCU-deployable detector that trades ≈1 pp accuracy against the best larger baselines under rigorous evaluation, not a model that matches them.
Figure 4 shows per-cell optimistic ROC curves on the seed-42 NIH test split for MalariaNet and the two MCU-deployable baselines, provided for comparability with prior work that reports per-cell ROC. Consistent with the rest of this section, the per-cell separation is small and should not be over-interpreted. Under slide-disjoint evaluation MalariaNet’s AUC is 0.988 ± 0.003 , as in Table 4, below the ≈0.994 the per-cell protocol suggests, and the variant-to-variant ordering is not stable across protocols. We include the curve only to characterise the operating region of high true-positive rate at low false-positive rate relevant to a screening device, not as evidence of architectural superiority.

4.3. Clinical Decision Metrics Under Endemic Prevalence

Accuracy at the balanced 50/50 NIH test split overstates real-world diagnostic value. Malaria prevalence in field settings ranges from <1 % in low-transmission regions to 10–20 % during peak season in sub-Saharan Africa [1]. We therefore re-express the slide-disjoint 3-seed operating point (sensitivity = 93.94%, specificity = 97.41%; Table 4) as positive predictive value (PPV) and negative predictive value (NPV) at clinically realistic prevalence rates. We use the leakage-free operating point deliberately: PPV/NPV at the inflated per-cell sensitivity would itself be optimistic.
Three operational implications follow from Table 3. First, in low-prevalence elimination settings below 1 %, PPV is only 15–27%, so most “positive” device outputs require confirmatory microscopy or RDT before treatment. This is consistent with WHO screening-test guidance and is not unique to lightweight models. By Bayes’ theorem, the same effect arises for any ∼94 %/97 % sensitivity and specificity test under low prevalence. Second, in mesoendemic to hyperendemic settings with 5–20 % prevalence, the realistic deployment target for community health workers in malaria-endemic Africa and South Asia, PPV reaches 66–90 %. This makes the device clinically actionable for triage and case prioritisation. Third, NPV stays ≥99 % across the 0.5–10 % prevalence band, and 98.5 % at 20 %, so a negative result reliably rules out malaria, the operating mode in which a screening tool is most valuable. We position MalariaNet as a triage or mass screening aid rather than a stand-alone diagnostic, with positive results referred to confirmatory testing as recommended for any peripheral-level diagnostic tool.

4.4. Ablation Study Under Slide-Disjoint Evaluation

We ablate each module under the rigorous slide-disjoint protocol of Section 4.1.2: the NIH cells are split by patient or slide group so that no slide contributes images to more than one of train, validation or test. Every configuration is retrained from scratch over three seeds (42, 123, 2024) with all other hyperparameters fixed. Results are in Table 4. Δ Acc is the full-model accuracy minus the variant.
We report this result honestly and without selection. Under leakage-free evaluation:
1.
Per-module gains do not survive rigorous evaluation. The full model (95.61±1.02%) differs from SingleStream by only +0.24 pp, from Uniform-scale MSME by +0.07 pp, and is in fact marginally lower than w/o SCFE (−0.03 pp) and w/o CDDG (−0.08 pp). Every difference is far smaller than the ≈1 pp seed-to-seed standard deviation, and none is statistically distinguishable. No contrast attains significance even uncorrected, so multiple-comparison control such as Bonferroni or Holm would only widen these intervals and reinforce the null. Such correction is therefore not the binding consideration here. We consequently do not claim individually validated per-module contributions.
2.
The per-cell protocol inflated both the headline and every ablation delta. Under the optimistic per-cell split the same architecture reported 97.06 % with module gains of +0.78/+0.38/+0.56/+0.37 pp. Under slide-disjoint evaluation the headline falls by 1.45 pp and the module gains collapse to within noise and partly invert. This quantifies how strongly slide leakage flatters NIH-malaria results. To our knowledge, this methodological caution has not been quantified for this benchmark, and we regard it as a contribution in its own right, as discussed in Section 5.
3.
What the architecture does provide is a compact 21 K-parameter detector that remains at ≈95.6 % under rigorous evaluation while fitting the STM32H7 envelope, as quantified in Section 4.5. Consider the prototype-cosine variant MalariaNet-P. Its apparent +7 pp cross-site gain under per-cell training is shown in Section 4.8 to be a per-cell-training leakage artefact, collapsing to +1.8 pp within ±5 pp seed noise under slide-disjoint training. We therefore do not claim it as a robustness contribution. We retain it only as a case study of leakage fabricating an apparent innovation. We position the stain–morphology decomposition as an interpretable, parameter-frugal design, not as a set of separately significant ablation gains.

4.5. Deployment Analysis

Table 5 summarizes the deployment feasibility on STM32H7 series (Cortex-M7 up to 480 MHz, 2 MB Flash, 1 MB RAM; our test board runs at 400 MHz).
MalariaNet at 85.3 KB in FP32 or 23.5 KB in INT8 weights comfortably fits within the STM32H7’s Flash memory, leaving ample space for firmware, runtime, and application code. The numerically-faithful forward stores the convolutional and linear weights as int8 and keeps batch-norm and activations in fp32, so it reproduces exactly the quantization scheme under which the 95.61% accuracy is measured. This forward uses 489 KB of activation SRAM at the 128 × 128 evaluation resolution, within the 1 MB on-chip budget.
The 200 KB model size threshold is derived from a practical STM32H7 Flash budget: 2 MB total minus ∼500 KB for firmware and HAL drivers, ∼300 KB for runtime, and ∼1 MB reserved for application code and image buffers, leaving approximately 200 KB for the neural network model.
On-device validation: we flashed a numerically-correct INT8-weight forward (convolutional and linear weights stored as symmetric per-tensor int8 and dequantized at use, batch-norm and activations in fp32) onto an STM32H743IIT6 development board (Cortex-M7 @ 400 MHz, I-Cache and D-Cache enabled) and timed it with the DWT cycle counter. The on-device output matches the off-device reference to a maximum logit deviation of 1.8 × 10 4 . This confirms the deployed kernel computes the same classification as the evaluated model rather than a workload proxy. Table 6 reports the measured cost.
At the 128 × 128 evaluation resolution the faithful forward runs in 816 ms (1.23 FPS, mean over 10 iterations, range 816.0–816.3 ms, deterministic to <0.3 ms). This is a triage rate rather than video real-time: it classifies roughly 74 cells per minute, still far faster than manual expert microscopy at 20–30 minutes per slide. We report this honestly as the cost of the reference kernel. The implementation is an unoptimised hand-written forward with no CMSIS-DSP or CMSIS-NN acceleration, and it keeps fp32 activations to match the quantization scheme of the reported accuracy. A vendor-optimised kernel, or a full int8-activation pipeline, would reduce both the latency and the 489 KB activation footprint. That gain would come at the cost of adopting a quantization scheme whose accuracy would require separate validation, which we therefore do not claim here. The model weights occupy only 23.5 KB of the 2 MB Flash (1.1 %).
Quantization is near-lossless. We applied the deployed INT8 scheme, symmetric per-tensor 8-bit quantization of every convolutional and linear weight in the CMSIS-NN or TensorFlow Lite Micro int8 weight format, and re-evaluated on the NIH test split across three trained checkpoints. The change in test accuracy from FP32 to INT8 is + 0.01 ± 0.05  pp, i.e. within seed-to-seed variance and statistically indistinguishable from zero. The 23.5 KB INT8 model therefore preserves the full-precision diagnostic accuracy. All accuracy results reported in this paper thus hold for the actually deployed integer model and not only for its floating-point counterpart.

4.6. Comparison with Published Methods

Table 7 compares MalariaNet with recently published methods on the NIH Malaria dataset.
This comparison must be read with care, and it motivates our central point. All listed prior methods report per-cell accuracy on NIH, and none, to our knowledge, evaluates slide-disjoint. At the per-cell operating point MalariaNet at 97.06% is competitive with these methods, which report 95.0 to 99.2%, at 6 × to over 4000 × fewer parameters. That per-cell figure is optimistic for every row, not only ours. Under the leakage-free slide-disjoint protocol MalariaNet operates at 95.61 ± 1.02 % . The corresponding slide-disjoint numbers for the other entries are not available because those works did not run the protocol. We therefore do not claim to beat prior methods on accuracy. We claim that the field’s accuracies, including earlier versions of our own, are reported under a leaky protocol, and we provide, to our knowledge, the first slide-disjoint, on-device reference. Among all entries MalariaNet is the only one explicitly designed and validated for MCU constraints: 23.5 KB INT8 weights in Flash and a 489 KB activation footprint that fits the STM32H743’s 1 MB SRAM, a property independent of the evaluation split.

4.7. Cross-Dataset Generalization: Per-Cell-Trained, Interpret with the Leakage Caveat

We test NIH-trained models zero-shot on BBBC041 [23], a Broad Institute P. vivax dataset with different staining and scanner. It comprises 5,452 extracted cells, 2,452 parasitized and 3,000 uninfected, with no fine-tuning. Table 8 reports the per-cell-trained models for comparability with the original analysis. Caveat: the prototype-cosine case study of Section 4.8 showed that cross-site rankings obtained from per-cell-trained models do not survive slide-disjoint training. The same caveat applies here, so the ordering below should be read as indicative of the difficulty of the P. falciparum to P. vivax shift, not as evidence of architectural superiority.
Figure 5. Zero-shot NIH to BBBC041 transfer (per-cell-trained models, no fine-tuning). All models keep high sensitivity but collapse in specificity off-domain. The apparent left-to-right ordering is a per-cell-training pattern that does not survive slide-disjoint training (Section 4.8); we draw no architectural conclusion from it. The robust message is that no compact model transfers acceptably to the unseen species without target-site adaptation.
Figure 5. Zero-shot NIH to BBBC041 transfer (per-cell-trained models, no fine-tuning). All models keep high sensitivity but collapse in specificity off-domain. The apparent left-to-right ordering is a per-cell-training pattern that does not survive slide-disjoint training (Section 4.8); we draw no architectural conclusion from it. The robust message is that no compact model transfers acceptably to the unseen species without target-site adaptation.
Preprints 217498 g005
All models degrade sharply off-domain, as expected given the species, staining and scanner shift. The apparent ordering, MalariaNet above the task-agnostic compact baselines and w/o-SCFE highest, mirrors exactly the pattern that, for the prototype-cosine variant, we showed to be a per-cell-training artefact (Section 4.8). We therefore draw no architectural conclusion from this table. Its only robust message is that none of these compact models transfers acceptably to an unseen species without target-site adaptation, consistent with the limitations in Section 5. On the fixed 5,452-cell BBBC041 set these off-domain rates carry tight binomial intervals. For example, MalariaNet specificity is 37.2 % (Wilson 95 % [ 35.5 , 38.9 ] , n = 3 , 000 ), and the w/o-SCFE variant has sensitivity 88.4 % ( [ 87.1 , 89.6 ] , n = 2 , 452 ) and specificity 62.3 % ( [ 60.5 , 64.0 ] , n = 3 , 000 ). The specificity collapse is thus well outside sampling noise and is a genuine domain-shift effect, not a small-sample artefact.
An unexpected outcome is that the w/o SCFE variant achieves the highest cross-dataset accuracy of 74.03%. The fixed Giemsa projection vectors, while effective for the NIH dataset’s specific staining conditions, may over-specialize to a particular color distribution. This points to data-driven calibration of the stain projection, rather than fixed vectors, as a route to improving cross-domain robustness. We discuss this important direction further in Section 5.

4.8. Case Study: Leakage Fabricates an Apparent “Robustness Variant”

A central illustration of how slide leakage fabricates not just numbers but apparent innovations is the prototype-cosine variant MalariaNet-P (Section 3.6), which changes only the final classifier (21,083 vs. 21,085 parameters; identical MCU inference cost). It was originally adopted because, under per-cell training, it appeared to deliver a large, consistent cross-site robustness gain. Table 9 shows what happens when the same variant and baseline are retrained under the leakage-free slide-disjoint protocol and evaluated identically. BBBC041 is a separate P. vivax dataset, so cross-site evaluation is intrinsically leak-free; the variable here is the training protocol.
The contrast is the point. Under per-cell training the variant shows +7.0 pp BBBC041 accuracy, from 63.79 to 70.82, with tight variance. This is exactly the profile of a publishable “robustness contribution,” and indeed an earlier version of this work presented it as one. Under leakage-free slide-disjoint training the same comparison yields 53.23 ± 5.23 vs. 55.04 ± 5.69  %: a +1.8 pp difference that is smaller than its own ±5.5 pp seed noise and changes sign across seeds, the variant being worse at seed 42. The in-domain difference is likewise null under rigorous evaluation, 95.61 ± 1.02 vs. 95.69 ± 0.82  %. We therefore do not claim MalariaNet-P as a robustness contribution. We report it as the clearest case study of this paper’s primary finding. Slide leakage in training does not merely inflate a headline by a point or two. It can manufacture a plausible, internally-consistent, seed-stable “architectural innovation” that evaporates under honest evaluation. This is precisely why slide-disjoint training and testing must be standard for this benchmark.

4.9. Multi-Task Results (Per-Cell, Not Re-Evaluated Leakage-Free)

Caveat, read first: the multi-task variant was trained and evaluated only under the per-cell protocol. We retain it solely to document that a parasite-burden head can be added at negligible cost. It is not a validated capability and supports no accuracy or correlation claim. Given this paper’s own thesis, the per-cell absolute numbers in Table 10 are optimistic and the burden correlation is indicative only. We flag this internal tension openly rather than hide it. The only protocol-independent statement we draw is structural: the burden head adds 65 parameters, below 0.3  %, leaving the MCU envelope unchanged. We did not re-run it slide-disjoint because the multi-task head is orthogonal to the leakage focus. A leakage-free multi-task evaluation is left to future work. Table 10 presents MalariaNetMT, which simultaneously performs infection detection and parasite-burden estimation.
For completeness, and subject to the caveat above, the per-cell numbers are as follows. MalariaNetMT reports 96.57% classification accuracy, close to the single-task per-cell figure, and a burden correlation of 0.748 with the auto-generated parasite-load scores. Both are per-cell figures, and we draw no validated conclusion from them. The one protocol-independent and load-bearing point is structural: the burden head adds only 65 parameters, below 0.3  % overhead, so the multi-task option is essentially free in deployment budget regardless of evaluation protocol.

4.10. Robustness to Imaging Interference Across Compared Models

The portable-microscope deployment scenario is defined by degraded imaging such as colour cast, noise, blur and low resolution, so resilience to interference matters more than clean accuracy. We therefore evaluate it rigorously. Every model is the slide-disjoint-trained checkpoint with three seeds, evaluated on the slide-disjoint test split under a six-level interference sweep, S0 = clean to S5 = heavy, with severity the probability each PIDM-style degradation factor is applied. Unlike the per-cell single-seed stain analysis in the first version of this work, this is a leakage-free, multi-seed, all-CNN head-to-head. Table 11 ranks all eight models by accuracy drop from S0 to S5, and Figure 6 visualises it.
This is, in contrast to the collapsed per-module ablations, a genuine finding that survives leakage-free evaluation. Three honest readings follow. First, MalariaNet, with a 21.84 ± 6.10  pp drop, is more interference-robust than EfficientNet-B0, MobileNetV2, MobileNetV3, ShuffleNetV2 and the SingleStream control. It is beaten only by ResNet-18 at 18.76  pp, which is 530 × larger and cannot be deployed. Among the two MCU-deployable models MalariaNet is far more robust than SingleStream, 21.84 vs. 28.59  pp, negative-signed in all three seeds, with the gap widening monotonically from + 0.2  pp at S0 to + 7.0  pp at S5. Second, we state the caveats plainly. The per-seed std is large, ±5–9 pp, so adjacent ranks such as MalariaNet vs. Tiny-MV2 are within noise. The robust claim is the cluster position, top two or three and clearly above the ShuffleNet, SingleStream and MNv3 group, together with the seed-consistent MalariaNet > SingleStream margin, not a precise ranking. The degradation is simulated, not physically captured. Finally, the clean S0 accuracy gap to larger models, ≈1 pp, is unchanged, a separate, deployment-critical resilience property, not a clean-accuracy claim. Third, we do not attribute it to any single module, since the leakage-free ablation shows none is individually significant. The honest statement is that the compact architecture as a whole is markedly more interference-robust than the naive single-stream control and than most larger CNNs. This is exactly the property the portable-microscope scenario requires.

4.11. Knowledge Distillation: A Partial, Honest Mitigation of the Pretraining Gap

The ≈1 pp clean-accuracy gap to the larger baselines is largely the from-scratch-vs-ImageNet-pretrained distinction, as discussed in Section 5. The compact models that train from scratch, namely MalariaNet, SingleStream and Tiny-MV2, cluster ≈1 pp below the pretrained backbones. Because a 21 K custom architecture cannot be meaningfully ImageNet-pretrained, we test whether knowledge distillation can transfer that advantage indirectly: the leakage-free EfficientNet-B0 teacher, slide-disjoint 96.75 %, distilled into the fixed 21 K student with loss ( 1 α ) CE + α T 2 KL and T = 4 . This is training-time only. The deployed inference graph is byte-identical to MalariaNet, so the MCU envelope is unchanged.
Under three-seed slide-disjoint distillation with α = 0.7 , the student reaches 95.96 ± 0.68 %, versus MalariaNet 95.61 ± 1.02 %, a + 0.35  pp gain with reduced variance. The result is robust to α : seed-42 accuracies are 96.60 / 96.57 / 96.30 for α = 0.5 / 0.7 / 0.9 . We report this honestly as a partial mitigation. Distillation recovers roughly one third of the ≈1.1 pp gap to EfficientNet-B0. The gain is not consistent across seeds, seed 42 being flat and seeds 123 and 2024 positive, and the student remains ≈0.8 pp below the strongest baseline. Distillation does not make the compact model accuracy-competitive with the best larger model. It modestly narrows and stabilises the gap at zero inference cost.

4.12. Visualising the Leakage Effect

The paper’s central result is summarised in Figure 7. Under the leakage-free slide-disjoint protocol the headline accuracy falls by 1.45 pp. More importantly, the per-module ablation gains that look substantial under per-cell splitting collapse into the ±0.15 pp noise band, with SCFE and CDDG turning marginally negative. The architectural “story” the per-cell protocol tells is not reproducible under honest evaluation.
We additionally provide Figure 8, the leakage-free accuracy-size trade-off under slide-disjoint evaluation. It makes the honest positioning explicit: MalariaNet uniquely fits the MCU zone but at ≈1 pp below the larger baselines. Two qualitative, per-cell illustrations are retained for transparency only and support no claim: Figure 9, Grad-CAM++ [24] attention, and Figure 10, the CDDG gate-value distribution. The gate does take differentiated values, yet, per Section 4.4, this confers no measurable accuracy benefit under leakage-free evaluation.
In summary, the experimental evidence supports two honest claims, not four. First, on the NIH benchmark the per-cell protocol inflates the headline by 1.45 pp and fabricates every per-module ablation conclusion and an apparent cross-site “robustness variant”, as established in Section 4.4 and Section 4.8 and Figure 7. Second, under leakage-free evaluation a 21 K-parameter detector still reaches ≈95.6% within the STM32H7 envelope, per Table 5 and Table 6, a deployable honestly-benchmarked reference. The next section interprets the leakage finding and its implications for the field.

5. Discussion

This section interprets the paper’s primary finding. That finding is that slide leakage inflates accuracy and fabricates architectural conclusions on the NIH malaria benchmark. The section then situates the surviving honest artifact, a deployable compact detector, in the point-of-care context, and bounds what remains open.

5.1. Slide Leakage and Its Consequences for the MCU-Malaria Literature

The NIH Malaria Cell dataset is the de facto benchmark for compact malaria detectors, and per-cell random splitting is its near-universal evaluation protocol. Our results show this protocol is not merely slightly optimistic: it is actively misleading. Three consequences, all measured here on an identical architecture, are worth separating.
First, an inflated headline. The same model reports 97.06 ± 0.45 % under per-cell splitting and 95.61 ± 1.02 % under slide-disjoint evaluation, a 1.45  pp gap. While this gap is of the same order as the ± 1.02 slide-disjoint seed standard deviation, its significance does not rest on the headline number alone: the inflation is negative in sign for every one of the eight architectures in Table 2, with per-model Δ from 0.25 to 1.45  pp. We are careful not to over-state this: the eight models share the same dataset and the same leaked slides, so their Δ ’s are not statistically independent and a naive 2 8 sign-test p-value would be unjustified. The honest claim is weaker but still strong. Eight independently trained, architecturally diverse models, compact and large, from-scratch and ImageNet-pretrained, all move in the same inflationary direction under per-cell splitting, with no exception. This is difficult to attribute to seed noise even granting the correlation. Any leaderboard built on per-cell numbers is therefore comparing optimistic upper bounds, not deployable accuracies.
Second, fabricated ablation conclusions. Under per-cell splitting every proposed module showed a clean positive ablation, +0.78/+0.38/+0.56/+0.37 pp. This is the kind of evidence routinely used to justify architectural design. Under slide-disjoint evaluation these gains collapse into ±1 pp seed noise and two of them invert, as shown in Table 4. The per-cell protocol did not just inflate a number; it manufactured a coherent but false story about why the architecture works.
Third, a fabricated “robustness variant.” Most strikingly, the prototype-cosine variant MalariaNet-P exhibits a large, seed-stable +7.0 pp cross-site gain under per-cell training, a result we ourselves initially presented as a contribution. Retrained leakage-free, the same comparison gives +1.8 pp within ±5.5 pp seed noise, as reported in Table 9. Leakage can therefore synthesise an internally-consistent, plausible, publishable “innovation” from nothing. We report this against our own interest precisely because it shows the failure mode is not hypothetical.
The remedy is cheap: the slide identifier is recoverable from the NIH filenames, so a group-disjoint split costs nothing and removes the leak. We recommend it become the default for this benchmark. The split is fully specified in Section 4.1.2 and reproducible from the public NIH filenames alone, with no extra artifact needed. Future compact-malaria work can therefore adopt it directly on honest footing. The broader caution generalises to any medical-imaging benchmark where many patches share a patient or slide and the standard split is per-patch.

5.2. MalariaNet as an IoT Edge Diagnostic Agent

MalariaNet is designed as the inference engine of an autonomous IoT edge device for point-of-care malaria diagnosis, as illustrated in Figure 11.
In a typical deployment scenario, the system operates as follows. First, a low-cost microscope camera captures blood smear images. Second, the STM32H7 MCU runs MalariaNet for local inference. It produces infection detection and burden estimation results in a measured 816 ms per 128 × 128 cell (1.23 FPS). This is the numerically-faithful INT8-weight forward on STM32H743 at 400 MHz. Third, results are displayed immediately on a local screen for the healthcare worker. Fourth, and optionally, aggregated diagnostic statistics such as infection rates and temporal trends are transmitted to regional health authorities. Transmission uses low-power wireless protocols such as LoRa or BLE for epidemiological surveillance.
This architecture embodies the autonomous edge AI paradigm: the device performs diagnosis at the point of care without cloud connectivity, on-call AI expertise, or centralized infrastructure. We make no claim that any internal module confers a measured accuracy benefit, since the evidence does not support that. The deployable value is a single honest artifact, a 21 K-parameter detector at ≈95.6% leakage-free accuracy within the STM32H7 envelope.

5.3. Practical Deployment Considerations

MalariaNet at 85.3 KB in FP32 or 23.5 KB in INT8 is well within the deployment envelope of modern MCUs. Several practical considerations apply to real-world deployment.
Hardware cost. An STM32H7 development board costs approximately $12, about 80 RMB for the MCU core module alone, and a medical-grade microscope camera module costs about $35. The total bill of materials therefore stays under $60. This is an order-of-magnitude reduction relative to a smartphone-based system above $200 or a laptop-based system above $500.
Power consumption. The STM32H7 operates at approximately 280 mW at full load. This enables battery-powered operation for extended periods, which is critical for deployment in areas lacking reliable electricity.
Offline capability. Unlike cloud-based or smartphone-based solutions, MalariaNet on an MCU requires zero network connectivity, making it suitable for the most remote deployment scenarios.

5.4. Limitations

We acknowledge several limitations. The cross-dataset gap is large. Zero-shot BBBC041 accuracy is low under both protocols, 63.8% per-cell-trained and 53.2 ± 5.2 % slide-disjoint. No variant closes the P. falciparum-to-P. vivax and scanner shift without target-site adaptation. Species and life-cycle-stage labels are unavailable in NIH, so the multi-task burden head relies on auto-generated proxy labels. All in-domain data are P. falciparum single-cell patches. An end-to-end field device additionally needs cell detection and slide-level aggregation, which is not evaluated here. Deployment is validated for latency and memory on STM32H743 but not power. The compact-versus-large differential we noted, −0.25 to −0.47 pp pretrained vs. −0.86 to −1.45 pp from-scratch, is confounded with ImageNet pretraining. We addressed this with a controlled from-scratch experiment in which the three large baselines were retrained from scratch under both protocols, three seeds. Their leakage Δ moved from −0.25, −0.39, −0.47 to −0.75, −0.97, −0.56 pp for ResNet-18, MobileNetV2, EfficientNet-B0 respectively. The protection from pretraining is therefore architecture-dependent rather than universal, and we accordingly do not rely on the differential. The interference sweep uses programmatic perturbations as a proxy. The measured robustness advantage is therefore evidence under that controlled model, not a field guarantee. Most importantly, under leakage-free evaluation none of the investigated architectural elements provides a robust advantage, as established in Section 4.4 and Section 4.8. This paper’s positive contributions are methodological and practical, not a new architecture. We report this transparently rather than defend design choices the evidence does not support.

6. Conclusion

We set out to build a domain-aware compact malaria detector for microcontrollers. In evaluating it rigorously, we found something more consequential than an architecture: the standard evaluation protocol for the field’s de-facto benchmark is broken. The NIH Malaria Cell dataset’s 27,558 images come from ≈200 patient slides. Yet essentially all prior work, and the first version of this study, splits per-cell, leaking slide identity into the test set.
Re-evaluating an identical architecture under a leakage-free slide-disjoint protocol, headline accuracy falls from 97.06 ± 0.45 % to 95.61 ± 1.02 %. More importantly, slide leakage does not merely inflate a number: it manufactures architectural conclusions. Every per-module ablation gain, +0.78/+0.38/+0.56/+0.37 pp under per-cell splitting, collapses into seed noise and partly inverts under honest evaluation. A prototype-cosine variant shows a striking, seed-stable +7.0 pp cross-site “robustness” advantage under per-cell training, a result we ourselves initially presented as a contribution. Once training is leakage-free, that advantage shrinks to +1.8 pp within ±5.5 pp noise. Slide leakage can synthesise an internally-consistent, plausible, publishable innovation from nothing. This is the paper’s primary, and deliberately self-critical, contribution.
What survives rigorous evaluation are two honest findings. First, under the slide-disjoint protocol the 21 K-parameter detector still reaches ≈95.6% while fitting the STM32H7 envelope, at 23.5 KB INT8 weights and a measured 816 ms per 128 × 128 cell, a 1.23 FPS triage rate. The on-chip forward is numerically faithful: it matches the off-device reference within 1.8 × 10 4 , and INT8 preserves accuracy within 0.05  pp. This is an honestly benchmarked, on-device-validated reference rather than an inflated one. Second, consider the property the portable-microscope scenario actually demands. The detector is the 2nd-most interference-robust of eight CNNs under a leakage-free 3-seed degradation sweep, behind only the 530 × -larger, non-deployable ResNet-18. It is the most robust MCU-deployable model by a seed-consistent margin. Knowledge distillation further recovers ≈1/3 of the clean-accuracy gap at zero inference cost. We make no claim of architectural superiority from the module decomposition, since the ablations do not support that. However, the deployable artifact is honestly the most interference-robust option in its size class, which is what the application requires. The lasting value is a trustworthy protocol and a trustworthy, robust, deployable baseline.
The slide-disjoint protocol is fully specified and reproducible from the public NIH filenames alone, as detailed in Section 4.1.2. Code and checkpoints are available from the authors on reasonable request. We recommend slide-disjoint evaluation become the default for compact-malaria work. We also note the caution generalises to any medical-imaging benchmark where many patches share a patient or slide and the conventional split is per-patch. Future work that matters here is not another module. It is genuine target-site domain adaptation with real field images, expert species and stage labels, and end-to-end on-device validation. All of this must be measured under leakage-free protocols so that the conclusions are real.

Author Contributions

Conceptualization, M.H. and G.H.; methodology, M.H.; software, M.H. and Z.L.; validation, M.H., J.H., Z.L., H.Z. and G.H.; formal analysis, M.H. and H.Z.; investigation, M.H. and Z.L.; resources, G.H.; data curation, M.H., Z.L. and H.Z.; writing, original draft preparation, M.H.; writing, review and editing, J.H., Z.L., H.Z. and G.H.; visualization, M.H. and H.Z.; supervision, G.H.; project administration, G.H.; funding acquisition, G.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Guangxi Zhuang Autonomous Region (2025JJH170118), the Youth Research Project of Wuzhou University (2025QN028), the Research Project of Wuzhou University (2023B003), and the Guangxi Regional Innovation Capacity Enhancement Plan Project (2026XT1502035).

Institutional Review Board Statement

Not applicable. This study uses only publicly available, de-identified image datasets (the NIH Malaria Cell Images dataset and the Broad Bioimage Benchmark Collection BBBC041) released under open-access licences. No new human or animal subject data were collected.

Data Availability Statement

The NIH Malaria Cell Images dataset is publicly available at https://lhncbc.nlm.nih.gov/LHC-downloads/downloads.html#malaria-datasets and the BBBC041 P. vivax dataset at https://bbbc.broadinstitute.org/BBBC041. The leakage-free slide-disjoint split is fully reproducible from the public NIH filenames: it is a GroupShuffleSplit (70/15/15 by slide group, seeds 42/123/2024) on the leading C〈digits〉 slide identifier, exactly as specified in Section 4.1.2, so no additional artifact is required to reproduce the protocol or the leakage analysis. Source code, trained weights, INT8 checkpoints, and the STM32H743 Keil project are available from the corresponding author on reasonable request.

Acknowledgments

The authors thank the Guangxi Key Laboratory of Machine Vision and Intelligent Control at Wuzhou University for computational and laboratory support. All data-driven figures were generated from experimental outputs using Python and Matplotlib.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analysis, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
CNN Convolutional Neural Network
MCU Microcontroller Unit
POC Point-of-Care
SCFE Stain-Color Feature Extractor
MSME Multi-Scale Morphology Encoder
CDDG Cross-Domain Diagnostic Gate
INT8 8-bit Integer Quantization
FP32 32-bit Floating Point
AUC Area Under the Curve
ROC Receiver Operating Characteristic
PPV Positive Predictive Value
NPV Negative Predictive Value
NIH National Institutes of Health
BBBC Broad Bioimage Benchmark Collection
RDT Rapid Diagnostic Test
WHO World Health Organization

References

  1. World Health Organization. World malaria report 2023. Technical report, World Health Organization, Geneva, 2023.
  2. Mujahid, M.; Rustam, F.; Shafique, R.; Montero, E.C.; Alvarado, E.S.; de la Torre Diez, I.; Ashraf, I. Efficient deep learning-based approach for malaria detection using red blood cell smears. Scientific Reports 2024, 14, 13249. [CrossRef]
  3. Poostchi, M.; Silamut, K.; Maude, R.J.; Jaeger, S.; Thoma, G. Image analysis and machine learning for detecting malaria. Translational Research 2018, 194, 36–55. [CrossRef]
  4. Fuhad, K.M.F.; Tuba, J.F.; Sarker, M.R.A.; Momen, S.; Mohammed, N.; Rahman, T. Deep Learning Based Automatic Malaria Parasite Detection from Blood Smear and Its Smartphone Based Application. Diagnostics 2020, 10, 329. [CrossRef]
  5. Warden, P.; Situnayake, D. TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers; O’Reilly Media, 2019.
  6. Yang, F.; Poostchi, M.; Yu, H.; Zhou, Z.; Silamut, K.; Yu, J.; Maude, R.J.; Jaeger, S.; Antani, S. Deep Learning for Smartphone-Based Malaria Parasite Detection in Thick Blood Smears. IEEE Journal of Biomedical and Health Informatics 2020, 24, 1427–1438. [CrossRef]
  7. Islam, M.R.; Nahiduzzaman, M.; Goni, M.O.F.; et al. Explainable transformer-based deep learning model for the detection of malaria parasites from blood cell images. Sensors 2022, 22, 4358. [CrossRef]
  8. Chaudhry, H.A.H.; Farid, M.S.; Fiandrotti, A.; Grangetto, M. A lightweight deep learning architecture for malaria parasite-type classification and life cycle stage detection. Neural Computing and Applications 2024, 36, 19795–19805. [CrossRef]
  9. Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, June 2018, pp. 4510–4520. [CrossRef]
  10. Ma, N.; Zhang, X.; Zheng, H.T.; Sun, J. ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design. In Proceedings of the Computer Vision – ECCV 2018; Ferrari, V.; Hebert, M.; Sminchisescu, C.; Weiss, Y., Eds., Cham, 2018; pp. 122–138. [CrossRef]
  11. Tan, M.; Le, Q. EfficientNet: Rethinking model scaling for convolutional neural networks. In Proceedings of the ICML, 2019, pp. 6105–6114. [CrossRef]
  12. Lin, J.; Chen, W.M.; Lin, Y.; et al. MCUNet: Tiny deep learning on IoT devices. In Proceedings of the NeurIPS, 2020, Vol. 33, pp. 11711–11722. [CrossRef]
  13. Lai, L.; Suda, N.; Chandra, V. CMSIS-NN: Efficient neural network kernels for Arm Cortex-M CPUs. arXiv preprint arXiv:1801.06601 2018. [CrossRef]
  14. Ponnada, S.; Tak, T.K.; Kshirsagar, P.R.; et al. Expanding Applications of TINYML in Versatile Assistive Devices: From Navigation Assistance to Health Monitoring System Using Optimised NASNET-XGBOOST Transfer Learning. IEEE Access 2024, 12, 168328–168338. [CrossRef]
  15. Zeynali, M.; Alipour, K.; Tarvirdizadeh, B.; Ghamari, M. Non-invasive blood glucose monitoring using PPG signals with various deep learning models and implementation using TinyML. Scientific Reports 2025, 15, 581. [CrossRef]
  16. Kapoor, S.; Narayanan, A. Leakage and the reproducibility crisis in machine-learning-based science. Patterns 2023, 4, 100804. [CrossRef]
  17. Obuchowicz, R.; Strzelecki, M.; Piórkowski, A. Clinical Applications of Artificial Intelligence in Medical Imaging and Image Processing: A Review. Cancers 2024, 16, 1870. [CrossRef]
  18. Ruifrok, A.C.; Johnston, D.A. Quantification of histochemical staining by color deconvolution. Analytical and Quantitative Cytology and Histology 2001, 23, 291–299.
  19. Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, June 2018, pp. 7132–7141. [CrossRef]
  20. Snell, J.; Swersky, K.; Zemel, R. Prototypical Networks for Few-shot Learning. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), 2017, Vol. 30, pp. 4077–4087. [CrossRef]
  21. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016, pp. 770–778. [CrossRef]
  22. Nettur, S.B.; Karpurapu, S.; Nettur, U.; Gajja, L.S.; Myneni, S.; Dusi, A.; Posham, L. UltraLightSqueezeNet: A deep learning architecture for malaria classification with up to 54x fewer trainable parameters for resource constrained devices. arXiv preprint arXiv:2501.14172 2025. [CrossRef]
  23. Ljosa, V.; Sokolnicki, K.L.; Carpenter, A.E. Annotated high-throughput microscopy image sets for validation. Nature Methods 2012, 9, 637. [CrossRef]
  24. Chattopadhyay, A.; Sarkar, A.; Howlader, P.; Balasubramanian, V.N. Grad-CAM++: Generalized Gradient-Based Visual Explanations for Deep Convolutional Networks. In Proceedings of the 2018 IEEE Winter Conference on Applications of Computer Vision (WACV), March 2018, pp. 839–847. [CrossRef]
Figure 2. SCFE Giemsa stain projection. Row 1: original. Row 2: parasite channel. Row 3: host cell channel. Row 4: luminance.
Figure 2. SCFE Giemsa stain projection. Row 1: original. Row 2: parasite channel. Row 3: host cell channel. Row 4: luminance.
Preprints 217498 g002
Figure 3. NIH Malaria dataset samples. Top: parasitized. Bottom: uninfected.
Figure 3. NIH Malaria dataset samples. Top: parasitized. Bottom: uninfected.
Preprints 217498 g003
Figure 4. ROC on the NIH test split, per-cell protocol (optimistic, seed 42), retained for comparability with prior work. Per-cell AUCs are inflated relative to the slide-disjoint values (MalariaNet 0.988 ± 0.003 , Table 4); the small inter-model gaps shown here do not survive leakage-free evaluation and are not used to claim superiority.
Figure 4. ROC on the NIH test split, per-cell protocol (optimistic, seed 42), retained for comparability with prior work. Per-cell AUCs are inflated relative to the slide-disjoint values (MalariaNet 0.988 ± 0.003 , Table 4); the small inter-model gaps shown here do not survive leakage-free evaluation and are not used to claim superiority.
Preprints 217498 g004
Figure 6. Leakage-free interference robustness across all eight CNNs (slide-disjoint, 3-seed; error bars = seed std). MalariaNet (red) is 2nd-most-robust overall and the most robust MCU-deployable model; SingleStream (the deployable control) is among the least robust.
Figure 6. Leakage-free interference robustness across all eight CNNs (slide-disjoint, 3-seed; error bars = seed std). MalariaNet (red) is 2nd-most-robust overall and the most robust MCU-deployable model; SingleStream (the deployable control) is among the least robust.
Preprints 217498 g006
Figure 7. Slide leakage inflates accuracy and fabricates ablation conclusions. (a) Headline NIH accuracy, per-cell vs. slide-disjoint (3-seed mean±std). (b) Per-module ablation Δ (full − variant): large under per-cell splitting, collapsing into seed noise (grey band) and partly inverting under slide-disjoint evaluation.
Figure 7. Slide leakage inflates accuracy and fabricates ablation conclusions. (a) Headline NIH accuracy, per-cell vs. slide-disjoint (3-seed mean±std). (b) Per-module ablation Δ (full − variant): large under per-cell splitting, collapsing into seed noise (grey band) and partly inverting under slide-disjoint evaluation.
Preprints 217498 g007
Figure 8. Leakage-free (slide-disjoint) accuracy vs. model size (3-seed mean). Green zone: MCU-deployable (<200 KB). Under rigorous evaluation MalariaNet uniquely occupies the deployable zone but sits ≈1 pp below the larger baselines, the honest compactness/accuracy trade-off, not the “matches large models” picture the per-cell protocol produced.
Figure 8. Leakage-free (slide-disjoint) accuracy vs. model size (3-seed mean). Green zone: MCU-deployable (<200 KB). Under rigorous evaluation MalariaNet uniquely occupies the deployable zone but sits ≈1 pp below the larger baselines, the honest compactness/accuracy trade-off, not the “matches large models” picture the per-cell protocol produced.
Preprints 217498 g008
Figure 9. Grad-CAM++ on parasitized cells (qualitative). Columns: original, MalariaNet, Tiny-MV2, SingleStream.
Figure 9. Grad-CAM++ on parasitized cells (qualitative). Columns: original, MalariaNet, Tiny-MV2, SingleStream.
Preprints 217498 g009
Figure 10. CDDG gate-value distribution (transparency only): the gate takes differentiated values for parasitized vs. uninfected cells, but this does not translate into a measurable accuracy gain under leakage-free evaluation (Section 4.4).
Figure 10. CDDG gate-value distribution (transparency only): the gate takes differentiated values for parasitized vs. uninfected cells, but this does not translate into a measurable accuracy gain under leakage-free evaluation (Section 4.4).
Preprints 217498 g010
Figure 11. MalariaNet IoT edge deployment scenario. Total hardware cost under $60.
Figure 11. MalariaNet IoT edge deployment scenario. Total hardware cost under $60.
Preprints 217498 g011
Table 1. Per-module parameter distribution of MalariaNet (total 21,085). MSME consumes 44.4 % of the budget, the head 34.1 %, and SCFE only 3.4 %, confirming that domain-specific stain priors are inexpensive while morphology encoding dominates the budget.
Table 1. Per-module parameter distribution of MalariaNet (total 21,085). MSME consumes 44.4 % of the budget, the head 34.1 %, and SCFE only 3.4 %, confirming that domain-specific stain priors are inexpensive while morphology encoding dominates the budget.
Component Parameters Percentage
Stem 1,072 5.1%
SCFE (Stain stream) 721 3.4%
MSME (Morphology stream) 9,376 44.4%
CDDG (Gate) 2,682 12.7%
Head 7,194 34.1%
BN & biases 40 0.2%
Total 21,085 100%
Table 2. Per-cell vs. slide-disjoint accuracy (3-seed mean), all models retrained identically under both protocols.  Δ is the per-cell minus slide-disjoint accuracy, the inflation attributable to slide leakage. The load-bearing observation is that leakage inflates every model, all Δ < 0 , eight of eight. The apparent tendency for the compact from-scratch models to move more than the large ImageNet-pretrained backbones is confounded with the pretraining factor; a controlled from-scratch experiment (Section 5) shows this protective effect of pretraining is architecture-dependent, enlarging Δ for ResNet-18 and MobileNetV2 but not EfficientNet-B0, so we still do not treat the compact-versus-large differential as a load-bearing result.
Table 2. Per-cell vs. slide-disjoint accuracy (3-seed mean), all models retrained identically under both protocols.  Δ is the per-cell minus slide-disjoint accuracy, the inflation attributable to slide leakage. The load-bearing observation is that leakage inflates every model, all Δ < 0 , eight of eight. The apparent tendency for the compact from-scratch models to move more than the large ImageNet-pretrained backbones is confounded with the pretraining factor; a controlled from-scratch experiment (Section 5) shows this protective effect of pretraining is architecture-dependent, enlarging Δ for ResNet-18 and MobileNetV2 but not EfficientNet-B0, so we still do not treat the compact-versus-large differential as a load-bearing result.
Model Params Size (KB) Per-cell Acc (%) Slide-disj. Acc (%) Δ (pp) MCU
ResNet-18 11.18M 43,700 96.15 95.90 ± 1.19 0.25 No
MobileNetV2 2.23M 8,832 96.90 96.51 ± 0.51 0.39 No
EfficientNet-B0 4.01M 15,832 97.22 96.75 ± 0.60 0.47 No
MobileNetV3-Small 1.52M 5,985 97.37 96.13 ± 0.80 1.24 No
ShuffleNetV2-x0.5 340K 1,375 97.58 96.56 ± 0.36 1.02 No
Tiny-MobileNetV2 89K 375 96.69 95.83 ± 0.71 0.86 No
SingleStream 8K 34 96.28 95.37 ± 1.16 0.91 Yes
MalariaNet (Ours) 21K 85 97.06 95 . 61 ± 1 . 02 1 . 45 Yes
Table 3. Positive (PPV) and negative (NPV) predictive values of MalariaNet computed from the leakage-free slide-disjoint operating point (sensitivity = 93.94%, specificity = 97.41%, 3-seed mean). PPV rises with prevalence; NPV stays ≥99 % across the 0.5–10 % endemic band.
Table 3. Positive (PPV) and negative (NPV) predictive values of MalariaNet computed from the leakage-free slide-disjoint operating point (sensitivity = 93.94%, specificity = 97.41%, 3-seed mean). PPV rises with prevalence; NPV stays ≥99 % across the 0.5–10 % endemic band.
Prevalence PPV NPV Setting (typical)
0.5% 15.4% 99.97% Low-transmission elimination
1% 26.8% 99.94% Mesoendemic, dry season
5% 65.6% 99.67% Hyperendemic, baseline
10% 80.1% 99.31% High endemic, sub-Saharan
20% 90.1% 98.5% Peak-season epidemic
50% 97.3% 94.1% Balanced split (reference)
Table 4. Ablation under the leakage-free slide-disjoint protocol (3-seed mean ± std). Δ Acc is Full MalariaNet minus the variant. Under rigorous evaluation every per-module difference is small relative to the ≈1 pp seed-to-seed standard deviation, and the SCFE and CDDG ablations are marginally negative; the individual module gains reported under the optimistic per-cell protocol (Section 4.1.2) do not survive leakage-free evaluation.
Table 4. Ablation under the leakage-free slide-disjoint protocol (3-seed mean ± std). Δ Acc is Full MalariaNet minus the variant. Under rigorous evaluation every per-module difference is small relative to the ≈1 pp seed-to-seed standard deviation, and the SCFE and CDDG ablations are marginally negative; the individual module gains reported under the optimistic per-cell protocol (Section 4.1.2) do not survive leakage-free evaluation.
Configuration Acc (%) Sens (%) Spec (%) AUC Δ Acc
SingleStream (no decoupling) 95.37 ± 1.16 93.07 97.59 0.987 + 0.24
w/o SCFE (no stain stream) 95.64 ± 0.95 93.92 97.37 0.987 0.03
w/o CDDG (simple concat) 95.69 ± 1.05 94.06 97.33 0.989 0.08
Uniform scale MSME 95.54 ± 0.89 93.81 97.26 0.983 + 0.07
Full MalariaNet 95 . 61 ± 1 . 02 93 . 94 97 . 41 0 . 988 n/a
Table 5. STM32H7 deployment feasibility. MalariaNet is the only entry that simultaneously satisfies the <200 KB Flash and <10 M FLOP MCU envelope while remaining MCU-deployable; the accuracy column reports the leakage-free slide-disjoint accuracy (3-seed mean), consistent with the rest of the paper.
Table 5. STM32H7 deployment feasibility. MalariaNet is the only entry that simultaneously satisfies the <200 KB Flash and <10 M FLOP MCU envelope while remaining MCU-deployable; the accuracy column reports the leakage-free slide-disjoint accuracy (3-seed mean), consistent with the rest of the paper.
Model Size (KB) FLOPs (M) <200 KB Slide-disj. Acc (%)
ResNet-18 43,700 595.4 No 95.90
MobileNetV2 8,832 106.5 No 96.51
EfficientNet-B0 15,832 135.6 No 96.75
MobileNetV3-Small 5,985 20.8 No 96.13
ShuffleNetV2-x0.5 1,375 14.2 No 96.56
Tiny-MobileNetV2 375 11.0 No 95.83
SingleStream 34 3.3 Yes 95.37
MalariaNet 85 4.8 Yes 95.61
Table 6. STM32H743 on-device measured deployment metrics for the numerically-faithful INT8-weight forward at the 128 × 128 evaluation resolution (DWT cycle counter, 10-iteration mean, 400 MHz board clock). The on-chip classification matches the off-device reference to 1.8 × 10 4 , so this is the real model rather than a workload proxy.
Table 6. STM32H743 on-device measured deployment metrics for the numerically-faithful INT8-weight forward at the 128 × 128 evaluation resolution (DWT cycle counter, 10-iteration mean, 400 MHz board clock). The on-chip classification matches the off-device reference to 1.8 × 10 4 , so this is the real model rather than a workload proxy.
Metric Measured Value
MCU STM32H743IIT6 @ 400 MHz (board-limited; chip rated 480 MHz)
INT8 weights (Flash) 23.5 KB
Code size (Flash) 23.8 KB
Activation SRAM 489 KB
Latency ( 128 × 128 , measured) 816.1  ms / 326.4 M cycles (1.23 FPS)
Latency range ( n = 10 ) 816.0–816.3 ms (<0.3 ms)
On-chip kernel fidelity, max|C−ref| 1.8 × 10 4
Table 7. Comparison with published methods on the NIH Malaria Cell Images dataset.
Table 7. Comparison with published methods on the NIH Malaria Cell Images dataset.
Method Year / Venue Params Acc (%) MCU-Deployable
Custom CNN [3] 2018 / Transl. Res. ∼1M 95.9 No
Fuhad et al. [4] 2020 / Diagnostics 99.2 No
Islam et al. (ViT) [7] 2022 / Sensors ∼86M 95.0 No
Mujahid et al. [2] 2024 / Sci. Reports 7.8M 97.6 No
Chaudhry et al. [8] 2024 / Neural Comp. App. <400K 97.1 No
UltraLightSqueezeNet-V3 [22] 2025 / arXiv ∼120K 96.6 Possible
MalariaNet (Ours), per-cell 21K 97.06±0.45 Yes
MalariaNet (Ours), slide-disjoint 21K 95.61±1.02 Yes
Table 8. Cross-dataset evaluation: trained on NIH, tested on BBBC041 (no fine-tuning).
Table 8. Cross-dataset evaluation: trained on NIH, tested on BBBC041 (no fine-tuning).
Model Acc (%) Sens (%) Spec (%) AUC
SingleStream 48.44 97.55 8.30 0.539
Tiny-MobileNetV2 59.74 97.76 28.67 0.850
MalariaNet 63.79 96.33 37.20 0.830
MalariaNet w/o SCFE 74.03 88.42 62.27 0.873
Table 9. The “cross-site robustness variant” is a training-time leakage artefact. Default MalariaNet vs. MalariaNet-P, 3-seed mean ± std, under per-cell training vs. leakage-free slide-disjoint training. The striking +7.0 pp BBBC041 advantage under per-cell training shrinks to +1.8 pp, within the ±5.5 pp seed noise and with inconsistent per-seed sign, once training is leakage-free.
Table 9. The “cross-site robustness variant” is a training-time leakage artefact. Default MalariaNet vs. MalariaNet-P, 3-seed mean ± std, under per-cell training vs. leakage-free slide-disjoint training. The striking +7.0 pp BBBC041 advantage under per-cell training shrinks to +1.8 pp, within the ±5.5 pp seed noise and with inconsistent per-seed sign, once training is leakage-free.
Training protocol Model NIH acc (%) BBBC041 acc (%)
Per-cell (leaky) MalariaNet 97.06 ± 0.45 63.79
MalariaNet-P 96.65 ± 0.14 70 . 82 ± 1 . 45
Slide-disjoint MalariaNet 95.61 ± 1.02 53.23 ± 5.23
MalariaNet-P 95.69 ± 0.82 55.04 ± 5.69
Table 10. Multi-task MalariaNetMT results (3-seed mean ± std). Adding a 65-parameter regression head (MalariaNetMT vs. single-task) preserves classification accuracy within seed noise while simultaneously delivering parasite-burden estimates at r = 0.748 .
Table 10. Multi-task MalariaNetMT results (3-seed mean ± std). Adding a 65-parameter regression head (MalariaNetMT vs. single-task) preserves classification accuracy within seed noise while simultaneously delivering parasite-burden estimates at r = 0.748 .
Metric Value
Classification Task
Accuracy (%) 96.57 ± 0.37
Sensitivity (%) 96.13 ± 0.33
Specificity (%) 97.00 ± 1.02
AUC 0.9923 ± 0.002
Burden Estimation Task
MAE (all samples) 0.027 ± 0.006
Correlation (all) 0.748 ± 0.10
MAE (parasitized only) 0.041 ± 0.010
Correlation (parasitized) 0.732 ± 0.10
Model
Additional parameters 65 (<0.3%)
Total size 85.5 KB
Table 11. Leakage-free interference robustness (slide-disjoint, 3-seed). Models ranked by accuracy drop from S0 to S5 (smaller = more robust). MalariaNet is the 2nd-most-robust of all eight CNNs, behind only the 530 × -larger, non-deployable ResNet-18, and by a wide, seed-consistent margin the most robust among MCU-deployable models.
Table 11. Leakage-free interference robustness (slide-disjoint, 3-seed). Models ranked by accuracy drop from S0 to S5 (smaller = more robust). MalariaNet is the 2nd-most-robust of all eight CNNs, behind only the 530 × -larger, non-deployable ResNet-18, and by a wide, seed-consistent margin the most robust among MCU-deployable models.
Model Params S0 (%) S5 (%) Drop (pp) MCU
ResNet-18 11.18M 95.90 77.14 18.76 ± 6.95 No
MalariaNet 21K 95.61 73.78 21 . 84 ± 6 . 10 Yes
Tiny-MobileNetV2 89K 95.83 72.98 22.85 ± 4.96 No
MobileNetV2 2.23M 96.51 73.14 23.37 ± 6.20 No
EfficientNet-B0 4.01M 96.75 72.71 24.03 ± 6.85 No
ShuffleNetV2-x0.5 340K 96.56 68.33 28.23 ± 6.95 No
SingleStream 8K 95.37 66.79 28.59 ± 8.98 Yes
MobileNetV3-Small 1.52M 96.13 62.42 33.71 ± 9.20 No
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings