GANs - why does the generator want to minimize the loss (intuition)

I am a little bit puzzled about the following. In a generative adversarial network, we consider a binary classification problem with a binary cross-entropy loss.

Now, the generator wants to minimize this loss and the discriminator wants to maximize this loss. I understand why the Bayes-optimal classifier is the optimal discriminator in this case, and why (algebraically), for this optimal discriminator, minimizing the loss corresponds to minimizing the Jensen-Shannon divergence (which is of course what we want).

What I do not understand on an intuitive level is why the generator does not want to maximize and the discriminator to minimize the loss. Wouldn't that correspond to the generator making the classification task as difficult as possible for the best-possible discriminator?

Would very much appreciate if someone has an intuitive argument for why the minmax makes sense.

• The discriminator strives to keep the data distribution away from the generator distribution as much as possible to eventually learn of all aspects of the data distribution, while the generator distribution tries to come as close as possible from the data distribution. If the Jensen-Shannon divergence was readily available, the discriminator would not be necessary to learn the generator distribution from the data. May 7, 2022 at 17:03
• @Xi'an Thank you very much for your fast response. I think what is unclear to me, is why $\max_D L(G, D)$ would keep the data distribution $p_r$ away from the generator distribution $p_z$. Wouldn't it do the opposite? As far as I understand, $L(G, D)$ is a logistic loss for the binary classification task. When $p_z$ is close to $p_r$, I would assume that this loss is large (they are hard to distinguish). When $p_z$ is far away from $p_r$, I would assume that this loss is small (they are easy to distinguish). Is this interpretation wrong? (because this would indicate that $D$ should minimize) May 7, 2022 at 17:52

Additionally, given the objective, $$\mathbb{E}_{x\sim\ p_r(x)}[log[D(x)] + \mathbb{E}_{x\sim\ p_g(x)}[log1 - D(x)]]$$, you can see that it reaches a maximum value of 0 when D(x)=1 (correctly) for all real samples and D(x)=0 (correctly) for all fake samples produced by the Generator; when the Discriminator is wrong the objective decreases to negative values. Hence the objective is maximized while training the Discriminator to output the correct class.