At which situations does reconstruction loss of VAE equals MSE loss between input and reconstructed output?

Other answers where not complete!


A VAE models a distribution

$$P(x) = \int P(x|z)P(z) dz$$

When the output is continuous valued, then a common parameterization of $P(x|z)$ is as $$\mathcal{N}(\mu = f(z;\theta), \sigma^2)$$

Recall that a VAE is trained by maximizing the variational lower bound, which can be broken down into two terms:

$$E_{z \sim q}[\log P(x|z)] - \text{KL}(q(z)||p(z))$$

But then the first term is merely the log of the gaussian density, which is (up to some scaling and constants) $(x-\mu)^2$. Hence MSE.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.