detect·deepfakesby Resemble AI
Glossary

GAN

Also: Generative Adversarial Network · GANs

A neural-network architecture introduced in 2014 where a generator creates synthetic data (images, audio, etc.) while a discriminator tries to distinguish it from real data. The two train in opposition until the generator's output is indistinguishable from the real.

Generative Adversarial Networks, introduced by Ian Goodfellow and collaborators in 2014, were the architecture that made high-fidelity synthetic media broadly possible. For most of the late 2010s, GANs powered the earliest convincing face swaps and generated-face sites like thispersondoesnotexist.com.

How a GAN works

Two networks play a game:

  • The generator takes random noise and produces synthetic output (e.g., a face).
  • The discriminator takes an input and outputs a probability that it's real (drawn from the training dataset) vs. fake (from the generator).

During training, the generator tries to fool the discriminator; the discriminator tries not to be fooled. Each network's loss is the other's mirror image — hence adversarial. Given enough data and compute, the generator learns to produce outputs the discriminator can't reliably distinguish from real examples.

Why GANs mattered for deepfakes

Before GANs, generating a photorealistic face required either 3D modeling or direct latent-space manipulation of an autoencoder, both of which left obvious artifacts. GANs produced faces with plausible pore-level detail, lighting, and geometry, directly from noise.

The first widely-shared deepfake videos, in late 2017, used a GAN-based face-swap pipeline called DeepFaceLab. The underlying generator was a GAN variant trained on hundreds to thousands of photos of the target identity.

GANs vs. diffusion

In the early 2020s, diffusion models overtook GANs for most image-generation tasks. Diffusion is more stable to train, produces higher quality on most benchmarks, and handles text-to-image conditioning better. GANs still dominate for real-time applications (generation latency is lower) and for face-swap pipelines where a dedicated identity-conditioned network is needed.

Detection implications

GAN-generated images have a characteristic set of artifacts — mid-frequency periodic hash, color-channel correlations different from natural images, and checkerboard patterns from transposed convolutions. Detectors trained to flag GAN outputs rarely work well on diffusion outputs (and vice versa), which is why modern detection models train across both families. The Resemble AI image detector fuses signals across GAN, diffusion, and autoencoder-based outputs.

See also