1

I'm currently studying the original GAN objective, and I'm struggling to understand that.

$$ \min_{G}\,\max_{D}\;V(D,G) \;=\; \mathbb{E}_{x\sim p_{\mathrm{data}}(x)}\bigl[\log D(x)\bigr] \;+\; \mathbb{E}_{z\sim p_{z}(z)}\bigl[\log\bigl(1 - D(G(z))\bigr)\bigr]$$

And I understand that

  • D(x) is the discriminator’s estimate that a real sample x is actually a real example
  • D(G(z)) is the discriminator’s estimate that a “fake” sample G(z) is real

So intuitively, I'd say:

  1. Discriminator’s goal:
    • Maximaze D(x).
    • Minimaze D(G(z)).
  2. Generator’s goal
    • Maximize D(G(z)) to fool the discriminator

So, why is the formula structured that way with a log(1-)?

Any pointers to an intuitive derivation or references that explain this choice would be greatly appreciated!

Matteo
  • 11
  • 1

1 Answers1

1

I think is called something along "log-trick", and is explained in the original paper (check the paragraph before figure 1)...

Point being, they have theoretical optima, but very different non-optimal behaviour.

Ideally, $\max D(G(x))$ is straighforward, and is equivalent to $\min -D(G(x))$, which is also equivalent to $\min 1-D(G(x))$, aaand, given that $\log$ is a monotonic transformation (aka does not change the location of the optima, just like for likelihood and log-likelihood), it's also equivalent to $\min \log(1-D(G(x)))$

Mistery solved

Alberto
  • 2,863
  • 5
  • 12