Answers.Body: <p>Unfortunately no, the way to go is track the total reward and see if it's increasing and converging eventually. Value loss isn't a useful metric as the loss can be 0 when the value network always predicts 0 and the agent doesn't collect any reward, meaning very poor behavior.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-28T09:23:15.560Z
Answers.LastActivityDate: 2019-10-28T09:23:15.560Z
Answers.UserDisplayName: Gabizon
Body: <p>I'm working on an Advantage A2C implementation, and I just finished creating the value network <span class="math-container">$\hat{V_{\phi}}$</span>. I train this network with the standard MSE loss of discounted rewards-to-go:<span class="math-container">$$\|\hat{V_{\phi}}(s_{t'}) - \sum_{t=t'}^{T}\gamma^{t-t'} r(s_t, a_t)\|^2$$</span></p>
  
  <p>I would like to be able to evaluate and assess the performance and ability of the value network as I train, especially to see how that relates and interacts with the changes and improvements in the policy, however I'm not sure how to do this. </p>
  
  <p>My first instinct was to track the loss after each batch of experiences, but this doesn't work. As the policy improves, episodes last longer, and the value loss increases. I understand why this happens, as it is harder to predict the rewards-to-go when the length of the future is more undetermined. </p>
  
  <p>To fix this, I tried dividing the loss that I'm computing by the total number of steps in the batch of episodes. However, the loss is still increasing as the policy improves (as the episodes get longer). Why is this still happening? Then, is there anything I can do to get a better assessment of the quality of the value network?</p>
  
Tags: <neural-networks><deep-learning><reinforcement-learning><objective-functions><actor-critic-methods>
Title: A2C Critic Loss Interpretation
UserDisplayName: David Rein
ThreadText: # A2C Critic Loss Interpretation
  
  (Asked by: username_0 on 2019-05-25)
  
  I'm working on an Advantage A2C implementation, and I just finished creating the value network $\hat{V\_{\phi}}$. I train this network with the standard MSE loss of discounted rewards-to-go:$$\|\hat{V\_{\phi}}(s\_{t'}) - \sum\_{t=t'}^{T}\gamma^{t-t'} r(s\_t, a\_t)\|^2$$
  
  I would like to be able to evaluate and assess the performance and ability of the value network as I train, especially to see how that relates and interacts with the changes and improvements in the policy, however I'm not sure how to do this.
  
  My first instinct was to track the loss after each batch of experiences, but this doesn't work. As the policy improves, episodes last longer, and the value loss increases. I understand why this happens, as it is harder to predict the rewards-to-go when the length of the future is more undetermined.
  
  To fix this, I tried dividing the loss that I'm computing by the total number of steps in the batch of episodes. However, the loss is still increasing as the policy improves (as the episodes get longer). Why is this still happening? Then, is there anything I can do to get a better assessment of the quality of the value network?
  
  **Tags:** neural-networks, deep-learning, reinforcement-learning, objective-functions, actor-critic-methods
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-28. Score: 2
  
  Unfortunately no, the way to go is track the total reward and see if it's increasing and converging eventually. Value loss isn't a useful metric as the loss can be 0 when the value network always predicts 0 and the agent doesn't collect any reward, meaning very poor behavior.
  
  
  ---
  
  