MDSkin-Net: Multi-Task Skin Lesion Analysis Driven by Pattern Analysis Priors and Spatial Alignment Regularization
Organizations: University of Minnesota, Minneapolis, MN, USA
Abstract
Reliable skin lesion segmentation and classification are central to dermoscopic computer-aided diagnosis. Existing multi-task frameworks couple the two tasks architecturally without clinical knowledge, while knowledge-injecting approaches rely on the macroscopic ABCD rule, which was not designed for dermoscopy. Dermoscopic diagnosis is grounded in Pattern Analysis, a microscopic framework structured around dermoscopic features. We propose MDSkin-Net, which incorporates cue-level Pattern Analysis priors into a hybrid CNN-Transformer architecture. At its core is a Pattern Analysis-Guided Attention Module (PAGAM) comprising three priors motivated by distinct dermoscopic cues: an improved Efficient Channel Attention (iECA), a Multi-Scale Spatial Attention (MSSA), and a Biased Asymmetry Attention (BAA). We further introduce a multi-scale spatial alignment regularization (MSAR) that uses the segmentation ground-truth mask as hierarchical soft supervision, confining the classification head to lesion-localized evidence and coupling both task pathways through a shared spatial prior. Trained exclusively on the ISIC 2017 training split without external dermoscopy data, the MDSkin-Net ensemble transfers robustly under zero-shot evaluation, reaching a Dice Similarity Coefficient (DSC) of 92.38% and a melanoma AUC of 97.84%on PH2, and a DSC of 88.92% on the ISIC 2018 Task 1 test set. On the in-domain ISIC 2017 benchmark, the ensemble attains a mean Area Under the Curve (AUC) of 91.60% across the two classification tasks (melanoma and seborrheic keratosis vs. rest), and a DSC of 84.72% for segmentation. Classification remains competitive with baselines; in-domain segmentation trails single-task specialists, yet the proposed priors and alignment regularization yield representations that generalize consistently across cohorts of different scales.
Figures & tables
| Cohort | Images | Annotation | Role here |
|---|---|---|---|
| ISIC 2017 [ 22 ] | 2,750 | label + mask | train / val / test |
| PH2 [ 23 ] | 200 | label + mask | zero-shot, small |
| ISIC 2018 T1 [ 24 , 25 ] | 1,000 | mask only | zero-shot, large |
| Method | Year | Segmentation | Classification | ||||||
|---|---|---|---|---|---|---|---|---|---|
| DSC | SE | SP | ACC | AUC | SE | SP | ACC | ||
| U-Net [ 18 ] | 2015 | 89.36 | 91.25 | 95.88 | 92.33 | — | — | — | — |
| PSPNet [ 29 ] | 2017 | 84.55 | 79.82 | 93.65 | 86.33 | — | — | — | — |
| Attn-UNet [ 30 ] | 2018 | 90.03 | 92.05 | 96.40 | 92.76 | — | — | — | — |
| UNet++ [ 31 ] | 2018 | 88.58 | 88.20 | 92.44 | 90.31 | — | — | — | — |
| MB-DCNN † [ 11 ] | 2020 | 92.60 | 97.90 | 95.30 | 96.50 | 95.60 | 82.50 | 90.00 | 88.50 |
| Method | DSC | IoU | SE | SP | ACC |
|---|---|---|---|---|---|
| Ours | |||||
| Ours (ens.) | 88.92 | 81.45 | 94.39 | 96.51 | 95.42 |
| Setting | Value |
|---|---|
| Optimizer | AdamW |
| Peak learning rate | |
| Weight decay | |
| LR multiplier, BAA | base |
| LR multiplier, encoder | base |
| Schedule | cosine annealing |
| Model | BAA | iECA | MSSA | MSAR | Params | Segmentation Metrics | Classification Metrics | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| (M) | DSC | IoU | SE | SP | AUC | F1 | SE | SP | |||||
| I: Baseline | — | — | — | — | 33.97 | 83.76 0.94 | 75.09 1.21 | 81.02 2.69 | 99.02 0.29 | 85.34 1.58 | 57.14 5.81 | 64.96 9.25 | 85.51 8.07 |
| II: +BAA | — | — | — | 33.97 | 84.84 0.58 | 76.51 0.84 | 81.47 1.54 | 99.18 0.14 | 84.48 1.78 | 59.41 0.97 | 56.13 3.56 | 92.06 1.69 | |
| III: +iECA | — | — | 33.97 | 84.87 0.50 | 76.50 0.51 | 81.00 0.65 | 99.21 0.06 | 85.00 1.65 | 60.05 1.87 | 52.42 1.31 | 94.62 0.90 | ||
| IV: +MSSA | — | 34.06 | 84.94 0.54 | 76.42 0.78 | 82.38 1.54 | 98.95 0.10 | 84.90 1.44 | 59.18 2.11 | 61.82 8.21 | 88.61 4.31 | |||
| V: Full model | 34.08 | 85.43 0.64 | 77.16 0.79 | 82.57 1.92 | 98.99 0.37 | 85.37 0.92 | 58.42 3.83 | 50.71 5.22 | 94.48 1.81 | ||||
| Model | Configuration | Segmentation | Classification | ||
|---|---|---|---|---|---|
| DSC | IoU | AUC | F1 | ||
| I | Standard MHA (all layers) | 83.76 0.94 | 75.09 1.21 | 85.34 1.58 | 57.14 1.58 |
| VI | BAA (last two layers) | 85.22 0.53 | 77.00 0.66 | 83.86 0.82 | 55.10 2.20 |
| VII | BAA (all layers) | 84.58 0.79 | 76.24 1.03 | 84.40 1.64 | 55.61 8.01 |
| II | BAA (last layer only) | 84.84 0.58 | 76.51 0.84 | 84.48 1.78 | 59.41 0.97 |
| Model | Align Mode | DSC | IoU | AUC | F1 |
|---|---|---|---|---|---|
| ISIC2017 (in-domain) | |||||
| VIII | None | 84.94 0.54 | 76.42 0.78 | 84.90 1.44 | 59.18 2.11 |
| IX | Deepest | 85.15 0.21 | 76.87 0.31 | 86.43 0.93 | 61.39 5.08 |
| V | Multi-scale | 85.43 0.64 | 77.16 0.79 | 85.37 1.92 | 58.42 3.83 |
| PH2 (zero-shot) | |||||
| VIII | None | 90.58 1.06 | 83.44 1.80 | 91.31 3.39 | 65.87 9.32 |
| Model | Loss Strategy | Weights | Segmentation | Classification | ||||
| DSC | IoU | AUC | F1 | |||||
| ISIC2017 (in-domain) | ||||||||
| X | Fixed (1:1) | 1.0 | 1.0 | 1.0 | 85.40 0.48 | 77.08 0.60 | 83.76 1.28 | 56.07 2.72 |
| XI | Fixed (1:5) | 1.0 | 5.0 | 1.0 | 85.48 1.05 | 77.28 1.32 | 85.38 0.87 | 56.43 0.12 |
| XII | Fixed (1:10) | 1.0 | 10.0 | 1.0 | 85.17 0.98 | 76.71 1.25 | 84.35 1.79 | 54.81 2.44 |
| V | Fixed (1:3) | 1.0 | 3.0 | 1.0 | 85.43 0.64 | 77.16 0.79 | 85.37 1.92 | 58.42 3.83 |