In a generative adversarial network (GAN), what is the role of the discriminator network?
Select an answer to reveal the explanation.
Short Explanation and Infographic
A GAN is basically two networks locked in competition, and the discriminator is the skeptical judge in that setup. It gets handed samples, some real ones straight from the training data, some fake ones cooked up by the generator, and its whole job is to tell them apart, real or fake, thumbs up or thumbs down. That's why 'decide real or fake' is the right answer. Generating new synthetic samples is the generator's job, its exact opposite number in this adversarial game. Compressing data into a lower-dimensional latent code is what an autoencoder's encoder does, not a discriminator. And adding positional information about token order is a Transformer concept called positional encoding, completely unrelated to GANs.
Full explanation below image
Full Explanation
A generative adversarial network (GAN) consists of two neural networks trained simultaneously in an adversarial setup: a generator and a discriminator. The discriminator's role is that of a binary classifier: given a sample, it must decide whether that sample came from the real training data distribution or was synthetically produced by the generator. During training, the discriminator is shown a mix of real samples (with the label 'real') and generated samples (with the label 'fake'), and it learns to output a probability estimating how likely a given input is to be real. The generator, meanwhile, is trained to produce samples that increasingly fool the discriminator into classifying them as real. This creates an adversarial, minimax game: as the discriminator gets better at spotting fakes, the generator is pushed to produce more convincing fakes, and ideally the two networks improve together until the generator produces samples nearly indistinguishable from real data.
The first distractor describes the generator's role, not the discriminator's; the generator is the network responsible for producing new synthetic data instances (such as images) that mimic the training distribution, which is the opposite function from the discriminator's evaluative role.
The second distractor describes the encoder portion of an autoencoder, which compresses input data into a smaller latent representation; this is a distinct architecture from a GAN's discriminator, which does not compress data into a code but instead outputs a real/fake classification score.
The third distractor (positional encoding) describes a mechanism specific to Transformer architectures used to inject information about token order into a sequence, since Transformers otherwise have no inherent sense of sequence order; this has no relationship to a GAN's discriminator, which deals with classifying samples as real or fake rather than encoding sequence position.
Memory aid: think of the GAN as a forger (generator) versus an art detective (discriminator), the forger tries to make convincing fakes, and the detective's sole job is telling real paintings from forgeries, and that constant back-and-forth is what drives both networks to improve.