Back to Glossary
Generative Models

Discriminator

A discriminator is a neural network that distinguishes between real and generated data samples. It is a crucial component of Generative Adversarial Networks (GANs), where it learns to differentiate between the output of a generator network and genuine data from the training dataset.

Explanation

In the context of GANs, the discriminator and generator networks engage in a competitive game. The generator attempts to create synthetic data that closely resembles the real data, while the discriminator tries to identify whether a given sample is real or fake. The discriminator is typically a classification network that takes a data sample as input and outputs a probability score indicating the likelihood that the sample is real. During training, the discriminator's weights are adjusted to improve its ability to distinguish between real and fake samples, while the generator's weights are adjusted to produce samples that are more likely to fool the discriminator. This adversarial process drives both networks to improve, ultimately leading to the generator producing high-quality synthetic data. The architecture of the discriminator can vary depending on the type of data being generated. For image data, convolutional neural networks (CNNs) are commonly used, while for sequential data, recurrent neural networks (RNNs) or transformers may be employed. The discriminator's performance is critical for the overall success of a GAN, as a poorly trained discriminator can lead to mode collapse or other training instabilities.

Related Terms