liveBook · Manning

Discriminator

As explained in Outlier Detection in Python

A discriminator is the component of a generative adversarial network that distinguishes real observations from generated observations.

A discriminator is the neural-network component of a generative adversarial network that distinguishes real observations X from synthetic observations G(z). section 16.2.3

During adversarial training, the generator improves its synthetic data while the discriminator improves its real-versus-synthetic distinction. Training seeks equilibrium, though other stopping criteria are possible. section 16.2.3

For outlier detection, the discriminator supports several practical uses:

  • Pass observations through the trained discriminator and use its assessment as an outlier signal. section 16.2.3
  • Recognize a training trade-off: GANs can produce highly realistic data but require balancing two networks and are harder to train than VAEs. section 16.2.3

ALAD implementation

PyOD provides an ALAD detector that can be fitted to X, inspected through decision_scores_, and visualized with plot_learning_curves().

Figure 16.4 GAN network. This includes two neural networks: the generator (G) and discriminator (D). The generator learns to take random input (z) and convert this to synthetic data (G(z)) that is very similar to real data (X). The discriminator learns to distinguish synthetic data generated by G from the real data. They are trained together such that over time both become more powerful, with the generator being able to produce increasingly realistic data and the discriminator being able to detect increasingly subtle deviations from real data. Once trained, both the generator and discriminator may be used for outlier detection.

The GAN diagram shows how random noise z becomes synthetic data G(z), while the discriminator compares it with real data X during joint training. section 16.2.3

How Outlier Detection in Python covers it

How deep it goes
Explains the discriminator’s adversarial training, inputs, equilibrium, and outlier-detection role, but does not derive its network architecture.
Examples
Uses real data X, generated data G(z), random noise z, GAN diagrams, and a PyOD ALAD implementation.
What it assumes
Assumes familiarity with neural networks and generative models while defining generators, discriminators, and latent vectors.
What you can do after
Diagnose outliers by applying a trained discriminator and, in BiGANs, combining its probabilities with reconstruction error.
How it connects
Connects the discriminator to generative adversarial networks, generators, latent vectors, variational autoencoders, BiGANs, and outlier detection.

Also explained in

Compare how 8 books explain discriminator →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.