Skip to content
BIASED

Wasserstein GANs and Lipschitz constraints

Block 1 of 8~2 min

When JS stops helping

The topic GANs as a two-player game ended with a warning. With an optimal discriminator the generator minimizes 2 DJS(P ∥ Qθ)−2ln⁡22\,D_{\mathrm{JS}}(P \,\|\, Q_\theta) - 2\ln 2, and the topic Entropy, cross-entropy and KL showed that DJSD_{\mathrm{JS}} is stuck at its maximum, ln⁡2\ln 2, whenever PP and QθQ_\theta do not overlap.

As the GAN topic showed, this is the typical case, not an exotic one: real images and generated samples both concentrate near thin, low-dimensional surfaces in RD\mathbb R^D, and their supports almost never overlap.

The classic picture is the parallel-lines example (Arjovsky, Chintala and Bottou, 2017, Example 1). Take Z∼U(0,1)Z \sim U(0, 1). The data are a vertical segment in the plane, and the model is the same segment shifted sideways by θ\theta:

P: x=(0, Z),Qθ: x=(θ, Z).P:\ x = (0,\ Z), \qquad Q_\theta:\ x = (\theta,\ Z).

For every θ≠0\theta \ne 0 the two segments are disjoint. DKL(P ∥ Qθ)=∞D_{\mathrm{KL}}(P \,\|\, Q_\theta) = \infty, because PP puts mass where QθQ_\theta has none. DJSD_{\mathrm{JS}} only asks whether the distributions overlap, not how far apart they are. A loss that does not change as the generator moves gives it no gradient — this is the saturating discriminator, seen from the generator's side.

Answers are saved on the server and tied to this browser until you sign in.

Go deeper — optional

Code and labs do not count toward the main percentage or the certificate.

  • Numerical critic Lipschitz checkoptional

    max |f'| for tanh(θx), weight clip, and GP penalty. Self-check in the notebook.

    ~15 min · easier on a computer · The WGAN topic read.

    Self-check in the notebook — not part of mastery or the certificate.