✦ScienexySCIENCE KNOWLEDGE LIBRARY
Science reference · SCI-CS-003-117

Generative Adversarial Networks (GANs)

Generative Adversarial Networks are generative models that train a generator and discriminator in competition to produce realistic synthetic data.

min_G max_D V(D,G) = E_(x~p_data)[log D(x)] + E_(z~p_z)[log(1 - D(G(z)))]

Explanation

A Generative Adversarial Network (GAN) is a framework for training generative models through competition between two neural networks.

The two main components have different objectives:

1. Generator: Receives a random latent vector and attempts to produce synthetic data that resembles samples from the real dataset.
2. Discriminator: Receives real and generated samples and attempts to determine whether each sample is real or generated.

During training, the discriminator learns to distinguish real data from generated data. The generator learns to produce samples that can increasingly fool the discriminator. This adversarial process can improve the quality of generated samples over time.

The original GAN framework uses a minimax objective. The discriminator tries to maximize its ability to distinguish real and generated examples, while the generator attempts to minimize the discriminator's ability to identify generated examples.

GAN training can be difficult. Common challenges include mode collapse, where the generator produces limited varieties of outputs; unstable training; and vanishing gradients. Several variations, including Deep Convolutional GANs (DCGANs), conditional GANs, and Wasserstein GANs, introduce different techniques to improve training or control generation.

GANs can generate images, audio, and other data types. However, generated content may contain artifacts or inaccuracies, and synthetic data should not automatically be treated as authentic evidence.

Variables

SymbolMeaning

G

Generator network

D

Discriminator network

x

Real data sample

z

Random latent vector

G(z)

Synthetic sample produced by the generator

D(x)

Discriminator's estimated probability that x is real

p_data

Real data distribution

p_z

Latent input distribution

Example or application

A GAN trained on a dataset of landscape photographs can learn to generate new synthetic landscape images that resemble the visual patterns found in its training data.

Text

GANs contain two neural networks: a generator that creates synthetic samples and a discriminator that distinguishes generated samples from real training data. Both networks improve through an adversarial training process.

Key Points

  • GANs contain a generator and a discriminator.

  • The generator creates synthetic samples.

  • The discriminator distinguishes real samples from generated samples.

  • Adversarial training improves both networks through competition.

  • Mode collapse is a common training challenge.

  • Generated samples can contain errors or artifacts.

Applications

  • Synthetic image generation

  • Image-to-image translation

  • Image super-resolution

  • Data augmentation research

  • Style transfer

  • Scientific image synthesis

Learning Outcomes

  • Identify the roles of the generator and discriminator.

  • Explain the adversarial training process.

  • Understand the basic GAN objective.

  • Recognize common GAN training problems.

Practice Questions

  • What is the generator's main objective?

  • How does the discriminator contribute to GAN training?

  • What is mode collapse?

  • Why can GAN training become unstable?

Related Concepts

  • Generative Models

  • Neural Networks

  • Latent Space

  • Autoencoders

  • Deep Learning

Common Mistakes

  • Assuming the discriminator generates synthetic data.

  • Confusing GANs with ordinary supervised classifiers.

  • Assuming adversarial training always converges smoothly.

  • Treating generated content as guaranteed to be accurate or authentic.

Sources and verification

Sources are shown as provided in the project data. Not every source has yet been independently verified. Please report errors or missing citations.

  • Goodfellow, I. et al., Generative Adversarial Nets, Advances in Neural Information Processing Systems, 2014.
  • Goodfellow, Bengio, and Courville, Deep Learning, MIT Press, 2016.

Suggest a correction or source · More in Artificial Intelligence & Machine Learning