Answers.Body: <p>The <em>value function</em> may be used in the GAN paper because GANs are inspired by game theory, where terms like <em>utility</em>, <em>utility function</em> and <em>value function</em> (just like in reinforcement learning) are used (the first two for sure, but I am not sure about the usage of the term <em>value function</em> in game theory, as I am far from an expert in game theory).  If you want to know more about the usage of the term <em>value function</em>, <a href="https://en.wikipedia.org/wiki/Value_function" rel="nofollow noreferrer">this Wikipedia article</a> could be useful (or maybe make things more confusing).</p>
  <p>Having said that, it seems to me that the usage of the term &quot;objective function&quot; in the conditional GAN paper is a bit sloppy. They probably meant <a href="https://en.wikipedia.org/wiki/Optimization_problem" rel="nofollow noreferrer">the optimization problem</a>.</p>
  <p>However, it's also true that the notation used by the original authors of the GAN can also be confusing. They wrote</p>
  <p><span class="math-container">$$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))] \label{1}\tag{1}$$</span></p>
  <p>Here, <span class="math-container">$V(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]$</span>, so they could have written \ref{1} as follows</p>
  <p><span class="math-container">$$\min_G \max_D V(D, G) = \min_G \max_D\mathbb{E}_{x ∼ P_{data}}[\log D(x)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))] \label{2}\tag{2}$$</span></p>
  <p>or just</p>
  <p><span class="math-container">$$\min_G \max_D V(D, G) \label{3}\tag{3}$$</span></p>
  <p>Then clarify that <span class="math-container">$V(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]$</span>.</p>
  <p>This is clarified in <a href="https://arxiv.org/pdf/2009.00169.pdf" rel="nofollow noreferrer">this paper</a> (equations 2.1 and 2.2., page 5).</p>
  <p>So, in the GAN, we're optimizing <span class="math-container">$V$</span>, so <span class="math-container">$V$</span> is the objective function; thus, in this case, the term &quot;value function&quot; is a synonym for &quot;objective function&quot;. In this case, the optimization problem is a <span class="math-container">$\color{blue}{\textrm{min}}$$\color{red}{\textrm{max}}$</span> game, i.e. we <span class="math-container">$\color{red}{\textrm{maximize}}$</span> and <span class="math-container">$\color{blue}{\textrm{minimize}}$</span> at the same time two terms of the objective function, i.e. <span class="math-container">$\color{red}{\mathbb{E}_{x ∼ P_{data}}[\log D(x)]}$</span> and <span class="math-container">$\color{blue}{\mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]}$</span> (this is explained in the GAN paper!). In practice, they optimize two slightly different objectives, but they are equivalent. See algorithm 1 in the GAN paper.</p>
  <p>So, as I said in my other answer, the objective function is the function that you want to optimize (i.e. minimize or maximize), so it's usually a synonym for loss/cost/error function (in case you want to minimize it) and can be a synonym for value function (in case you want to maximize it, for example, in reinforcement learning), as it seems to be the case in the GAN (although, in the GAN, you maximize and minimize the value function).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-07T00:05:17.427Z
Answers.Text: The Wikipedia article you link to states that: "The **value function** of an optimization problem gives the value attained by the objective function at a solution, while only depending on the parameters of the problem"; so, it would seem that the value function and the objective function are indeed different concepts.
Answers.UserDisplayName: desertnaut
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-06T11:57:10.840Z
Answers.Text: @desertnaut I would agree with that, for instance the value function would not usually include regularisation terms, whilst the objective function can do
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-06T23:59:51.767Z
Answers.LastActivityDate: 2021-08-10T17:28:58.903Z
Answers.LastEditDate: 2021-08-10T17:28:58.903Z
Answers.UserDisplayName: nbro
Body: <p>I found the usage of both objective function and value function in the same context.</p>
  <p><strong>Context #1</strong>: In the paper titled <a href="https://papers.nips.cc/paper/2014/file/5ca3e9b122f61f8f06494c97b1afccf3-Paper.pdf" rel="nofollow noreferrer">Generative Adversarial Nets</a> by <em>Ian J. Goodfellow et al.</em></p>
  <blockquote>
  <p>We simultaneously train G to minimize <span class="math-container">$\log(1 −D(G(z)))$</span>. In other
  words, <span class="math-container">$D$</span> and <span class="math-container">$G$</span> play the following two-player minimax game with
  <strong>value function</strong> <span class="math-container">$V (G,D)$</span>:</p>
  <p><span class="math-container">$$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]$$</span></p>
  </blockquote>
  <p><strong>Context #2</strong>: In the paper titled <a href="https://arxiv.org/pdf/1411.1784.pdf," rel="nofollow noreferrer">Conditional Generative Adversarial Nets</a> by <em>Mehdi Mirza et al.</em></p>
  <blockquote>
  <p>The <strong>objective function</strong> of a two-player minimax game would be as</p>
  <p><span class="math-container">$$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x|y)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z|y)))]$$</span></p>
  </blockquote>
  <p>In fact, the second paper also iterated <strong>context #1</strong> i.e., used the term &quot;value function&quot; at another place.</p>
  <p>We can observe that objective function is a <a href="https://ai.stackexchange.com/questions/9005/what-is-an-objective-function">function</a> which we <a href="https://ai.stackexchange.com/questions/13646/what-are-the-major-differences-between-cost-loss-error-fitness-utility-obje">want to optimize</a></p>
  <blockquote>
  <p>The objective function is the most general term that can be used to
  refer to a cost (or loss) function, to a utility function, or to a
  fitness function, so, depending on the problem, you either want to
  minimize or maximize the objective function. The term objective is a
  synonym for goal.</p>
  </blockquote>
  <p>Since the generator or discriminator has to perform optimization, it is agreeable to use the term objective function in this context.</p>
  <p>But what is the definition for the value function and how is it different from the objective function in this context?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-06T10:17:07.853Z
Comments.Text: Reading closely the "criteria" you quote, I don't think there is any contradiction; in both cases, $V (G,D)$ seems to be the *value* function, while the *objective* function is $$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]$$ (or $$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x|y)] + 
   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z|y)))]$$)
Comments.UserDisplayName: desertnaut
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-06T10:19:16.690Z
Comments.Text: @desertnaut So, there is no difference between the both and they are same!
Comments.UserDisplayName: hanugm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-06T10:21:31.657Z
Comments.Text: I didn't say that, neither I implied it; I said that seemingly the objective function is a functional that includes the value function. `V(D, G)` (value) is not the same with `min max V(G, D)` (objective).
Comments.UserDisplayName: desertnaut
Tags: <comparison><terminology><objective-functions><generative-adversarial-networks><value-functions>
Title: Is there any difference between an objective function and a value function?
UserDisplayName: hanugm
ThreadText: # Is there any difference between an objective function and a value function?
  
  (Asked by: username_0 on 2021-08-06)
  
  I found the usage of both objective function and value function in the same context.
  
  **Context #1**: In the paper titled [Generative Adversarial Nets](https://papers.nips.cc/paper/2014/file/5ca3e9b122f61f8f06494c97b1afccf3-Paper.pdf) by *Ian J. Goodfellow et al.*
  
  > We simultaneously train G to minimize $\log(1 −D(G(z)))$. In other
  > words, $D$ and $G$ play the following two-player minimax game with
  > **value function** $V (G,D)$:
  >
  > $$\min\_G \max\_DV(D, G) = \mathbb{E}\_{x ∼ P\_{data}}[\log D(x)] +
  > \mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z)))]$$
  
  **Context #2**: In the paper titled [Conditional Generative Adversarial Nets](https://arxiv.org/pdf/1411.1784.pdf,) by *Mehdi Mirza et al.*
  
  > The **objective function** of a two-player minimax game would be as
  >
  > $$\min\_G \max\_DV(D, G) = \mathbb{E}\_{x ∼ P\_{data}}[\log D(x|y)] +
  > \mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z|y)))]$$
  
  In fact, the second paper also iterated **context #1** i.e., used the term "value function" at another place.
  
  We can observe that objective function is a [function](https://ai.stackexchange.com/questions/9005/what-is-an-objective-function) which we [want to optimize](https://ai.stackexchange.com/questions/13646/what-are-the-major-differences-between-cost-loss-error-fitness-utility-obje)
  
  > The objective function is the most general term that can be used to
  > refer to a cost (or loss) function, to a utility function, or to a
  > fitness function, so, depending on the problem, you either want to
  > minimize or maximize the objective function. The term objective is a
  > synonym for goal.
  
  Since the generator or discriminator has to perform optimization, it is agreeable to use the term objective function in this context.
  
  But what is the definition for the value function and how is it different from the objective function in this context?
  
  **Tags:** comparison, terminology, objective-functions, generative-adversarial-networks, value-functions
  > **Comments:**
  > **username_1**: Reading closely the "criteria" you quote, I don't think there is any contradiction; in both cases, $V (G,D)$ seems to be the *value* function, while the *objective* function is $$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x)] +   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z)))]$$ (or $$\min_G \max_DV(D, G) = \mathbb{E}_{x ∼ P_{data}}[\log D(x|y)] +   \mathbb{E}_{z ∼ p_z}[log (1 - D(G(z|y)))]$$)  
  > **username_0**: @desertnaut So, there is no difference between the both and they are same!  
  > **username_1**: I didn't say that, neither I implied it; I said that seemingly the objective function is a functional that includes the value function. `V(D, G)` (value) is not the same with `min max V(G, D)` (objective).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-08-06. Score: 1
  
  The *value function* may be used in the GAN paper because GANs are inspired by game theory, where terms like *utility*, *utility function* and *value function* (just like in reinforcement learning) are used (the first two for sure, but I am not sure about the usage of the term *value function* in game theory, as I am far from an expert in game theory). If you want to know more about the usage of the term *value function*, [this Wikipedia article](https://en.wikipedia.org/wiki/Value_function) could be useful (or maybe make things more confusing).
  
  Having said that, it seems to me that the usage of the term "objective function" in the conditional GAN paper is a bit sloppy. They probably meant [the optimization problem](https://en.wikipedia.org/wiki/Optimization_problem).
  
  However, it's also true that the notation used by the original authors of the GAN can also be confusing. They wrote
  
  $$\min\_G \max\_DV(D, G) = \mathbb{E}\_{x ∼ P\_{data}}[\log D(x)] +
  \mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z)))] \label{1}\tag{1}$$
  
  Here, $V(D, G) = \mathbb{E}\_{x ∼ P\_{data}}[\log D(x)] +
  \mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z)))]$, so they could have written \ref{1} as follows
  
  $$\min\_G \max\_D V(D, G) = \min\_G \max\_D\mathbb{E}\_{x ∼ P\_{data}}[\log D(x)] +
  \mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z)))] \label{2}\tag{2}$$
  
  or just
  
  $$\min\_G \max\_D V(D, G) \label{3}\tag{3}$$
  
  Then clarify that $V(D, G) = \mathbb{E}\_{x ∼ P\_{data}}[\log D(x)] +
  \mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z)))]$.
  
  This is clarified in [this paper](https://arxiv.org/pdf/2009.00169.pdf) (equations 2.1 and 2.2., page 5).
  
  So, in the GAN, we're optimizing $V$, so $V$ is the objective function; thus, in this case, the term "value function" is a synonym for "objective function". In this case, the optimization problem is a $\color{blue}{\textrm{min}}$$\color{red}{\textrm{max}}$ game, i.e. we $\color{red}{\textrm{maximize}}$ and $\color{blue}{\textrm{minimize}}$ at the same time two terms of the objective function, i.e. $\color{red}{\mathbb{E}\_{x ∼ P\_{data}}[\log D(x)]}$ and $\color{blue}{\mathbb{E}\_{z ∼ p\_z}[log (1 - D(G(z)))]}$ (this is explained in the GAN paper!). In practice, they optimize two slightly different objectives, but they are equivalent. See algorithm 1 in the GAN paper.
  
  So, as I said in my other answer, the objective function is the function that you want to optimize (i.e. minimize or maximize), so it's usually a synonym for loss/cost/error function (in case you want to minimize it) and can be a synonym for value function (in case you want to maximize it, for example, in reinforcement learning), as it seems to be the case in the GAN (although, in the GAN, you maximize and minimize the value function).
  
  > **Comments:**
  > **username_1**: The Wikipedia article you link to states that: "The **value function** of an optimization problem gives the value attained by the objective function at a solution, while only depending on the parameters of the problem"; so, it would seem that the value function and the objective function are indeed different concepts.  
  > **username_3**: @desertnaut I would agree with that, for instance the value function would not usually include regularisation terms, whilst the objective function can do  
  
  ---
  
  