Work

When the hospital changes: cross-dataset accuracy, calibration and data leakage in lightweight skin lesion classifiers

Year: 2026
Type: preprint
Abstract: Skin lesion classifiers are usually evaluated on a held-out split of the dataset they were trained on, and the numbers reported this way are often high. Whether those numbers survive a change of hospital, country or camera is a different question, and one that matters before any such model is used outside the lab. We trained three ImageNet-pretrained architectures of different size and design (EfficientNet-B0, ResNet-50 and DeiT-Small) on ISIC 2019 for a binary malignant-versus-benign task and tested them, without retraining, on HAM10000 (dermoscopy, Austria) and PAD-UFES-20 (smartphone clinical photographs, Brazil). Because ISIC 2019 contains the HAM10000 images, we first removed 9,885 overlapping images from the training pool. Each model was trained with no colour fix, with strong colour augmentation, or with Shades-of-Gray colour normalisation, using two random seeds per setting. All nine settings reached an AUC of 0.88–0.91 on the in-domain test set, but only 0.73–0.85 on the smartphone photographs. The smallest model, EfficientNet-B0, lost the most (up to 0.16 AUC). Colour augmentation reduced its drop but did not help consistently across architectures, and colour normalisation lowered performance on HAM10000 for all three. Results on the external sets varied by up to 0.08 AUC between two seeds of the same setting. Leaving the HAM10000 overlap in the training data made the model score higher on HAM10000 than on its own test set, a clear sign of leakage. Finally, models were most over-confident on the smartphone photographs (mean expected calibration error 0.19), and temperature scaling fitted on the source hospital reduced but did not remove this error. We argue that external testing, leakage checks, multiple seeds and calibration should be reported routinely for this task, and we release all code.
Language: English
Subfield: Oncology
Field: Medicine
Open Access status: green
OpenAlex ID: W7241965233
Cites:
Cited by:
Related to: