July 07, 2026
Existing deep learning methods perform well in medical image classification but struggle with multi-scale morphology and limited annotations due to fixed sampling and data-hungry training. Existing approaches address these challenges in isolation: DCN-based models provide adaptive sampling but lack explicit multi-scale attention fusion and label-efficient regularisation; multi-scale architectures typically rely on static fusion; and semi-supervised methods target label scarcity without jointly modelling adaptive cross-scale representations. We propose MSA-DCNN, a scale-consistent deformable attention learning framework that introduces adaptive multi-scale sampling, within-scale saliency refinement, learned cross-scale fusion, and auxiliary self-distillation within a unified optimisation scheme, with potential to generalise to structurally heterogeneous anatomy. We evaluate on three public benchmarks and an external hold-out set for leukaemia. MSA-DCNN demonstrates competitive and often better performance against ViT baselines, CNN baselines, and a MICCAI semi-supervised baseline under distribution shift and label scarcity in accuracy, F1, and AUC (binary), while using fewer parameters. Ablations confirm complementary component contributions, supporting MSA-DCNN as a practical foundation for data-efficient medical image classification.
Automated medical image classification is a key enabler of computational healthcare, delivering fast, objective, and reproducible analysis across radiography, histopathology, and microscopy [1], [2]. Convolutional neural networks (CNNs) remain the workhorse due to their hierarchical feature learning and strong performance across lung, brain, oncology, and haematology tasks [3]–[7]. Yet, standard CNNs inherit fixed receptive fields and uniform sampling, which are often poorly matched to the heterogeneous textures and multi-scale structural variability of medical imagery [8]–[10]. Prior remedies, including attention modules and multi-scale designs, improve feature focus and coverage [11]–[14], but often rely on global aggregation that can wash out subtle cues [15], retain fixed kernels that do not adapt sampling across scales [16], and rarely provide internal supervision to strengthen shallow layers in data-limited regimes [17]. Moreover, medical image classification is frequently constrained by limited labelled data [18]–[21], limiting generalisation and sensitivity to minority patterns.
We address these gaps with the Multi-Scale Attention Deformable Convolutional Neural Network (MSA-DCNN). This work introduces a general principle for scale-consistent learning under structural heterogeneity and label scarcity, designed to perform effectively at low label fractions with a lean parameter budget while enforcing semantic alignment across resolution levels. Critically, attention is applied scale-specifically, and the resulting features are fused by a learned multi-scale attention mechanism, coupling within-scale recalibration with across-scale selection, an integration not explicitly studied in prior deformable or attention-based CNNs.
We evaluate MSA-DCNN on three publicly available benchmarks against data-efficient baselines spanning diverse morphological patterns, from dermoscopic imagery [22] to fine-grained cellular structure in blood and leukaemia smears [23], [24]. Ablations confirm complementary component effects, and external testing on an independent leukaemia cohort assesses generalisation. Across benchmarks, MSA-DCNN improves AUC (binary), accuracy, and F1 with fewer parameters.
Contributions: We introduce a scale-consistent learning framework for multi-scale medical image analysis, implemented as a compact CNN with three established principles:
Adaptive receptive-field optimisation, where deformable sampling is structured at each scale to preserve fine-grained detail while maintaining global context.
Scale-consistent saliency refinement, achieved through sub-block-pooled channel and spatial attention, which regularises within-scale feature distributions under limited supervision.
Content-aware cross-scale integration via learned attention over projected multi-resolution embeddings, with auxiliary self-distillation to align shallow and deep representations for stable, label-efficient learning.
Unlike prior multi-scale or deformable CNNs that treat adaptive sampling, attention, and fusion as separate stages, MSA-DCNN jointly learns where to sample, what to emphasise, and how to combine features under a unified objective. Attention regularises scale-local representations within each deformable branch, while a learned multi-scale operator performs content-adaptive selection across projected embeddings (Eq. 7 –9 ). An auxiliary self-distillation head enforces cross-scale semantic alignment via KL-divergence minimisation (Eq. 10 ), promoting coherent representation geometry and explaining the monotonic gains observed in the ablation study.
Figure [fig:overview] provides a concise overview of the proposed MSA-DCNN, which is designed around jointly optimising where features are sampled, how saliency is preserved within each scale, and how information is integrated across scales under limited supervision. After standard preprocessing and a lightweight stem, features traverse three compact Inception stages detailed in Figure [fig:zoom-msdconv]. Each stage comprises two sequential Inception blocks with three parallel branches operating at distinct receptive fields, where deformable convolutions adapt the sampling grid to structurally heterogeneous, variable-scale patterns. Within each branch, a scale-specific MCBAM with sub-block pooling (shown in Figure [fig:zoom-mcbam]) performs channel–spatial recalibration that preserves fine-grained morphological detail. The branch outputs are then projected to a common resolution (via \(1\times1\) conv + resize), and a multi-scale attention module computes content-dependent weights across scales to yield a unified representation. An auxiliary head attached to the first stage supplies self-distillation during training, aligning shallow and deep embeddings, while the main path proceeds to global average pooling, dropout, and a linear classification head. The model is trained end-to-end and uses a single forward pass at inference.
Let \(s \in \{1,\dots,S\}\) index the deformable convolution branches (in this case, \(S=3\)). The output \(F\) of branch \(s\) is defined as: \[F_s \in \mathbb{R}^{C_s \times H_s \times W_s}. \label{eq:Fs}\tag{1}\] where \(C\), \(H\) and \(W\) represent the channel, height, and width of the output.
Deformable convolution introduces learnable offsets \(\Delta p_k\) for each sampling point [25]. The output at position \(p_0\) is: \[\mathrm{DefConv}(p_0) = \sum_{k=1}^{K} w(k)\, x\!\left(p_0 + p_k + \Delta p_k\right), \label{eq:defconv}\tag{2}\] where \(p_k\) denotes the fixed grid offsets and \(w(k)\) are the kernel weights. The offsets \(\Delta p_k\) allow the receptive field to shift adaptively, enabling improved alignment with structurally heterogeneous and multi-scale patterns.
Each branch is refined using a two-stage MCBAM module. First, channel attention \(A^{(c)}_s\) is computed from \(F_s\) as:
\[A^{(c)}_s(F_s) = \sigma\!\left( \sum_{n=1}^{N} W_{ho,s}\, \delta\!\left( W_{ih,s}\, \mathrm{AvgPool}_{h_s \times w_s \times 1}(P_{s,n}) \right) \right) \in \mathbb{R}^{1 \times 1 \times C_s}, \label{eq:channelAtt}\tag{3}\] where \(W_{ih,s}\) and \(W_{ho,s}\) are MLP learnable weights, \(\delta\) is the ReLU activation, \(N\) is the number of spatial sub-blocks (4 in this case, which improves computational efficiency), and \(\sigma\) is the sigmoid activation. Channel refinement is then applied as: \[F_s^{(c)} = A^{(c)}_s(F_s) \odot F_s. \label{eq:channelRefined}\tag{4}\]
The channel-refined map \(F_s^{(c)}\) is partitioned into (\(m\) = 3, which improves efficiency) channel sub-blocks \(\{Q_{s,j}\}_{j=1}^{m}\), as shown in the spatial attention component of Figure [fig:zoom-mcbam]. Spatial attention is computed by aggregating sub-block descriptors and applying a convolutional filter (\(7\times7\) spatial dimension is used, as derived from [15]):
\[\begin{align} A^{(s)}_s(F_s^{(c)}) &= \sigma\!\left( \mathrm{Conv}_{7\times7}\! \left( \mathrm{Conc.}\!\left[ \mathrm{AP}_{1\times1\times d}(Q_{s,1}), \dots, \mathrm{AP}_{1\times1\times d}(Q_{s,m}) \right] \right) \right) \\ &\in \mathbb{R}^{1 \times H_s \times W_s}. \end{align} \label{eq:spatialAtt}\tag{5}\]
Finally, spatial attention is applied to the channel-refined feature map to obtain the MCBAM-modified output: \[F_s' = A^{(s)}_s(F_s^{(c)}) \odot F_s^{(c)}. \label{eq:mcbamFinal}\tag{6}\]
Each refined feature map is projected into a common space using a scale-projection operator: \[U_s(F_s') = \mathrm{resize}\!\left( \mathrm{Conv}_{1\times1}(F_s') \right) \in \mathbb{R}^{C \times H \times W}. \label{eq:Us}\tag{7}\]
Sample-wise multi-scale attention is computed from concatenated global descriptors as: \[\alpha = \mathrm{softmax} \!\left( W_2\, \delta\!\left( W_1\, \mathrm{Concat}_{s=1}^{S} \left[ \mathrm{GAP}(U_s(F_s')) \right] \right) \right) \in \mathbb{R}^{S}. \label{eq:alpha}\tag{8}\]
\(W_1\) and \(W_2\) are learnable parameters for multi-scale attention; GAP denotes global average pooling. The fused multi-scale representation is:
\[F_{\mathrm{MSA}} = \sum_{s=1}^{S} \alpha\,U_s(F_s'). \label{eq:msa}\tag{9}\]
Eq. (1 –9 ) define a scale-attentive operator that jointly regularises within-scale saliency and across-scale selection, yielding a unified, content-adaptive embedding for irregular morphology.
We formalise self-distillation as a geometric constraint on cross-scale representation alignment that regularises early deformable offsets by aligning low- and high-resolution semantic manifolds in low-label regimes. This enforces invariance of semantic structure across resolution levels rather than simple logit matching. Let \(z_T\) and \(z_i\) denote deep and shallow projections, respectively. The distillation loss is:
\[L_{\mathrm{SD}} = \mathrm{KLDiv} \!\left( \mathrm{Softmax}\!\left(\frac{z_T}{\tau}\right), \, \mathrm{Softmax}\!\left(\frac{z_i}{\tau}\right) \right), \label{eq:sd}\tag{10}\] where \(\tau\) is a temperature parameter. The overall training objective is \[L_{\mathrm{total}} = \lambda_{CE}L_{\mathrm{CE}} + \lambda_{FL}L_{\mathrm{Focal}} + \lambda L_{\mathrm{SD}}, \label{eq:total95loss}\tag{11}\]
where \(L_{\mathrm{CE}}\) denotes the class-weighted cross-entropy loss, \(L_{\mathrm{Focal}}\) denotes the focal loss for handling class imbalance, and \(L_{\mathrm{SD}}\) represents the self-distillation loss, and the \(\lambda_{CE}\), \(\lambda_{FL}\), and \(\lambda\) are the corresponding loss weighting coefficients.
We evaluate MSADCNN on three public benchmarks and an external hold-out set. Our experiments assess quality, robustness, and label efficiency of multi-scale representations under distribution shift and class imbalance. CNMC contains 15,114 white blood cell smear images (\(450{\times}450\), RGB) with class imbalance between normal and leukaemia cells; PBC comprises 17,092 images across eight peripheral blood cell classes (\(360{\times}363\), RGB) with pronounced class imbalance; and ISIC2020 is a large-scale dermoscopic dataset with severe skew (\(\approx\)32k benign vs. malignant) and varying image resolutions. For external validation, we evaluate on an entirely independent leukaemia smear dataset1, where pre-, early-, and pro-leukaemia labels are merged into a single leukaemia class to match the binary setting. Importantly, this external dataset is not used at any stage of model development, including training, validation, hyperparameter tuning, model selection, or internal testing. Instead, it is reserved exclusively for post hoc evaluation to assess the generalisation capability and robustness of MSADCNN under distribution shift. We report Accuracy and F1-score for all datasets, and AUC for binary tasks. Model efficiency is assessed using parameter count and floating-point operations (FLOPs).
Experiments were conducted on an NVIDIA A100 GPU using PyTorch with a 70/15/15 train/validation/test split. Images were processed at dataset-specific resolutions: PBC (\(299{\times}299\)), CNMC (\(450{\times}450\)), and ISIC-2020 (\(768{\times}768\)). All methods, incl. a DeiT ImageNet-pretrained transformer, followed identical protocols and were trained with Adam (\(1{\times}10^{-4}\), batch size 32) for 20 epochs using class-balanced sampling, class-weighted cross-entropy (binary BCE for two-class tasks), focal loss, and minority-targeted augmentations. Evaluation used normalised test images only; binary tasks employed BCE-with-logits, and PBC used categorical cross-entropy, with auxiliary heads weighted at 0.3. Hyperparameters were selected on validation and fixed across datasets. Results are reported as mean \(\pm\) standard deviation over five seeds, with significance assessed using paired Wilcoxon tests (\(p<0.05\)) and 1,000-sample bootstrap CIs. Code will be released upon acceptance.
Table 1 shows that MSA-DCNN achieves competitive and often better performance across datasets, surpassing foundational and data-efficient transformers (DINOv2-S [26], DeiT-S [27]), compact CNNs (Inception-v3 [28], EfficientNet [29]), the deformable-convolution-based DGConv [30], and a semi-supervised baseline (TS-MS [20]) while using substantially fewer parameters. DGConv consistently provides the strongest baseline performance across most datasets, highlighting the effectiveness of deformable convolutions for modelling geometric variations; however, MSA-DCNN achieves further gains in AUC, accuracy, and F1-score with lower parameter complexity. As shown in Fig. 2, performance remains higher under reduced label fractions, indicating improved label efficiency relative to both supervised and semi-supervised baselines. Gains in AUC and F1 persist under class imbalance, reflecting improved sensitivity to minority patterns. Paired Wilcoxon tests across seeds confirm significant AUC gains (C-NMC: \(p=0.018\), ISIC-2020: \(p=0.011\), ALL: \(p=0.024\)), with 95% bootstrap CIs of [+0.014, +0.029], [+0.010, +0.030], and [+0.006, +0.032], respectively. Despite increased FLOPs at higher resolutions, MSA-DCNN remains computationally competitive, and performance on the external ALL cohort degrades modestly yet remains consistently above all baselines, supporting robustness under distribution shift.
| DB | Method | AUC | Acc | F1 | FLOPs | Params |
|---|---|---|---|---|---|---|
| PBC | Inception-v3 [28] | – | 0.92 | 0.91 | 5.74 | 23.9 |
| EfficientNet-B3 [29] | – | 0.90 | 0.89 | 1.78 | 12.0 | |
| DeiT-S [27] | – | 0.89 | 0.88 | 5.03 | 22.1 | |
| DINOv2-S [26] | – | 0.91 | 0.90 | 11.08 | 21.3 | |
| TS-MS [20] | – | 0.92 | 0.91 | 3.10 | 8.4 | |
| DGConv [30] | – | 0.92 | 0.92 | 3.42 | 7.98 | |
| MSA-DCNN | – | 0.94 | 0.93 | 1.99 | 5.25 | |
| C-NMC | Inception-v3 [28] | 0.94 | 0.93 | 0.92 | 7.57 | 23.9 |
| EfficientNet-B3 [29] | 0.92 | 0.91 | 0.90 | 3.12 | 12.0 | |
| DeiT-S [27] | 0.91 | 0.90 | 0.89 | 6.99 | 22.1 | |
| DINOv2-S [26] | 0.93 | 0.92 | 0.90 | 13.97 | 21.3 | |
| TS-MS [20] | 0.91 | 0.90 | 0.88 | 4.60 | 8.4 | |
| DGConv [30] | 0.94 | 0.92 | 0.93 | 4.54 | 7.98 | |
| MSA-DCNN | 0.96\(\pm\)0.003\(^{\dagger}\) | 0.94\(\pm\)0.002 | 0.93\(\pm\)0.004 | 3.80 | 5.25 | |
| ISIC-2020 | Inception-v3 [28] | 0.95 | 0.94 | 0.93 | 16.60 | 23.9 |
| EfficientNet-B3 [29] | 0.93 | 0.92 | 0.91 | 10.98 | 12.0 | |
| DeiT-S [27] | 0.92 | 0.91 | 0.89 | 13.40 | 22.1 | |
| DINOv2-S [26] | 0.94 | 0.93 | 0.91 | 19.04 | 21.3 | |
| TS-MS [20] | 0.95 | 0.93 | 0.92 | 12.10 | 8.4 | |
| DGConv [30] | 0.96 | 0.94 | 0.94 | 9.36 | 7.98 | |
| MSA-DCNN | 0.97\(\pm\)0.003\(^{\dagger}\) | 0.95\(\pm\)0.002 | 0.94\(\pm\)0.006 | 11.07 | 5.25 | |
| Hold-Out ALL | Inception-v3 [28] | 0.91 | 0.90 | 0.89 | 7.57 | 23.9 |
| EfficientNet-B3 [29] | 0.89 | 0.89 | 0.88 | 3.12 | 12.0 | |
| DeiT-S [27] | 0.88 | 0.88 | 0.87 | 6.24 | 22.1 | |
| DINOv2-S [26] | 0.90 | 0.90 | 0.88 | 13.97 | 21.3 | |
| TS-MS [20] | 0.89 | 0.87 | 0.86 | 4.60 | 8.4 | |
| DGConv [30] | 0.91 | 0.90 | 0.91 | 4.54 | 7.98 | |
| MSA-DCNN | 0.93\(\pm\)0.005\(^{\dagger}\) | 0.92\(\pm\)0.004 | 0.91\(\pm\)0.006 | 3.80 | 5.25 |
2pt
| Dataset | Baseline | DC | SSA | MSA | SD | AUC | Acc | \(F_1\) |
|---|---|---|---|---|---|---|---|---|
| PBC | ✔ | – | 0.88 | 0.88 | ||||
| ✔ | ✔ | – | 0.90 | 0.90 | ||||
| ✔ | ✔ | – | 0.90 | 0.89 | ||||
| ✔ | ✔ | – | 0.91 | 0.91 | ||||
| ✔ | ✔ | – | 0.91 | 0.90 | ||||
| ✔ | ✔ | ✔ | – | 0.92 | 0.92 | |||
| ✔ | ✔ | ✔ | – | 0.92 | 0.91 | |||
| ✔ | ✔ | ✔ | – | 0.92 | 0.91 | |||
| ✔ | ✔ | ✔ | – | 0.92 | 0.92 | |||
| ✔ | ✔ | ✔ | – | 0.92 | 0.91 | |||
| ✔ | ✔ | ✔ | – | 0.92 | 0.91 | |||
| ✔ | ✔ | ✔ | ✔ | – | 0.93 | 0.93 | ||
| ✔ | ✔ | ✔ | ✔ | – | 0.93 | 0.93 | ||
| ✔ | ✔ | ✔ | ✔ | – | 0.93 | 0.92 | ||
| ✔ | ✔ | ✔ | ✔ | – | 0.93 | 0.93 | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | – | 0.94 | 0.93 | |
| CNMC | ✔ | 0.92 | 0.91 | 0.90 | ||||
| ✔ | ✔ | 0.94 | 0.92 | 0.92 | ||||
| ✔ | ✔ | ✔ | 0.95 | 0.93 | 0.92 | |||
| ✔ | ✔ | ✔ | ✔ | 0.95 | 0.93 | 0.92 | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | 0.96 | 0.94 | 0.93 | |
| ISIC2020 | ✔ | 0.93 | 0.91 | 0.89 | ||||
| ✔ | ✔ | 0.94 | 0.92 | 0.91 | ||||
| ✔ | ✔ | ✔ | 0.95 | 0.94 | 0.93 | |||
| ✔ | ✔ | ✔ | ✔ | 0.96 | 0.94 | 0.93 | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | 0.97 | 0.95 | 0.94 |
Table 2 quantifies the impact of Deformable Convolution (DC), Scale-Specific Attention (SSA), Multi-Scale Attention (MSA), and Self-Distillation (SD). On PBC, each component improves over the baseline, with additive gains yielding the best accuracy–F1 trade-off. On the highly imbalanced ISIC-2020, all variants use identical class-balanced training, as the unbalanced baseline collapses toward benign prediction. Reduced ablations on CNMC and ISIC-2020 show a consistent monotonic trend, where DC and SSA strengthen discrimination, MSA improves cross-scale fusion, and SD provides further refinement, producing gains in AUC, accuracy, and F1. The full configuration performs best across datasets, including under reduced labels (Fig. 2 (a), Fig. 2 (b)), confirming complementary and generalisable contributions.
We presented MSA-DCNN, a scale-consistent framework for data-efficient medical image classification that integrates adaptive sampling, scale-specific feature refinement, learned multi-scale attention fusion, and auxiliary self-distillation. Across C-NMC, PBC, ISIC-2020, and an external leukaemia hold-out set, it achieves competitive and often better performance; ablations confirm complementary contributions of DC, SSA, MSA, and SD, with consistent gains under reduced labels (Fig. 2 (a), Fig. 2 (b)), supporting robustness under scanner, staining, and cohort shift. Future work will explore uncertainty-aware inference, enhanced interpretability, and trustworthy clinical decision support.
Figure 2: Label-efficiency on ISIC-2020: (a) F1 degradation under reduced labels; (b) accuracy learning curves versus supervised and semi-supervised baselines.. a — Subset ablation., b — Data-efficiency curves.
https://www.kaggle.com/datasets/mehradaria/leukemia?resource=download↩︎