Evaluating Synthetic Skin Lesion Images for Classifier Training: A Safety-Aware Algorithm
Organizations: Southern Cross University · Faculty of Science and Engineering, Southern Cross University, Gold Coast, QLD, Australia
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-, 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 ) 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.
Figures & tables
| Checkpoint | CFG | AKIEC | BCC | BKL | DF | MEL | NV | VASC | Total |
|---|---|---|---|---|---|---|---|---|---|
| 3k | 1.0 | 1,786 | 1,786 | 1,786 | 1,786 | 1,786 | 6,501 | 1,786 | 17,217 |
| 1.5 | 1,786 | 1,786 | 1,786 | 1,786 | 1,786 | 6,501 | 1,786 | 17,217 | |
| 2.0 | 1,786 | 1,786 | 1,786 | 1,786 | 1,786 | 6,501 | 1,786 | 17,217 | |
| 3.0 | 1,786 | 1,786 | 1,786 | 1,786 | 1,786 | 6,501 | 1,786 | 17,217 | |
| 8k | 1.0 | 1,786 | 1,786 | 1,786 | 1,786 | 1,786 | 6,501 | 1,786 | 17,217 |
| 1.5 | 1,786 | 1,786 | 1,786 | 1,786 | 1,786 | 6,501 | 1,786 | 17,217 |
| Family | Metric | What it scores | Selects |
| Distributional | FID-Inception ( Heusel et al., 2017 ) | Synthetic vs. real, Inception features | lowest |
| FID-DINOv2 | Synthetic vs. real, DINOv2 features | lowest | |
| KID-DINOv2 ( Bińkowski et al., 2018 ) | Synthetic vs. real, polynomial-kernel MMD | lowest | |
| SWD-DINOv2 ( Bonneel et al., 2015 ) | Synthetic vs. real, sliced Wasserstein | lowest | |
| Instance, full-reference | PSNR | Pixel error to nearest real image | highest |
| SSIM ( Zhou et al., 2004 ) | Structural similarity to nearest real image | highest |
| Arm | ||
|---|---|---|
| FID-Inception | +0.036 | |
| SWD-DINOv2 | +0.011 | 0.011 |
| FID-DINOv2 | +0.010 | 0.024 |
| KID-DINOv2 | +0.010 | 0.024 |
| Class | FID-Inception | Random | ||
|---|---|---|---|---|
| AKIEC | 0.375 | 0.343 | +0.032 | 0.021 |
| BCC | 0.583 | 0.528 | +0.055 | |
| BKL | 0.502 | 0.492 | +0.009 | 0.319 |
| DF | 0.137 | 0.156 | 0.019 | 0.080 |
| MEL | 0.373 | 0.326 | +0.048 | |
| NV | 0.927 | 0.930 | 0.003 | 0.013 |
| Arm | Features | Selected configuration | Swin-B | ResNet-50 |
|---|---|---|---|---|
| FID-Inception | InceptionV3 | 25k kimg, guidance 1.0 | ||
| FID-DINOv2 | DINOv2 | 25k kimg, guidance 1.5 | ||
| Random control | — | — |
| Macro- | |
|---|---|
| 0.1 | |
| 0.05 | |
| 0.02 |
| Cohort | Synthetic | Runs | Macro- | FSMS |
| Real data only | — | 1 | 0.5154 | — |
| Random | 30 | 0.5557 0.0222 | 0.1639 0.0009 | |
| Best-metric (FID-Inception) | 30 | 0.5702 0.0202 | 0.1157 0.0003 | |
| Algorithm, | 30 | 0.5858 0.0158 | 0.1443 0.0004 | |
| Algorithm, | 30 | 0.5866 0.0183 | 0.1232 0.0004 | |
| Algorithm, | 30 | 0.5838 0.0140 | 0.1152 0.0004 |
| Outcome | 95% CI | Adj. | |||||
|---|---|---|---|---|---|---|---|
| Macro- | 0.90 | +0.0156 | [+0.0062, +0.0250] | 3.33 | 0.0016 | 0.0062 | 0.86 |
| 0.93 | +0.0164 | [+0.0065, +0.0264] | 3.30 | 0.0016 | 0.0066 | 0.85 | |
| 0.97 | +0.0136 | [+0.0046, +0.0226] | 3.02 | 0.0039 | 0.0155 | 0.78 | |
| 0.99 | +0.0140 | [+0.0052, +0.0228] | 3.21 | 0.0024 | 0.0095 | 0.83 | |
| FSMS | 0.90 | +0.0287 | [+0.0285, +0.0289] | 317.08 | 81.87 | ||
| 0.93 | +0.0075 | [+0.0073, +0.0077] | 84.15 | 21.73 |
| Set | FSMS | Mean cosine | (%) | (%) | Max |
|---|---|---|---|---|---|
| Training images against themselves | 0 | 1.0000 | — | — | — |
| Training images against the other training images | 0.0953 | 0.9047 | 9.96 | — | 1.000 |
| Held-out test images against the training images | 0.1147 | 0.8853 | 3.51 | 0.00 | 0.968 |
| Checkpoint | CFG 1.0 | CFG 1.5 | CFG 2.0 | CFG 3.0 |
|---|---|---|---|---|
| 3k | 0.2097 | 0.2065 | 0.2063 | 0.2180 |
| 8k | 0.1549 | 0.1651 | 0.1766 | 0.2058 |
| 15k | 0.1291 | 0.1357 | 0.1544 | 0.2070 |
| 25k | 0.1225 | 0.1304 | 0.1609 | 0.2314 |
| Exact copies | Noisy copies | |||
|---|---|---|---|---|
| Contamination | FSMS drop | AUROC | FSMS drop | AUROC |
| 1% (80) | 0.0013 | 1.000 | 0.0009 | 0.996 |
| 5% (401) | 0.0066 | 1.000 | 0.0045 | 0.996 |
| 10% (801) | 0.0132 | 1.000 | 0.0090 | 0.996 |
| 25% (2003) | 0.0330 | 1.000 | 0.0228 | 0.996 |
| Similarity bracket | Images | Mean cosine | SSIM | PSNR (dB) | LPIPS |
|---|---|---|---|---|---|
| Least similar 50% | 137,736 | 0.768 | 0.505 | 15.2 | 0.458 |
| 50th to 90th percentile | 110,188 | 0.870 | 0.587 | 17.3 | 0.381 |
| 90th to 99th percentile | 24,793 | 0.921 | 0.618 | 18.3 | 0.325 |
| 99th to 99.9th percentile | 2,479 | 0.946 | 0.629 | 19.6 | 0.283 |
| Most similar 0.1% | 276 | 0.960 | 0.628 | 22.0 | 0.240 |
| Correlation with the cosine ( ) | 0.42 | 0.40 | 0.54 |
| Field | Description |
|---|---|
| filename , archive | Path of the image inside its zip archive, for example ckpt_25k_cfg_1.0/class_6/012418.png , and the name of that archive ( ckpt_25k_cfg_1.0.zip ). The filename is unique across the release |
| seed | Sampling seed of the image, which is also the number in the file name. Seeds repeat across classes and configurations |
| source_checkpoint_kimg , cfg_scale | Generation configuration |
| target_class_label | Class the image was conditioned on |
| psnr_score , ssim_score , fsim_score , lpips_score | Full-reference scores against the nearest real training image in DINOv2 space |
| brisqe_score | No-reference natural-scene-statistics score |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Cohort | Macro- | Macro- | ROC-AUC | Recall | Precision | Accuracy | |
|---|---|---|---|---|---|---|---|
| Real data only | — | 0.515 | 0.562 | 0.937 | 0.493 | 0.716 | 0.751 |
| Random | 0.556 0.022 | 0.592 0.020 | 0.935 0.002 | 0.537 0.023 | 0.697 0.027 | 0.761 0.007 | |
| Best-metric (FID-Inception) | 0.570 0.020 | 0.604 0.017 | 0.938 0.002 | 0.552 0.022 | 0.698 0.020 | 0.767 0.005 | |
| Algorithm, | 0.586 0.016 | 0.619 0.014 | 0.939 0.001 | 0.568 0.017 | 0.708 0.023 | 0.773 0.005 | |
| Algorithm, | 0.587 0.018 | 0.620 0.018 | 0.939 0.002 | 0.569 0.019 | 0.709 0.024 | 0.773 0.008 | |
| Algorithm, | 0.584 0.014 | 0.616 0.012 | 0.939 0.002 | 0.567 0.015 | 0.701 0.020 | 0.771 0.004 |
| Cohort | Macro- | Macro- | ROC-AUC | Recall | Precision | Accuracy | |
|---|---|---|---|---|---|---|---|
| Real data only | — | 0.558 | 0.583 | 0.931 | 0.550 | 0.714 | 0.763 |
| Random | 0.547 0.020 | 0.578 0.019 | 0.933 0.003 | 0.533 0.021 | 0.693 0.027 | 0.764 0.004 | |
| Best-metric (FID-Inception) | 0.558 0.025 | 0.587 0.023 | 0.936 0.003 | 0.544 0.025 | 0.687 0.023 | 0.767 0.006 | |
| Algorithm, | 0.552 0.022 | 0.583 0.021 | 0.935 0.002 | 0.538 0.022 | 0.696 0.021 | 0.766 0.007 | |
| Random | 0.556 0.024 | 0.578 0.022 | 0.930 0.002 | 0.548 0.026 | 0.665 0.028 | 0.761 0.006 | |
| Algorithm, | 0.554 0.021 | 0.582 0.018 | 0.932 0.003 | 0.541 0.023 | 0.682 0.028 | 0.761 0.007 |
| Metric | Family | Runs | Macro- | |
| FID-Inception | Distributional | 30 | 0.511 0.015 | +0.036 |
| SWD-DINOv2 | Distributional | 30 | 0.485 0.017 | +0.011 |
| FID-DINOv2 | Distributional | 30 | 0.485 0.018 | +0.010 |
| KID-DINOv2 | Distributional | 30 | 0.485 0.018 | +0.010 |
| FS-CS | Instance | 1 | 0.500 | +0.025 |
| Realism | Instance | 1 | 0.454 | 0.020 |
| Metric | Family | Runs | Macro- | |
| FID-Inception | Distributional | 30 | 0.500 0.018 | +0.041 |
| SWD-DINOv2 | Distributional | 30 | 0.495 0.026 | +0.035 |
| FID-DINOv2 | Distributional | 30 | 0.492 0.027 | +0.033 |
| KID-DINOv2 | Distributional | 30 | 0.492 0.027 | +0.033 |
| Realism | Instance | 1 | 0.485 | +0.025 |
| CLIP log-odds | Instance | 1 | 0.470 | +0.010 |
| AKIEC | BCC | BKL | DF | MEL | NV | VASC | Macro | |
| Validation images | 65 | 103 | 220 | 23 | 223 | 1,341 | 28 | 2,003 |
| FID-Inception | 0.375 | 0.583 | 0.502 | 0.137 | 0.373 | 0.927 | 0.680 | 0.511 |
| SWD-DINOv2 | 0.329 | 0.572 | 0.510 | 0.168 | 0.348 | 0.935 | 0.537 | 0.485 |
| FID-DINOv2 | 0.367 | 0.547 | 0.494 | 0.143 | 0.338 | 0.936 | 0.568 | 0.485 |
| KID-DINOv2 | 0.367 | 0.547 | 0.494 | 0.143 | 0.338 | 0.936 | 0.568 | 0.485 |
| FS-CS | 0.515 | 0.569 | 0.494 | 0.225 | 0.395 | 0.860 | 0.441 | 0.500 |
| AKIEC | BCC | BKL | DF | MEL | NV | VASC | Macro | |
| Validation images | 65 | 103 | 220 | 23 | 223 | 1,341 | 28 | 2,003 |
| FID-Inception | 0.513 | 0.573 | 0.446 | 0.059 | 0.369 | 0.922 | 0.620 | 0.500 |
| SWD-DINOv2 | 0.502 | 0.554 | 0.497 | 0.111 | 0.346 | 0.922 | 0.531 | 0.495 |
| FID-DINOv2 | 0.525 | 0.543 | 0.520 | 0.123 | 0.301 | 0.925 | 0.509 | 0.492 |
| KID-DINOv2 | 0.525 | 0.543 | 0.520 | 0.123 | 0.301 | 0.925 | 0.509 | 0.492 |
| Realism | 0.574 | 0.455 | 0.482 | 0.051 | 0.351 | 0.856 | 0.625 | 0.485 |
| Checkpoint | CFG | FID-Inception | FID-DINOv2 | KID-DINOv2 | SWD-DINOv2 |
|---|---|---|---|---|---|
| 3k | 1.0 | 120.1 | 1325.7 | 23.19 | 0.926 |
| 1.5 | 114.0 | 1217.4 | 20.75 | 0.822 | |
| 2.0 | 111.2 | 1138.2 | 18.41 | 0.801 | |
| 3.0 | 116.5 | 1064.3 | 16.07 | 0.773 | |
| 8k | 1.0 | 65.1 | 652.0 | 11.20 | 0.562 |
| 1.5 | 57.8 | 569.3 | 9.25 | 0.532 |
| Cosine band | Pairs | Same lesion | Precision (in band) | Pairs (cumulative) | Precision (cumulative) | Recall (cumulative) |
|---|---|---|---|---|---|---|
| 0.900–0.920 | 91,548 | 237 | 0.3% | 117,751 | 0.7% | 100.0% |
| 0.920–0.930 | 16,709 | 112 | 0.7% | 26,203 | 2.1% | 69.5% |
| 0.930–0.940 | 6,835 | 105 | 1.5% | 9,494 | 4.5% | 55.0% |
| 0.940–0.950 | 2,020 | 93 | 4.6% | 2,659 | 12.1% | 41.5% |
| 0.950–0.965 | 524 | 121 | 23.1% | 639 | 35.8% | 29.5% |
| 0.965–0.970 | 35 | 31 | 88.6% | 115 | 93.9% | 13.9% |
| Metric | AKIEC | BCC | BKL | DF | MEL | NV | VASC |
|---|---|---|---|---|---|---|---|
| FID-Inc. | 12.4 | 13.1 | 8.0 | 0 | 13.4 | 0 | 35.0 |
| KID-DINO | 9.2 | 4.5 | 1.4 | 0 | 3.3 | 12.7 | 5.4 |
| SWD-DINO | 0 | 10.4 | 15.0 | 33.0 | 6.3 | 11.8 | 0 |
| CLIP log-odds | 6.6 | 6.7 | 5.8 | 7.7 | 5.2 | 7.3 | 10.9 |
| FS-CS | 11.2 | 9.4 | 7.9 | 16.6 | 9.2 | 3.4 | 8.6 |
| CLIP cancer | 8.7 | 8.9 | 5.2 | 0 | 1.2 | 7.8 | 4.8 |
| Comparison | 95% CI | Welch | Adj. | MWU | ||
| Algorithm ( ) vs. Best-metric | +0.0156 | [+0.0062, +0.0250] | 0.86 | 0.0016 | 0.0062 | 0.0020 |
| Algorithm ( ) vs. Best-metric | +0.0164 | [+0.0065, +0.0264] | 0.85 | 0.0016 | 0.0066 | 0.0023 |
| Algorithm ( ) vs. Best-metric | +0.0136 | [+0.0046, +0.0226] | 0.78 | 0.0039 | 0.0155 | 0.0044 |
| Algorithm ( ) vs. Best-metric | +0.0140 | [+0.0052, +0.0228] | 0.83 | 0.0024 | 0.0095 | 0.0011 |
| Algorithm ( ) vs. Random, | +0.0301 | [+0.0202, +0.0401] | 1.57 | — | ||
| Algorithm ( ) vs. Random, | +0.0310 | [+0.0205, +0.0415] | 1.52 | — |
| Class | ||||||||
|---|---|---|---|---|---|---|---|---|
| Algorithm vs. Best-metric (FID-Inception) | ||||||||
| AKIEC | +0.061 | +0.045 | 0.0074 | +0.043 | 0.0066 | +0.040 | 0.0128 | |
| BCC | +0.056 | +0.062 | +0.066 | +0.047 | 0.0042 | |||
| BKL | +0.009 | 0.2837 | +0.004 | 0.6813 | 0.001 | 0.9401 | +0.001 | 0.9190 |
| DF | +0.026 | 0.0253 | +0.020 | 0.0750 | +0.031 | 0.0054 | +0.038 | |
| Cohort | AKIEC | BCC | BKL | DF | MEL | NV | VASC | Macro |
| Real data only | 0.421 | 0.469 | 0.530 | 0.452 | 0.457 | 0.914 | 0.364 | 0.515 |
| Random ( ) | 0.458 | 0.520 | 0.577 | 0.457 | 0.481 | 0.909 | 0.487 | 0.556 |
| Best-metric (FID-Inception) ( ) | 0.427 | 0.515 | 0.585 | 0.476 | 0.522 | 0.910 | 0.555 | 0.570 |
| Algorithm, ( ) | 0.488 | 0.572 | 0.594 | 0.502 | 0.495 | 0.913 | 0.536 | 0.586 |
| Algorithm, ( ) | 0.472 | 0.577 | 0.589 | 0.496 | 0.516 | 0.912 | 0.545 | 0.587 |
| Algorithm, ( ) | 0.470 | 0.581 | 0.584 | 0.507 | 0.509 | 0.911 | 0.524 | 0.584 |
| Cohort | Max (mean) | Max (worst seed) | p99.9 | ||
|---|---|---|---|---|---|
| Random | 0.9674 | 0.9807 | 0.9566 | 34.2 (0.43%) | 0.3 (0.004%) |
| Best-metric (FID-Inception) | 0.9790 | 0.9807 | 0.9638 | 149.1 (1.86%) | 2.5 (0.032%) |
| Algorithm ( ) | 0.9000 | 0.9000 | 0.8999 | 0.0 (0.00%) | 0.0 (0.000%) |
| Algorithm ( ) | 0.9300 | 0.9300 | 0.9299 | 0.0 (0.00%) | 0.0 (0.000%) |
| Algorithm ( ) | 0.9686 | 0.9698 | 0.9627 | 141.7 (1.77%) | 0.0 (0.000%) |
| Algorithm ( ) | 0.9735 | 0.9807 | 0.9631 | 141.0 (1.76%) | 1.4 (0.017%) |
| Arm | ||
|---|---|---|
| FID-Inception | +0.041 | |
| SWD-DINOv2 | +0.035 | |
| FID-DINOv2 | +0.033 | |
| KID-DINOv2 | +0.033 |
| Class | Swin-B leader | ResNet-50 leader | Rank correlation |
|---|---|---|---|
| AKIEC | FSIM (0.596) | FSIM (0.599) | 0.69 |
| BCC | Realism (0.597) | FID-Inception (0.573) | 0.73 |
| BKL | Realism (0.561) | IS contribution (0.533) | 0.37 |
| DF | FS-CS (0.225) | CLIP log-odds (0.300) | 0.50 |
| MEL | Realism (0.445) | PSNR (0.397) | 0.51 |
| NV | FID-DINOv2/KID-DINOv2 (0.936) | Diversity (0.929) | 0.69 |
| Swin-B | ResNet-50 | |||
|---|---|---|---|---|
| Class | Dist. share | Top metric | Dist. share | Top metric |
| AKIEC | 22% | FSIM (13%) | 26% | KID-DINOv2 (26%) |
| BCC | 28% | FID-Inception (13%) | 31% | FID-Inception (12%) |
| BKL | 24% | SWD-DINOv2 (15%) | 28% | KID-DINOv2 (18%) |
| DF | 33% | SWD-DINOv2 (33%) | 21% | CLIP log-odds (22%) |
| MEL | 23% | FID-Inception (13%) | 31% | FID-Inception (19%) |
| Macro- | vs. | ||
|---|---|---|---|
| 0.02 | 0.0278 | ||
| 0.05 | — | — | |
| 0.1 | 0.0141 | 0.0249 | |
| 0.3 | 0.0396 | ||
| 0.5 | 0.0448 | ||
| 1.0 | 0.0391 |
| Cohort | Synthetic | Runs | Macro- | FSMS |
|---|---|---|---|---|
| Real data only | — | 1 | 0.5578 | — |
| Random | 30 | 0.5466 0.0203 | 0.1639 0.0009 | |
| Best-metric (FID-Inception) | 30 | 0.5577 0.0250 | 0.1157 0.0003 | |
| Algorithm, | 30 | 0.5520 0.0222 | 0.1165 0.0004 | |
| Random | 30 | 0.5560 0.0241 | 0.1638 0.0006 | |
| Algorithm, | 30 | 0.5536 0.0214 | 0.1183 0.0003 |
| Comparison | 95% CI | Welch | ||
|---|---|---|---|---|
| Algorithm vs. Best-metric, | 0.0058 | [ 0.0180, +0.0064] | 0.24 | 0.3481 |
| Algorithm vs. Random, | +0.0054 | [ 0.0056, +0.0164] | 0.25 | 0.3306 |
| Best-metric vs. Random, | +0.0112 | [ 0.0006, +0.0229] | 0.49 | 0.0631 |
| Algorithm vs. Random, | 0.0024 | [ 0.0141, +0.0094] | 0.10 | 0.6871 |
| Algorithm, vs. | +0.0017 | [ 0.0096, +0.0129] | 0.08 | 0.7647 |
| Cohort | AKIEC | BCC | BKL | DF | MEL | NV | VASC | Macro |
|---|---|---|---|---|---|---|---|---|
| Real data only | 0.518 | 0.663 | 0.646 | 0.368 | 0.388 | 0.903 | 0.419 | 0.558 |
| Random ( ) | 0.490 | 0.550 | 0.619 | 0.480 | 0.410 | 0.916 | 0.362 | 0.547 |
| Best-metric (FID-Inception) ( ) | 0.472 | 0.561 | 0.636 | 0.486 | 0.426 | 0.913 | 0.410 | 0.558 |
| Algorithm, ( ) | 0.484 | 0.580 | 0.615 | 0.481 | 0.417 | 0.916 | 0.371 | 0.552 |
| Random ( ) | 0.567 | 0.508 | 0.600 | 0.509 | 0.412 | 0.914 | 0.384 | 0.556 |
| Algorithm, ( ) | 0.547 | 0.556 | 0.602 | 0.482 | 0.398 | 0.913 | 0.378 | 0.554 |
Synthetic Data Evaluation
Synthetic data evaluation measures whether generated examples preserve the properties needed for a stated use, including fidelity, privacy, and utility.
See all 242 papers