Generative Adversarial Network (GAN)

A GAN trains a generator against a discriminator in a minimax game: the generator produces samples and the discriminator tries to tell them from real data.

The original minimax objective is:

Here generates samples and distinguishes real from generated samples.

In practice, the non-saturating generator loss is often used:

The discriminator loss is:

The learned generator defines an implicit distribution because samples are easy but exact likelihood is usually unavailable:

This means evaluation must rely on samples, discriminators, nearest-neighbor checks, or downstream utility rather than exact density:

Training Dynamics

GAN training is a two-player optimization problem, not a single static loss. If becomes too strong, generator gradients can vanish; if finds a small set of outputs that fool , mode collapse can occur.

Stabilization choices include architecture constraints, gradient penalties, spectral normalization, label smoothing, replay buffers, and careful update ratios.

Fidelity-Coverage Boundary

GAN evaluation must separate fidelity from coverage.

AxisQuestionFailure if ignored
fidelityDo samples look or score like real examples?sharp but memorized or invalid samples
coverageDoes the generator cover the data modes?mode collapse
noveltyAre samples distinct from training examples?nearest-neighbor copying
conditional controlDoes the sample satisfy condition ?condition leakage or ignored condition
efficiencyHow many candidate samples are needed per useful sample?hidden rejection or cherry-picking

For conditional GANs:

The condition must be part of the evaluation. A sample that fools an unconditional discriminator may still fail the requested class, scaffold, pose, or property.

Stabilization Patterns

PatternPurposeCaveat
non-saturating lossavoid weak generator gradientsstill sensitive to discriminator balance
gradient penaltyregularize discriminator smoothnesschanges training cost and objective
spectral normalizationbound discriminator Lipschitz behaviorcan limit capacity if too restrictive
minibatch or diversity featuresexpose collapse to discriminatormay not cover rare modes
two-time-scale updatesbalance and learning speedupdate ratio becomes part of the method

Why It Matters

  • Can produce sharp, high-fidelity samples without an explicit likelihood.
  • Influential in image synthesis and conditional generation.
  • Training can be unstable and prone to mode collapse.

Failure Modes

  • Mode collapse: many latent codes map to a narrow output subset.
  • Non-convergence: generator and discriminator keep chasing each other.
  • Metric mismatch: visually sharp samples may not cover the data distribution.
  • Memorization: sample quality can hide nearest-neighbor copying.
  • Hidden filtering: only a subset of generated samples is shown or scored.
  • Conditional failure: samples look realistic but ignore the requested condition.

Checks

  • Is training balanced between generator and discriminator?
  • Are samples diverse, or collapsed onto a few modes?
  • How is sample quality measured without a likelihood?
  • Are nearest-neighbor and diversity checks reported?
  • Does the evaluation distinguish fidelity from coverage?
  • Are attempted samples, rejected samples, and shown samples counted separately?
  • Is the discriminator used only for training, or also as a reported evaluator?
  • For conditional generation, is condition satisfaction measured independently?