Answers.Body: <p>Yes, they might be abusing a bit the notation, however the meaning is close to what that notation would like to say.</p>
  <p><span class="math-container">$x|y$</span> and <span class="math-container">$z|y$</span> just mean that <span class="math-container">$x,z$</span> might be the same for multiple samples, only differing by conditioning <span class="math-container">$z$</span>... it's easier to see this on the generator: you can feed the network the same noise, but you expect that depending on what <span class="math-container">$y$</span> is, it generates different images.</p>
  <p>And yes, ideally you are modeling the joint distribution, thus it would be <span class="math-container">$G(z,y)$</span> and <span class="math-container">$D(x,y)$</span>, but since you have no &quot;generative model for <span class="math-container">$y$</span>&quot;, you are just learning the marginal</p>
  <p>For categorical variables it's easy to create such generative model for <span class="math-container">$p(y)$</span>, but for example consider the height of the person in the picture as conditioning, then you should know the distribution of heights if you really want to model the joint ditribution <span class="math-container">$p(z,y)$</span></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-22T10:46:49.467Z
Answers.LastActivityDate: 2024-05-22T10:46:49.467Z
Answers.UserDisplayName: Alberto
Body: <p>I am currently going through Conditional Adversarial Nets (CGANs) and the modified objective function of the two-player minimax game is stated as follows:
  <span class="math-container">$$\min_G \max_D V(D, G)=\mathbb E_{x\sim p_{data}(x)}[\log D(\textbf x|\textbf y)] + \mathbb E_{z\sim p_z(\textbf z)}[\log(1-D(G(\textbf z | \textbf y)))].$$</span></p>
  <p>I really don't understand what the conditioning does. G and D are not really probability functions, but rather real functions on samples from a distribution (which are real vectors). So what does the conditioning actually do? If the idea is just to include <span class="math-container">$y$</span> as an additional input to the generator neural net, then why not just <span class="math-container">$D(x, y)$</span> instead of <span class="math-container">$D(x|y)$</span>?</p>
  
Tags: <deep-learning><generative-adversarial-networks><dc-gan><conditional-gan>
Title: What is $z|y$ in Conditional Adversarial Nets?
UserDisplayName: insipidintegrator
ThreadText: # What is $z|y$ in Conditional Adversarial Nets?
  
  (Asked by: username_0 on 2024-05-22)
  
  I am currently going through Conditional Adversarial Nets (CGANs) and the modified objective function of the two-player minimax game is stated as follows:
  $$\min\_G \max\_D V(D, G)=\mathbb E\_{x\sim p\_{data}(x)}[\log D(\textbf x|\textbf y)] + \mathbb E\_{z\sim p\_z(\textbf z)}[\log(1-D(G(\textbf z | \textbf y)))].$$
  
  I really don't understand what the conditioning does. G and D are not really probability functions, but rather real functions on samples from a distribution (which are real vectors). So what does the conditioning actually do? If the idea is just to include $y$ as an additional input to the generator neural net, then why not just $D(x, y)$ instead of $D(x|y)$?
  
  **Tags:** deep-learning, generative-adversarial-networks, dc-gan, conditional-gan
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-05-22. Score: 1
  
  Yes, they might be abusing a bit the notation, however the meaning is close to what that notation would like to say.
  
  $x|y$ and $z|y$ just mean that $x,z$ might be the same for multiple samples, only differing by conditioning $z$... it's easier to see this on the generator: you can feed the network the same noise, but you expect that depending on what $y$ is, it generates different images.
  
  And yes, ideally you are modeling the joint distribution, thus it would be $G(z,y)$ and $D(x,y)$, but since you have no "generative model for $y$", you are just learning the marginal
  
  For categorical variables it's easy to create such generative model for $p(y)$, but for example consider the height of the person in the picture as conditioning, then you should know the distribution of heights if you really want to model the joint ditribution $p(z,y)$
  
  
  ---
  
  