I asked this question on /r/MLQuestions aswell.

Although similar questions have been asked a few times here on reddit and elsewhere, I'm still unclear on how one would calculate the log-likelihood of, say, the CIFAR10 test set, under VAE/VQVAE models, as presented in


and related papers. A "black-box" method using tensorflow's tf.distributions (although for binarized MINST) can be found here


and here


, but I would love to understand how this value is calculated "manually".

Would anyone care to elaborate on exactly how to estimate this reported value for CIFAR10? I mention this dataset specifically since it's used as benchmark in many recent papers, and since CIFAR10 isn't binary like binarized MNIST.

I'm very thankful for any help! :)

PS: I am aware of a previous explanation on how to convert the log-likelihood value to bits/dim here:


but following this method requires that some loglikelihood (5371 in this case) has already been calculated (in the NICE code, this is done for the particular case)


Variational autoencoders optimize only a lower bound on the likelihood, since the likelihood itself is intractable, so there is no easy way to calculate the likelihood.

However, Appendix D of the original paper suggests how one might approximately estimate $p(x)$ when the latent space is low dimensional.

| cite | improve this answer | |

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.