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

Amindu Kumarasinghe, Vinh Bui, Reza GhanbarzadeharXiv 2026

This paper tackles a critical bottleneck in medical AI: the scarcity of high-quality, annotated data for rare diseases. While synthetic data generated by diffusion models offers a potential solution, not all synthetic images are created equal. The authors propose a "metric tournament" to find out which evaluation metrics actually predict better classifier performance and introduce a safety-aware algorithm to curate synthetic datasets that are both effective and privacy-conscious.

TL;DR

The authors demonstrate that the industry-standard metric for synthetic images (FID) is not a universal predictor of classifier performance across different skin lesion types. They introduce a safety-aware curation algorithm that weights multiple metrics per class and filters out "memorized" images, outperforming standard FID-based selection by a significant margin on the ISIC-2018 benchmark.

What Problem Does This Paper Address?

Training deep learning models for skin cancer detection requires massive datasets. For rare lesions, these datasets simply don't exist. Generative AI can fill the gap, but it introduces two major hurdles:

  1. The Curation Problem: Generative models produce a mix of high-quality and "hallucinated" images. Traditionally, researchers use Fréchet Inception Distance (FID) to pick the best images, but FID was designed for natural images (like cats and dogs), not medical dermoscopy.
  2. The Memorization Problem: Generative models sometimes act like high-tech photocopiers, reproducing actual patient images from their training set. This is a massive privacy risk under regulations like GDPR and HIPAA.

The authors ask: Does a metric that scores a generator well actually lead to a better classifier? And can we select helpful images without compromising patient privacy?

Methods

The researchers conducted a Metric Tournament involving 16 different quality metrics (ranging from pixel-level measures like PSNR to semantic ones like CLIP similarity). They generated a massive pool of 275,472 synthetic images using a diffusion model (EDM2) and trained 193 different classifiers to see which metrics selected the most "useful" training subsets.

Based on the tournament results, they developed a Safety-Aware Curation Algorithm:

  • Per-Class Weighting: Instead of one global metric, the algorithm weights metrics differently for each lesion type based on their measured utility.
  • Safety Filter: It uses DINOv2 feature similarity to identify and remove synthetic images that are too close to real training photographs. This filter was calibrated using real-world "same-lesion" pairs to define what a "copy" looks like.
  • Temperature-Scaled Sampling: A probabilistic draw that favors high-scoring images while maintaining necessary diversity.
Figure 1: The metric pipeline. Real and synthetic images are standardized to 512 × 512 pixels, and DINOv2 and InceptionV3 features are extracted once and cached. An exact FAISS search in DINOv2 space writes the nearest real image of every synthetic image to a neighbor map. The registry runs four metric groups over the cached features and the map. The four per-configuration distributional scores are written to the checkpoint results file, and all per-image scores to the metadata file. Details of every metric are in Appendix G.

Datasets

  • Real Data: The ISIC-2018 (HAM10000) dataset, consisting of 10,015 dermoscopic images across seven diagnostic classes.
  • Synthetic Pool: A newly released pool of 275,472 images generated across 16 different configurations (varying training checkpoints and guidance scales). The authors have made this pool and its associated metric scores public.
Table 1: Composition of the synthetic pool: images per generation configuration (training checkpoint in kimg by CFG scale) and class.

Key Insights and Ideas

  • No "One Metric to Rule Them All": The most surprising finding was that the "best" metric depends entirely on the lesion type. FID-Inception was the winner for Vascular lesions but offered no advantage over random sampling for Dermatofibroma.
  • The FID Trap: The generation settings that FID prefers are often the ones closest to the training data, meaning the "highest quality" images by standard metrics are often the ones with the highest privacy risk.
  • Safety is "Free": The authors found they could significantly tighten the privacy threshold (removing more potential copies) without any measurable drop in classification performance. This suggests that "memorized" images aren't actually the ones providing the most educational value to the classifier.
  • Architecture Matters: The curation weights that worked for a transformer-based model (Swin-B) didn't necessarily work for a convolutional model (ResNet-50), suggesting curation is a model-specific task.

Key Results

  • Utility Gain: On the held-out ISIC-2018 test set, the algorithm improved Macro-$F_2$ (a metric that penalizes missed diagnoses more heavily) by +0.0136 to +0.0164 over the FID-Inception baseline for the Swin-B classifier.
  • Superiority to Randomness: The algorithm outperformed random sampling by approximately +0.03, roughly doubling the gain achieved by standard single-metric curation.
  • Privacy Protection: The safety filter successfully removed thousands of images at the tightest thresholds, providing a documented way to mitigate memorization risks while maintaining model performance.

Limitations and Future Work

  • Generalization: The study focused on one dataset (ISIC-2018) and one generator family (EDM2). It remains to be seen if these specific metric weights hold up in other medical domains like X-rays or MRI.
  • The ResNet Mystery: The algorithm showed no benefit for the ResNet-50 architecture. The authors suggest this might be because the synthetic pool simply didn't contain the specific features ResNet needed to improve, regardless of curation.
  • Clinical Validation: While the AI performance improved, no human clinicians were involved in assessing the "realism" of the curated images. Future work could bridge the gap between AI utility and human expert judgment.

Summary updated

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-$F_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.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.
BibTeX
@misc{kumarasinghe2026evaluating,
  author = {Amindu Kumarasinghe and Vinh Bui and Reza Ghanbarzadeh},
  title = {{Evaluating Synthetic Skin Lesion Images for Classifier Training: A Safety-Aware Algorithm}},
  year = {2026},
  eprint = {2611.02437},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.02437},
}
Figure