ctallec/world-models

Negative GMM loss. How to interpret?

Closed this issue · 2 comments

Hi,

I am currently training the MDR-RNN with VAEs of different latent vector sizes (LSIZE). I have noticed that the smaller the size, the smaller the GMM loss (and total loss) is. Specifically, by using an LSIZE of 4 (and default RSIZE of 256), the loss goes below zero.

On the other hand, on the code comments of trainmdrnn.py, I saw that: "The LSIZE + 2 factor is here to counteract the fact that the GMMLoss scales approximately linearily with LSIZE". So I suppose that the fact that the loss goes below zero is somewhat expected when using a small LSIZE.

Nonetheless, I wonder how we could interpret and compare the MDR-RNN losses in order to asses its performance. Also, do you know if the original World Models implementation also does the "LSIZE+2" scaling / has the loss below zero effect? I read their code but could not figure if that was the case.

Thanks again!

One possibility would be that it is much easier for the MDN-RNN to model a low-dimensional latent space than a high dimensional one. The scaling is only designed to make losses comparable, but won't compensate an easier or a harder task. In the original paper, they did not have this scaling factor because they did not model the reward signal, which we did by default in a previous version of the code, but no longer do. When there is no reward modelling contribution, RMSprop should directly negate the constant multiplicative factor that differs between the two losses.

Alright, thanks for the clarification!