Where to Put Attention: A Layer-Placement Ablation for CBAM-EnhancedRT-DETR in Thick-Smear Malaria Microscopy
Martha Kachweka ⋅ Carine Mukamakuza ⋅ Abubakar Chilala
Abstract
Malaria remains a major global health burden, with an estimated 282 million cases and 610{,}000 deaths in 2024; the WHO African Region accounted for approximately 94\% of cases and 95\% of deaths [1]. WHO recommends prompt parasite-based diagnosis by microscopy or rapid diagnostic testing, and microscopy enables detection and identification of malaria parasites as well as estimation of parasite density [2]. Automated parasite detection in thick blood smears nonetheless remains challenging, because parasites appear against complex cellular and staining backgrounds, while species-level detection requires distinguishing visually similar objects. Attention modules are increasingly used to improve small-object detection, yet their placement within a detector is usually selected empirically rather than evaluated systematically. We therefore ask where attention should be placed in a transformer-based detector for thick-smear malaria microscopy. To answer this, we inject Convolutional Block Attention Modules (CBAM) [3] into the HGNetv2 backbone of RT-DETR-L [4] and systematically ablate their placement. CBAM sequentially applies channel and spatial attention. We compare a single module at layer 10, dual insertion at layers 4+10, and dual insertion at layers 3+10, thereby testing whether combining higher-resolution and semantic features improves parasite localization. All models use the same training configuration: $640\times640$ input resolution, 100 epochs, patience 20, AdamW optimizer with cosine learning-rate scheduling, and $lr_0 = 10^{-4}$. Evaluation is object-level rather than patient-level, on a held-out set of 639 thick-smear images containing 3{,}853 annotated objects across five classes: \emph{P.\ falciparum}, \emph{P.\ malariae}, \emph{P.\ ovale}, \emph{P.\ vivax}, and white blood cells. Attention placement substantially affects performance. Relative to the RT-DETR-L baseline, a single CBAM at layer 10 improves mAP50 from 0.785 to 0.793 (+0.008), while dual placement at layers 4+10 and 3+10 improves it to 0.800 (+0.015) and 0.810 (+0.025) respectively, with the corresponding mAP50-95 values increasing from 0.523 to 0.532, 0.536, and 0.542. The best configuration adds only 41{,}157 parameters, an overhead of 0.13\%. Its advantage is particularly pronounced for \emph{P.\ falciparum}, the class with the smallest objects in the dataset, achieving 0.745 mAP50 compared with 0.705 for baseline RT-DETR-L and 0.712 for YOLOv9-C [5]. Against the one-stage baselines, YOLOv9-C achieves the highest mAP50 (0.817), whereas dual-CBAM RT-DETR achieves the highest mAP50-95 (0.542) and the highest recall (0.811). These results indicate that the benefit of attention depends not only on its presence but also on where it is inserted. We further observed that the baseline RT-DETR-L reached approximately 0.808 mAP50 around epoch 50 before declining to 0.785 at epoch 100, whereas the dual-CBAM model continued improving under the same training schedule, behaviour consistent with greater training stability, although our experiment does not establish a regularization mechanism. Several limitations bound these conclusions. Results are based on a single held-out test set, so we do not estimate between-run variance or statistical significance, and \emph{P.\ vivax} and \emph{P.\ malariae} are relatively underrepresented at 110 and 331 instances respectively, limiting confidence in their per-class estimates. We also do not claim clinical diagnostic utility from object-detection metrics alone. What the results do demonstrate is that attention placement is an experimentally important design variable in small-object medical detection, and we recommend systematic layer-placement ablation rather than treating attention insertion as a fixed implementation detail. \textbf{References} \enspace 1. World Health Organization. \emph{World Malaria Report 2025}. WHO, 2025. 2. World Health Organization. \emph{Malaria: Microscopy}. Global Malaria Programme. 3. Woo, S., Park, J., Lee, J.-Y., and Kweon, I. S. CBAM: convolutional block attention module. \emph{ECCV}, 2018. 4. Zhao, Y. et al. DETRs beat YOLOs on real-time object detection. \emph{CVPR}, 2024. 5. Wang, C.-Y., Yeh, I-H., and Liao, H.-Y. M. YOLOv9: programmable gradient information. \emph{ECCV}, 2024.
Chat is not available.
Successful Page Load