arXiv:2611.02437cs.CVNov 2026

Manuscript Offprint

arXiv:2611.02437

Evaluating Synthetic Skin Lesion Images for Classifier Training: A Safety-Aware Algorithm

Amindu Kumarasinghe, Vinh Bui, Reza Ghanbarzadeh

Abstract

Skin cancer classifiers need large sets of annotated images, which are scarce, especially for rare lesion types. AI-generated images can fill the gap, but a generator produces images of widely varying quality, so selecting which images to retain is important. That choice usually rests on a single quality score, most often the Fréchet Inception Distance (FID), which has not been tested against what a classifier needs and cannot tell whether the generator memorizes its training photographs. We test that practice with a tournament of 16 quality metrics. Each metric alone selects a training subset from a pool of 275,472 images generated by a diffusion model (EDM2), and a classifier trained on each subset scores the metric per class. The tournament shows that no single metric serves every class: FID computed on Inception features gives the best classifier for one lesion type and no measurable advantage over random sampling for another, and the generation setting it prefers is also the one closest to the training images. We turn these per-class measurements into a safety-aware evaluation algorithm that weights each metric by its measured value in each class and removes images too close to a real training image. On the held-out ISIC-2018 test set, the algorithm improves Macro-F2F_2, a recall-weighted measure of classification performance, over the FID baseline for a Swin-B classifier by +0.0136 to +0.0164 across four safety thresholds (Bonferroni-corrected p<0.02p < 0.02) and over random sampling by about +0.03, though not for ResNet-50. Tightening the threshold improves a memorization-safety score with no measurable change in utility, but every curated set remains less safe than random sampling. The results show a modest but statistically significant gain on the primary classifier, and offer a practical, safety-aware procedure for evaluating and using synthetic data.

Keywords: synthetic medical images, dermoscopy, skin lesion classification, data curation, evaluation metrics, memorization

1 Introduction

Skin cancer is among the most common cancers worldwide, and its most lethal form, melanoma, kills thousands of patients every year (World Health Organization, 2025; Siegel et al., 2019). However, early detection substantially improves survival, and deep learning classifiers trained on dermoscopic images can now approach expert-level diagnostic performance (Esteva et al., 2017). That performance depends on large, expertly annotated training sets. These are expensive to assemble, and for the rarest diagnoses they do not exist in quantity (Alzubaidi et al., 2023). Patient privacy regulations such as the General Data Protection Regulation (GDPR) and the Health Insurance Portability and

*amindukumarasinghe@gmail.com

Accountability Act (HIPAA) add a further constraint, restricting how dermoscopic images can be shared or pooled across institutions even when they do exist (Giouroukou et al., 2025). On the International Skin Imaging Collaboration (ISIC) 2018 dataset used throughout this paper (Codella et al., 2019; Tschandl et al., 2018), the seven diagnostic classes, melanoma (MEL), nevus (NV), basal cell carcinoma (BCC), actinic keratoses and intraepithelial carcinoma (AKIEC), benign keratosis (BKL), dermatofibroma (DF), and vascular lesion (VASC), range from 5,364 training images for the majority class (NV) to 92 for the rarest (DF). This imbalance reflects how rare each diagnosis is in the clinic, so the rarest classes stay small in any realistic collection of clinical images.

Synthetic image generation is the field's response to that scarcity. Generative Adversarial Networks (Goodfellow et al., 2014) and, more recently, diffusion models (Ho et al., 2020; Rombach et al., 2022) can produce class-conditioned dermoscopic images in the hundreds of thousands, at a cost that has nothing to do with how rare the underlying condition is. This removes the original scarcity problem and raises a new one: with a pool that large, how do we tell which images actually help a classifier detect skin cancer, and which hurt it? That is the curation problem this paper addresses.

Fréchet Inception Distance (FID) is one of the most commonly used metrics for evaluating generative models (Heusel et al., 2017; Betzalel et al., 2024). It measures distance in the feature space of an Inception-v3 network trained to classify natural photographs, not dermoscopic images (Kynkäänniemi et al., 2023); computed this way it is called FID-Inception, the label used throughout this paper. The standard practice is nonetheless to select the single generation checkpoint with the best FID-Inception score and sample whatever synthetic images are needed from it alone (Wu et al., 2026). This is a rule of thumb, not a measured choice: nothing in a metric built around natural-image classification guarantees that the checkpoint it prefers on dermoscopic data is also the one that produces a better classifier, and a recent study in a comparable medical imaging setting reports a similar mismatch between FID and downstream performance (Wu et al., 2026). We treat this gap between what a metric measures and what a classifier actually needs as an empirical question rather than an assumption, and we answer it directly, with a procedure we call the metric tournament. We first used a diffusion model (EDM2) to generate a 275,472-image synthetic pool spanning ISIC-2018's seven classes. We then selected 16 candidate metrics, which fall into two families: instance-level metrics, which score one image on its own and range from pixel-level measures like peak signal-to-noise ratio (PSNR) to perceptual and semantic ones like learned perceptual image patch similarity (LPIPS), feature similarity index (FSIM), and contrastive language-image pretraining (CLIP) similarity, and distributional metrics such as FID-Inception, Kernel Inception Distance (KID), and Sliced Wasserstein Distance (SWD), which compare a whole set of generated images against real data and cannot judge a single image in isolation. For each metric in turn, we used it alone to select a training subset from the pool that follows the real class proportions, trained Swin-B, a transformer-based image classifier and our primary architecture, on that subset (with ResNet-50 as a secondary check), and measured its per-class F2F_{2} score, which weights recall over precision, against an identically trained classifier given an equally sized, randomly sampled subset instead. We call this the utility of a metric: its actual downstream performance.

The tournament's result is that no single metric serves every class, and the practice of picking a single metric across all classes does not hold up. FID-Inception, for instance, produces the best classifier on one class (VASC) and one no better than random sampling on another (DF); the full per-class breakdown across all 16 metrics is in Section 4.1. Curating with a single metric helps some classes and is associated with lower downstream performance for others, and there is no way to know which without measuring it directly.

This paper's algorithm is built on that measurement. It converts the tournament's per-class measurements into per-class sampling weights. Distributional metrics describe a whole set of images, so the algorithm adds a mechanism that lets them shape individual sampling decisions as well. Finally, a generative model can sometimes reproduce a specific training image rather than a genuinely new one, a privacy risk this paper calls memorization; the algorithm gates the resulting pool with a memorization-safety threshold, calibrated against pairs of real photographs of the same lesion (ISIC lesion identifiers), that removes images whose feature-space similarity to a real training image reaches the threshold. This threshold is a tunable lever, and the confirmatory benchmark below tests it at four calibration-grounded values.

We then validate the algorithm the way it would actually be used, as a real-data augmentation method, across one further axis beyond the utility already measured by the tournament: safety, the memorization risk just described. Evaluation is on a strictly held-out real ISIC-2018 test set that never enters curation, model selection, or the metric tournament just described, with the classifier's initialization and training procedure held fixed across every run. Across the four safety threshold values tested below, it improves macro-averaged F2F_2 over the FID-Inception baseline by +0.0136 to +0.0164, with Welch's t-test and Bonferroni correction, p<0.02p < 0.02 at every one (Section 4.5). Safety depends on the threshold: tightening it raises the algorithm's memorization-safety score above FID-Inception's while Macro- F2F_2 stays flat, but every curated set, the algorithm's included, remains less safe than random sampling. The full breakdown is in Section 4.5.2.

This paper asks two primary and two secondary questions. The primary questions are (1) how well do current metrics work as selection signals for skin-lesion classifiers, and (2) can an algorithm built on these measurements exceed the current standard, FID-based selection, on both utility and safety. The secondary questions are (3) does the feature backbone behind a metric, Inception or DINOv2, matter, and (4) do the gains of the algorithm hold when it curates a larger set.

The contributions of this paper are: (1) an empirical metric tournament that evaluates 16 current metrics as selection signals for skin-lesion classifiers and shows that no single metric serves every class; (2) a safety-aware evaluation algorithm built on the results of the tournament; (3) a confirmatory benchmark on a real, held-out clinical test set, where it outperforms the industry-standard FID-Inception baseline on utility and, at the two tighter thresholds, on safety as well; and (4) a public release of the 275,472-image synthetic pool with per-image scores for 14 metrics and per-configuration scores for the four distributional metrics, together with open-source code. These findings bear on how synthetic images should be selected for rare-lesion classifiers, where a missed diagnosis is costly: the choice of selection metric should be validated per class on held-out real data (Section 6.4).

Following this introduction, Section 2 situates this work against prior synthetic augmentation, generative evaluation, and memorization literature. Section 3 describes the full pipeline: the synthetic pool, the metric tournament, the evaluation algorithm, the safety measure and the benchmark protocol. Section 4 reports the tournament (question 1), the feature backbone of the metrics (question 3), the development evidence for each of the algorithm's design choices, the confirmatory benchmark with its safety analysis and its dose response (questions 2 and 4), and a repetition of the pipeline with ResNet-50 to test how far the findings generalize. Section 5 describes the released dataset. Sections 6 to 8 discuss what the algorithm does and does not establish, its limitations, and its conclusions.

References (57)