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







