All lessons in Machine Learning Engineering: Reliable Predictive Models
Adversarial Objectives and Generative Evaluation
Explain alternating generator and discriminator updates and diagnose missing modes.
35 minutes · Free with an account · preview
What you will learn
- State the generator and discriminator objectives and trace one alternating gradient update on a hand-sized fixture.
- Compute the optimal discriminator for a fixed generator from two discrete distributions and relate the resulting value to Jensen–Shannon divergence.
- Diagnose mode collapse from a coverage comparison between real and generated records, and choose an evaluation that does not rely on training losses alone.
The parcel carrier's late-delivery model has been trained on real dispatch records, but the team now wants synthetic dispatch records: to stress-test the model under rare weather, to prepare shareable data candidates (generation alone does not guarantee privacy or prevent memorization), and to augment a small depot's history. A generative adversarial network (GAN) is one way to learn a sampler for such records. This optional lesson recaps the handful of ideas you need, works through the objective by hand, and spends most of its energy on the question that matters in practice: how do you tell whether the generator has actually learned the data, or has quietly collapsed onto a few easy records?
You need only basic probability, the logistic (sigmoid) function, and the idea of a gradient step. No earlier optional lesson is assumed.