Skip to content
AI.info

Deep architectures

Generative Adversarial Networks and Learned Critics

Explain adversarial objectives, generator–discriminator dynamics, conditioning, mode collapse, training instability, and responsible evaluation of GAN systems.

By the end you can

A GAN learns through a moving opponent

A generator turns random variables, and optional conditions, into synthetic samples. A discriminator — a critic — learns to tell real observations apart from generated ones.

The generator never gets a target to copy. Its gradients arrive through the critic. And because both networks change during training, the objective landscape each player faces keeps moving. Nonstationary is the technical word for it.

Adversarial learning replaces an explicit reconstruction target with a learned training signal.

Visual

The adversarial training loop

The two networks improve against each other. Neither objective guarantees a stable equilibrium in practice — and that is a proved statement, not a complaint about tuning.

The strongest guarantee anyone has obtained is deliberately narrow. Give the discriminator and the generator separate learning rates — a two time-scale update rule — and something can be proved about where training ends up. Heusel and colleagues proved it in 2017. “Using the theory of stochastic approximation, we prove that the TTUR converges under mild assumptions to a stationary local Nash equilibrium.” Read the qualifiers rather than the verb. The equilibrium is local, not global. It holds under mild assumptions. And it belongs to that one update rule, not to adversarial training in general.

The other boundary was drawn from the opposite side. In 2018 Mescheder and two colleagues built a prototypical counterexample. When the data and generator distributions are not absolutely continuous, unregularized GAN training is not always convergent. Wasserstein-GANs and WGAN-GP fail the same way when the discriminator gets a finite number of updates per generator update. That finite number is exactly the update ratio the fourth stage of this loop rebalances. It is why the loop has a rebalancing stage at all.

FigureProcess · 5 steps
  1. 1

    Draw real and latent samples

    Training compares observations with generated candidates.

  2. 2

    Update the critic

    Increase separation between real and generated distributions under the chosen loss.

  3. 3

    Update the generator

    Change synthetic samples to receive a more favorable critic signal.

  4. 4

    Rebalance the game

    Adjust update ratios, regularization, architecture, or learning rates.

  5. 5

    Evaluate held-out behavior

    Measure coverage, fidelity, memorization, and operational usefulness.

Comparison

Different adversarial objectives shape the critic signal

Changing the loss alters gradient geometry. It also alters how the critic should be read.

The first row is the original, and it names its own target. Goodfellow and seven colleagues published it in 2014. They train “a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G”. Then they characterise the equilibrium exactly. “This framework corresponds to a minimax two-player game. In the space of arbitrary functions G and D, a unique solution exists, with G recovering the training data distribution and D equal to 1/2 everywhere.” A critic at one half is the goal. A critic at one is a critic that has stopped teaching.

The rows are not equals under test, and the loss is not the only variable in the row. Google Brain ran a neutral large-scale study in 2019, comparing regularization and normalization across the non-saturating, Wasserstein and least-squares losses. The constraint placed on the discriminator travelled better than the choice of loss. Spectral normalization improved sample quality consistently across all three objectives. The gradient penalty showed no clear trend. Pick a row, then pick the constraint that goes with it. The figures are in the debugging section below.

FigureComparison · 4 columns

Original logistic GAN

Uses a binary discrimination objective.

  • Clear probabilistic framing
  • Can saturate early
  • Non-saturating generator variant helps
  • Sensitive to balance

Wasserstein-style critic

Estimates a distribution discrepancy under a Lipschitz constraint.

  • More informative gradients in some regimes
  • Requires critic regularization
  • Critic score is not a probability
  • Constraint implementation matters

Hinge objective

Encourages a margin between real and generated scores.

  • Common in high-quality image GANs
  • Simple critic gradients
  • Still needs stabilization
  • No coverage guarantee

Conditional adversarial loss

Supplies labels, text, or measurements to both sides.

  • Controls output attributes
  • Can expose condition mismatch
  • Needs paired evidence quality
  • May ignore weak conditions

Analogy

A counterfeiter and an examiner who both keep learning

A counterfeiter improves notes while an examiner learns new detection methods. Progress depends on useful challenge. An incompetent examiner teaches little, and a perfect one may only reject everything.

Counterfeiters and examiners consciously invent strategies, while neural players optimize differentiable scores. What carries over is the moving target.

GAN stability depends on maintaining an informative game, not simply maximizing one player’s accuracy.

Example

Failure modes that a single sample grid hides

A visually impressive page can coexist with serious distribution failures.

Mode collapse has a mechanism, and the people who proposed the standard countermeasure led with it. “One of the main failure modes for GAN is for the generator to collapse to a parameter setting where it always emits the same point.” That is Salimans and five colleagues, in 2016. The reason is structural rather than a matter of tuning. “Because the discriminator processes each example independently, there is no coordination between its gradients, and thus no mechanism to tell the outputs of the generator to become more dissimilar to each other.” So “all outputs race toward a single point that the discriminator currently believes is highly realistic”. Their minibatch discrimination lets the critic look at several samples at once. That is the smallest change that removes the independence assumption.

The failure also has a countable size. Stacked MNIST places three MNIST digits in the colour channels of one image, so the target distribution has exactly 1,000 modes. Coverage can be counted rather than eyeballed. Srivastava and colleagues counted it in 2017, in the paper that introduced VEEGAN. DCGAN captured 99 of the 1,000 modes, at a KL of 3.4. ALI captured 16 modes at KL 5.4, Unrolled GAN 48.7 modes at KL 4.32, and VEEGAN itself 150 modes at KL 2.95. A generator holding 99 modes out of 1,000 can still fill a sample grid that no reviewer would question.

A second laboratory ran the same benchmark and got a second number. The PacGAN authors re-ran it in 2018 with their own DCGAN implementation, over 10 trials. They measured 78.9 ± 6.46 modes, at KL 4.50 ± 0.127. Their own PacDCGAN2 reached 1000.0 ± 0.00 modes at KL 0.06 ± 0.003. The same architecture on the same benchmark lands at 99 modes in one lab and 78.9 ± 6.46 in another. That gap is the implementation variance to expect before you attribute a coverage gap to your idea. Lin and colleagues state the general problem in their abstract: “Despite remarkable advances in generating realistic images, a major shortcoming of GANs is the fact that they tend to produce samples with little diversity, even when trained on diverse datasets.”

The memorization bullet is not a worry either; it has a measured worst case. The first membership inference attacks on generative models were mounted by Hayes and colleagues in 2019, in a paper called LOGAN. With white-box access, the attack works completely. “We note that, for white-box attacks, the attacker successfully infers the training set with 100% accuracy on both the LFW and CIFAR-10 datasets, and 95% accuracy for DR dataset.” Access changes the number. With no auxiliary knowledge, black-box accuracy falls to 40% on LFW, 37% on CIFAR-10 and 22% on the diabetic-retinopathy set. The obvious remedies did not change it. The candidate defences they tested “are either ineffective or lead to significantly worse performances”. A later paper, GAN-Leaks, systematised the same risk across image, medical and location data in 2020.

  • Mode collapse: many latent inputs map to a narrow set of outputs, producing fidelity without adequate variety — DCGAN at 99 of 1,000 stacked-MNIST modes in the VEEGAN paper, and 78.9 ± 6.46 modes when PacGAN re-ran the same benchmark.
  • Mode dropping: entire regions of the real distribution receive little or no generated probability — on stacked MNIST, every mode outside the 99 the generator kept, none of which a sample grid will show you.
  • Critic domination: an overly accurate discriminator provides gradients that are weak, noisy, or unhelpful to the generator, which is why the Heusel convergence result needs a separate learning rate for each player.
  • Memorization: generated samples resemble training examples closely enough to create privacy and originality concerns — LOGAN's white-box attack read training-set membership at 100% accuracy on LFW and CIFAR-10 and 95% on the DR dataset.
  • Conditional neglect: outputs look plausible but do not reliably reflect the requested label, text, or measurement.

Key idea

No single GAN metric measures the whole distribution

Feature-based scores combine fidelity and diversity imperfectly. Precision–recall variants separate sample quality from coverage more clearly. Human review adds context but can be inconsistent.

That is not received wisdom. It has a paper behind it. In 2018 Sajjadi and colleagues wrote this about the Frechet Inception Distance and its relatives: “However, these metrics are unable to distinguish between different failure cases since they only yield one-dimensional scores.” Their replacement has two axes on purpose. A precision/recall definition disentangles sample quality from coverage of the target distribution. One number cannot separate a generator that makes beautiful samples of half the distribution from one that covers everything badly.

An independent group reached the same conclusion on modern systems. Testing an improved precision and recall metric on StyleGAN and BigGAN in 2019, Kynkäänniemi and colleagues demonstrated “several illustrative examples where existing metrics yield uninformative or contradictory results”.

Report nearest-neighbor checks, subgroup coverage, conditional accuracy, privacy tests, and task-specific utility. A lower aggregate score should not erase a newly discovered failure mode. The privacy test in that list is not a formality. LOGAN's white-box attack recovered training-set membership at 100% accuracy on LFW and CIFAR-10, and no aggregate image-quality score moves when it does.

Evaluate what the generator covers, not only how attractive selected samples appear.

Steps

Debug an unstable adversarial run

Treat curves as clues rather than expecting one ideal loss trajectory.

Step four has a worked example, and a warning about stabilizers that look harmless. Instability in Wasserstein GANs was traced to one choice made in the code. “We find that these problems are often due to the use of weight clipping in WGAN to enforce a Lipschitz constraint on the critic, which can lead to undesired behavior.” That is Gulrajani and four colleagues, in 2017. They replace clipping with one term: “penalize the norm of gradient of the critic with respect to its input”. The payoff they report is exactly the property step four is testing for. The method “enables stable training of a wide variety of GAN architectures with almost no hyperparameter tuning, including 101-layer ResNets”.

Step four also has a published ranking, which is the reason it says one at a time. Spectral normalization constrains the discriminator's weights, and Miyato and three colleagues proposed it in 2018. Google Brain then tested it against the gradient penalty in a neutral large-scale study in 2019. The finding is a figure caption: “We observe that spectral norm consistently improves the sample quality.” The gradient penalty did not earn the same sentence — “in some cases the gradient penalty can help, but there is no clear trend”.

The cost is the figure to budget against, because step four is expensive in exactly this currency. Reaching an FID below 100 with the non-saturating loss plus the gradient penalty required at least 6 hyperparameter settings. Spectral normalization reached a better, lower FID with 2. On a fixed compute budget, a stabilizer that needs six settings and one that needs two are not the same recommendation. Only a study that fixed the budget could tell them apart.

FigureProcess · 5 steps
  1. 1. Validate data and scaling

    Check normalization, augmentation, labels, and leakage between real and generated batches.

  2. 2. Inspect both gradient paths

    Measure norms, saturation, update ratios, and critic overfitting.

  3. 3. Reduce the game

    Overfit a tiny dataset and lower image or sequence complexity.

  4. 4. Add stabilization deliberately

    Test spectral constraints, gradient penalties, normalization, or objective changes one at a time.

  5. 5. Track distribution coverage

    Use latent sweeps, class counts, precision–recall, and nearest neighbors.

GANs remain useful when fast one-pass synthesis matters

After training, a generator can often produce a sample in one forward pass. That claim now comes with a published latency. In 2023 Kang and colleagues scaled a GAN up for text-to-image synthesis and called it GigaGAN. Their abstract states the advantage as a measurement: “First, it is orders of magnitude faster at inference time, taking only 0.13 seconds to synthesize a 512px image.” The same system reports 3.66 seconds for a 16-megapixel image. That is what a one-pass generator buys, in seconds, at two resolutions.

The cost is on the same page rather than in a rival's paper. Scaling the architecture is where the difficulty moved. Naively increasing the capacity of the StyleGAN architecture, the authors report, “quickly becomes unstable”. So both halves of the trade-off are measured, one in seconds of inference and one in training difficulty. Neither is settled by looking at samples. Compare GANs with autoregressive, flow, VAE, and diffusion baselines under the actual latency and coverage requirements, and price the training game as part of the decision.

0.13 seconds is the argument for an adversarial generator; the training instability is the price printed on the same page.

Key takeaways