Generative Adversarial Networks Needs review

Generative Adversarial Network

GAN

Year of appearance
2014
Researchers
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio
Organisation
Université de Montréal
Architecture type
Adversarial generator–discriminator pair
Learning mechanism
unsupervised
Tasks
Image generation, Distribution learning

A generative framework in which two networks compete: a generator that turns noise into samples, and a discriminator that tries to tell real samples from generated ones.

Architecture diagram

Displayed configuration: GAN with MLP networks on MNIST (illustrative configuration) — Generator: 559,632 parameters, discriminator: 533,505 parameters.

Layer table (10 nodes)
LayerTypeInputOutputRepetitionParametersFormulaMACs
Noise z ∼ N(0, I)noise10010—
G: FC 256 + LeakyReLUfc100256125,856100·256 + 25625,600
G: FC 512 + LeakyReLUfc2565121131,584256·512 + 512131,072
G: FC 784 + tanhfc5127841402,192512·784 + 784401,408
Generated 28×28 imagegenerator7841 × 28 × 2810—
D: FC 512 + LeakyReLUfc7845121401,920784·512 + 512401,408
D: FC 256 + LeakyReLUfc5122561131,328512·256 + 256131,072
D: FC 1 + sigmoiddiscriminator25611257256 + 1256
Real data xinput10—
Adversarial losslossD(x), D(G(z))L_D, L_G10—

Configuration figures: GAN with MLP networks on MNIST (illustrative configuration)

Parameters (computed from the layers)1,093,137 (≈1.09M)
Parameters (published in the source)Unspecified
MACs1,090,816 (≈1.09M)
FLOPs ≈ 2 × MACs2,181,632 (≈2.18M)
Input shape
z ∈ ℝ¹⁰⁰
Output shape
28×28 image
Depth
3 layers per network
Complexity
A pass through G then D for each generated sample.
MACs note
For one sample: G = 100·256 + 256·512 + 512·784 = 558,080, and D = 532,736.
Calculation assumptions: Illustrative sizes; the original paper did not state the MLP dimensions in the text (the code used a mix of ReLU and sigmoid for the generator and maxout for the discriminator).

MAC = a multiplication followed by an addition. The figures are for one forward pass of one sample with the stated dimensions; they are an analytical calculation, not a measurement of run time.

Scientific explanation

Historical background

Published at NeurIPS 2014; it became one of the most influential ideas in deep learning, and hundreds of variants such as DCGAN and StyleGAN branched from it.

The problem it addresses

Learning a complex data distribution (such as images) and sampling from it without computing explicit likelihoods or Markov chains.

Core idea

A two-player minimax game: at equilibrium the generator distribution matches the data distribution and the discriminator becomes unable to tell them apart (D = ½).

Architecture description

A generator G(z) and a discriminator D(x), both differentiable (MLPs in the original paper), trained alternately.

Data flow

z → G → x̃; then (x or x̃) → D → probability of “real”. The gradient of D passes to G through x̃.

Inputs

Random noise z (for the generator) and real images (for the discriminator).

Outputs

New samples that resemble the data.

Training procedure

Alternating k discriminator steps (k = 1 in the experiments) and one generator step with stochastic gradient descent with momentum.

Loss functions

Minimax (binary cross-entropy for the discriminator), and the non-saturating form for the generator in practice.

Computational complexity

A pass through G and D at each step.

Computational requirements

Low for the MLP version.

Advantages

  • Sharp high-quality samples
  • Needs no explicit likelihood
  • A flexible framework for many tasks

Limitations

  • Unstable training
  • Mode collapse
  • Hard to evaluate quantitatively

Equations

Minimax game Minimax objective

\min_G \max_D V(D, G) = \mathbb{E}_{\mathbf{x} \sim p_{data}}[\log D(\mathbf{x})] + \mathbb{E}_{\mathbf{z} \sim p_z}[\log(1 - D(G(\mathbf{z})))]

The discriminator maximises discrimination accuracy and the generator minimises it.

Symbols: G: generator, D: discriminator, p_z: noise distribution

Optimal discriminator Optimal discriminator

D^*_G(\mathbf{x}) = \frac{p_{data}(\mathbf{x})}{p_{data}(\mathbf{x}) + p_g(\mathbf{x})}

With the optimal discriminator the game equals −log 4 + 2·JSD(p_data ‖ p_g).

Symbols: JSD: Jensen–Shannon divergence

Non-saturating generator loss Non-saturating generator loss

\mathcal{L}_G = -\mathbb{E}_{\mathbf{z}}[\log D(G(\mathbf{z}))]

A practical alternative that gives stronger gradients early in training (proposed in the original paper).

Applications

Related models

References

  1. Original paper Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio. (2014). Generative adversarial nets. NeurIPS 2014. arXiv:1406.2661 Verified
Scientific review note: A first scientific draft based on the original paper and reference implementations; it needs review by a specialist before final approval.

Version 1 — last updated 2026-11-15.