CAMEO: A Class-Activation-Mapped Equitable Overlay Framework for Fair and Robust Deep Learning-based Skin Condition Diagnosis
Organizations: Department of Electrical and Computer Engineering, University of New Brunswick, Fredericton, NB, Canada
Abstract
Deep learning classifiers for dermoscopic skin lesions often reach high in-distribution accuracy while quietly relying on spurious background cues such as skin tone, device vignetting, and embedded rulers, rather than on lesion morphology. This undermines robustness and fairness across skin tones. This work asks whether Explainable AI (XAI), typically used only to audit a finished model, can instead be repurposed as an active training signal that corrects this shortcut without sacrificing diagnostic accuracy. We introduce CAMEO (Class Activation Mapped Equitable Overlay), a framework that improves skin-lesion classification by selecting stable model explanations and using them to separate lesions from their backgrounds. It then replaces the background with realistic synthetic skin while keeping the lesion unchanged. On HAM10000 and dark-skin ISIC images, CAMEO maintained accuracy while reducing background-driven errors by nearly four times. It also made the model's attention more consistent when backgrounds changed. Results across multiple tests show that reducing reliance on background information improves robustness, with Fitzpatrick-based backgrounds providing a realistic and interpretable approach. Results show that XAI-guided augmentation can make dermoscopic classifiers measurably more robust and fair at no cost to accuracy. They also clarify that it is the mechanism and not the specific tone palette that matters, and that the lasting contribution of XAI here lies in stability-screened, annotation-free lesion localisation rather than in the robustness number itself.
Figures & tables
| Set | Description and purpose | |
|---|---|---|
| T0 | 342 | Frozen class-balanced HAM10000 test set (in-distribution). |
| T1 | 100 | External dark-skin ISIC set (real cross-tone shift). |
| T_swap | 342 | Synthetic background swap of T0 (controlled robustness). |
| Name | Core | Background strategy | Role |
|---|---|---|---|
| Base-Skewed (M1) | Full HAM10000, imbalanced (6,224 and 774) | None (raw images) | Naive baseline; reflects the natural class imbalance. |
| Base-Balanced (M2) | Balanced subset (774 and 774) | None (raw images) | Primary baseline to beat; class imbalance removed by undersampling. |
| CAMEO (ours) (M3_AugB_M2, v4) | Balanced subset (774 and 774) | ChromaSwap , symmetric on both classes | Headline model; the primary result reported throughout the paper. |
| CAMEO-Skewed (M3_AugB_M1) | Full HAM10000, imbalanced core | ChromaSwap , minority class only | Tests whether augmentation alone can substitute for explicit class balancing. |
| CAMEO-RandomBG | Balanced subset (774 and 774) | Random, non-Fitzpatrick background | Internal control: isolates whether Fitzpatrick-specific tones are necessary. |
| BiasAdv [ 26 ] | Balanced subset (774 and 774) | Bias-conflicting background against a frozen biased classifier | External debiasing baseline, named as in its source publication. |
| Model | Accuracy | Macro F1 | AUC-ROC | Cohen’s |
|---|---|---|---|---|
| Base-Skewed | 0.743 [0.696, 0.789] | 0.736 | 0.819 [0.774, 0.862] | 0.485 |
| Base-Balanced | 0.848 [0.810, 0.886] | 0.848 | 0.912 [0.881, 0.941] | 0.696 |
| CAMEO (ours) | 0.836 [0.795, 0.874] | 0.836 | 0.913 [0.880, 0.942] | 0.673 |
| CAMEO-Skewed | 0.795 [0.751, 0.836] | 0.791 | 0.898 [0.862, 0.931] | 0.591 |
| Model | Train | Val. | Test (T0) | Train Test |
|---|---|---|---|---|
| Base-Skewed | 0.643 | 0.735 | 0.743 | 0.100 |
| Base-Balanced | 0.981 | 0.795 | 0.848 | 0.133 |
| CAMEO (ours) | 0.995 | 0.824 | 0.836 | 0.159 |
| CAMEO-Skewed | 0.992 | 0.759 | 0.795 | 0.196 |
| Statistic | Value |
|---|---|
| Images analysed | 3,000 |
| Mean SSIM | 0.758 |
| Median SSIM | 0.766 |
| SSIM range (min to max) | 0.451 to 0.967 |
| XAI-unstable (SSIM ) | 744 (24.8%) |
| Background-bias flagged | 1,559 (52.0%) |
| Set | Mean | ID rate | ||
|---|---|---|---|---|
| HAM10000 val. (calibration) | 1,498 | 0.966 | 0.000 | 95.0% |
| Frozen T0 (control) | 342 | 0.965 | 0.131 | 93.3% |
| T1 ISIC dark (external) | 100 | 0.929 | 1.751 | 63.0% |
| Model | Accuracy | Accuracy | AUC | |
|---|---|---|---|---|
| (all) | (ID) | (ID) | ||
| Base-Skewed | 0.820 | 0.857 | 0.037 | 0.861 |
| Base-Balanced | 0.640 | 0.810 | 0.170 | 0.796 |
| CAMEO (ours) | 0.660 | 0.794 | 0.134 | 0.676 |
| CAMEO-Skewed | 0.630 | 0.778 | 0.148 | 0.726 |
| Model | Prob. range | Flip rate | CAM SSIM |
|---|---|---|---|
| Base-Balanced | 0.250 | 19.8% | 0.720 |
| CAMEO (ours) | 0.123 | 5.4% | 0.842 |
| Group | Mean IoU | Mean Dice | Median Dice | |
|---|---|---|---|---|
| All | 2,332 | 0.422 | 0.570 | 0.611 |
| Non-melanoma | 1,858 | 0.428 | 0.576 | 0.618 |
| Melanoma | 474 | 0.397 | 0.545 | 0.577 |
| Method | Mean IoU |
|---|---|
| Otsu (grayscale) [ 36 ] | 0.552 |
| Composite XAI mask (ours) | 0.427 |
| HSV colour threshold | 0.426 |
| SkinSAM without prompt [ 27 ] | 0.16 |
| Checkpoint | Pipeline / recipe | T0 accuracy | T_swap accuracy |
|---|---|---|---|
| Legacy-LesionJitter | comparison / unbalanced LesionJitter | 0.798 | 0.792 |
| Legacy-ChromaSwap | comparison / unbalanced ChromaSwap | 0.827 | 0.810 |
| Legacy-Combined | comparison / unbalanced A B | 0.827 | 0.792 |
| Legacy-ChromaSwap-p70 | threshold sweep | 0.825 | 0.807 |
| Legacy-ChromaSwap-p80 | threshold sweep | 0.807 | 0.789 |
| Legacy-FlatBG | v2 flat background | 0.787 | 0.564 |
| Model | T0 accuracy | T_swap accuracy | Accuracy drop |
|---|---|---|---|
| Base-Balanced | |||
| CAMEO (ours) |
| Model | Method | T0 accuracy | T_swap accuracy | vs. ours |
|---|---|---|---|---|
| CAMEO (ours) | XAI ChromaSwap (Fitzpatrick) | 0.836 | 0.810 | n/a |
| CAMEO-RandomBG | Random non-Fitzpatrick ChromaSwap | 0.830 | 0.816 | 0.87 |
| BiasAdv | BiasAdv-style conflicting background [ 26 ] | 0.830 | 0.798 | 0.62 |
| AdvDebias-GRL | Adversarial tone debiasing by gradient reversal [ 25 ] | 0.833 | 0.734 | 0.01 |
| Model | Clean acc. | |||||
|---|---|---|---|---|---|---|
| Base-Skewed | 0.743 | 0.345 | 0.158 | 0.213 | 0.447 | 0.500 |
| Base-Balanced | 0.848 | 0.213 | 0.085 | 0.105 | 0.377 | 0.500 |
| CAMEO (ours) | 0.836 | 0.325 | 0.193 | 0.219 | 0.415 | 0.500 |
| CAMEO-Skewed | 0.795 | 0.409 | 0.272 | 0.289 | 0.386 | 0.503 |