# Understanding the GAN Loss function from the original paper

I've been reading the paper Generative Adversarial Nets by Ian J. Goodfellow et al., to have a more deeper understanding about the concepts from the author's perspective (I do understand the basics of GANs, from reading online tutorials).

In the equation (1) given in the paper Generative Adversarial Nets:

$$\min_G \max_D V(D, G) = \mathbb{E}_{x \sim p_{data}(x)}[\log D(x)] + \mathbb{E}_{z\sim p_z(z)}[\log(1-D(G(z)))]$$

The LHS term contains the $$\min$$ and $$\max$$ operations which are to be performed for each iteration, but the RHS does not contain similar operations signifying the min-max game being played. Can you please tell me if I'm missing something or why is the sum of the expected values of $$\log D(x)$$ and $$\log(1-D(G(z)))$$, respectively accepting the distributions $$x \sim p_{data}(x)$$ (which is the distribution of the data-set) and $$z \sim p_z(z)$$, equated to the term $$\min_G \max_D V(D, G)$$ which explicitly signifies the minimization of $$G$$ and maximization of $$D$$ one after the other (while the former doesn't)?

Shouldn't the above equation be,

$$\min_G \max_D V(D, G) = \min_G \max_D \left ( \mathbb{E}_{x \sim p_{data}(x)}[\log D(x)] + \mathbb{E}_{z\sim p_z(z)}[\log(1-D(G(z)))] \right)$$

Or,

$$V(D, G) = \mathbb{E}_{x \sim p_{data}(x)}[\log D(x)] + \mathbb{E}_{z\sim p_z(z)}[\log(1-D(G(z)))]$$.

And this is fitting because it computes the average over all the possible values provided by both the terms in the equation, which follow the distributions $$x \sim p_{data}(x)$$ and $$z \sim p_z(z)$$ respectively- thus consolidating the performance relative to all the points in the data-set. The paper goes on to show that at the optimal $$G$$ and $$D$$ (which is the global minimum), the value function returns a definite term $$-\log(4)$$.

Can you please tell me what am I missing here? why don't both the LHS and RHS terms have the $$\min_G max_D$$ operations? Can computing the sum of the expected values in the RHS given in the equation be equated to the LHS, which involves modifying the parameters of $$G$$ and $$D$$ through minimization and maximization?

• I don't know the specific answer to your question - but I know that the expectation is closely related to minimization. For example you can try and search on conditional expectation and regression. – Edv Beq Apr 23 '19 at 2:08
• @EdvBeq Thanks for your suggestion! I don't know if I'm correct, but I just read here: randomservices.org/random/expect/Conditional.html . The conditional expectation is just the probability terms in expected value, with conditional probability. – Sreram Apr 23 '19 at 8:25
• Hi! can someone please tell me if the question I asked was wrong or needs modification? I would surely respond as fast as I can. Thanks! – Sreram Apr 23 '19 at 17:42
• Why isn't this question getting any response? I would certainly change this question to fit within the community guidelines when asked to. Or if I'm doing something wrong, please do tell me. I will change immediately. – Sreram Apr 24 '19 at 8:35