Skip to main content
Back

StyleGAN2 Fools Dermatologists 66% of the Time Generating Fake Melanoma

A head-to-head benchmark of four GANs finds StyleGAN2 generates melanoma images realistic enough to fool dermatologists and lift classifier AUC.

Pro

Paper, Full Access
  • First systematic benchmark of DCGAN, StyleGAN2, and StyleGAN3-T/R for 512x512 melanoma image synthesis.
  • StyleGAN2 at gamma=0.8 hits FID of 24.8 on ISIC 2018 and 7.96 on ISIC 2020.
  • A frozen EfficientNet classifier accepts 83% of StyleGAN2 outputs as real melanomas.
  • Two dermatologists distinguish synthetic from real at only 66.5% accuracy (kappa=0.17).
  • Adding synthetic melanomas lifts detection AUC from 0.925 to 0.945 on real test data.
  • StyleGAN3-R posts better FID but produces mesh artifacts in ~60% of samples.

Melanoma detection models suffer from a chronic data problem: the disease is the deadliest form of skin cancer, but in most dermoscopic datasets it makes up a tiny slice of the images. That imbalance biases classifiers toward calling everything benign, which is exactly the failure mode you do not want in a screening tool. A team from the University of Houston, Clemson, Texas Tech, and MD Anderson decided to see how far modern generative adversarial networks can go toward filling that gap, and published the first controlled cross-architecture benchmark of GANs for high-resolution melanoma synthesis.

Four generators, one lesion type

The study pits four architectures against each other under identical preprocessing and training budgets: DCGAN, StyleGAN2, and two StyleGAN3 variants (T and R) for high-resolution (512 x 512) melanoma-specific synthesis. StyleGAN3-T emphasizes translation equivariance and realistic textures, while StyleGAN3-R adds rotation equivariance to reduce positional bias. Training data came from two ISIC archive benchmarks: ISIC 2018 with 10,015 images including 1,113 melanomas, and ISIC 2020 with 33,126 images including 7,227 melanomas.

A key knob the authors turned was R1 regularization strength (gamma), which controls how aggressively the discriminator's gradients are penalized to keep training stable. They swept gamma across {0.8, 1.6, 8.0, 10.0} for the StyleGAN family. Rather than trusting a single number, they built a multi-layered evaluation stack: Frechet Inception Distance (FID) for distribution-level similarity, Frechet Medoid Distance (FMD) for how close individual samples land to typical real images, a frozen EfficientNet-B6 classifier used as an external judge, and two board-certified dermatologists doing blind real-versus-fake calls.

StyleGAN2 wins on the metrics that matter

The headline result: StyleGAN2 achieves the best balance of quantitative performance and perceptual quality, attaining FID scores of 24.8 on ISIC 2018 and 7.96 on ISIC 2020 at gamma=0.8. The frozen classifier recognizes 83% of StyleGAN2-generated images as melanoma. That is a meaningful check because a strong classifier trained only on real dermoscopy still sees the synthetic samples as clinically melanoma-like.

The comparison is not as straightforward as picking the lowest FID, though. StyleGAN3-R actually posted a slightly better FID (26.47) than StyleGAN2 (31.58) at gamma=8, but qualitative inspection revealed prominent mesh- or grid-like artifacts in roughly 60% of its samples. These are the kind of high-frequency patterns that feature-space metrics do not catch but which instantly disqualify an image for clinical use.

Comparison of real melanoma, StyleGAN2 output, and StyleGAN3-R output showing mesh artifacts

StyleGAN3-T told the opposite story: it achieved the worst FID (246.42) but the lowest FMD (41.37), a pattern consistent with partial mode collapse where individual samples look real but the model fails to cover the full diversity of melanoma appearances. DCGAN, the oldest architecture in the lineup, was outclassed on every metric.

Fooling the dermatologists

Feature-space scores are one thing; convincing an actual dermatologist is another. The team constructed a balanced 200-image set (100 real, 100 StyleGAN2-generated) and had two board-certified dermatologists from separate academic medical centers label each image blind.

  • Mean human accuracy: 66.5%, only modestly above the 50% chance level
  • Inter-rater agreement (Cohen's kappa): 0.17, indicating raters used different visual criteria
  • Dermatologist 1 leaned toward calling images synthetic (91% accuracy on fakes, 51% on real)
  • Dermatologist 2 leaned the other way (70% on real, 54% on fakes)

The split behavior matters: it means there is no single tell-tale artifact that gives StyleGAN2 samples away. Even the trained StyleGAN2 discriminator only hit 59.5% accuracy on the same task.

Does synthetic data actually help downstream?

Perceptual realism is only useful if it translates into better classifiers. The team ran a controlled augmentation experiment using an EfficientNet-B0 melanoma detector at 512x512 resolution, with a held-out real-image test set (1,960 benign, 40 melanoma) that was completely quarantined from GAN training.

Representative synthetic melanoma images from DCGAN, StyleGAN3-T, StyleGAN3-R, and StyleGAN2 compared to real melanomas

Adding 6,500 StyleGAN2-generated melanomas shifted the benign-to-melanoma ratio from roughly 98:2 to 65:35. The augmented model reached 98.27% accuracy and a melanoma AUC of 0.9445, versus 85.07% accuracy and 0.9252 AUC for the real-only baseline. The F1 score for melanoma detection climbed from 0.17 to 0.26. AUC is the more honest metric here because raw accuracy on a 98% benign test set is dominated by the majority class.

Practical takeaways

A few things worth noting before dropping synthetic melanomas into your training pipeline:

  • Lower gamma is better for dermoscopy. The homogeneous visual domain benefits from lighter discriminator regularization than natural-image defaults suggest.
  • FID alone is misleading. StyleGAN3-R would have won on FID but produced clinically unusable outputs. Always inspect samples.
  • Compute cost is real. StyleGAN2 needed 2.8 hours to hit its best FID, while both StyleGAN3 variants required 9.2 hours each on the same 4x V100 setup.
  • Code and models are not released. The paper describes the recipe in detail but does not point to a public repository. The ISIC datasets and the EfficientNet ensemble used as external judge are both publicly available, so replication is feasible.

The authors flag latent diffusion models and conditional generation (by skin type, melanoma subtype, or anatomical site) as the next frontier. For now, StyleGAN2 at gamma=0.8 looks like the pragmatic default for anyone trying to plug the melanoma-shaped hole in their training data.