# Marginal likelihood: Why is it difficult to compute in this case?

I have been reading up a bit on generative models particularly trying to understand the math behind VAE. While looking at a talk online, the speaker mentions the following definition of marginal likelihood, where we integrate out the latent variables:

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

Here we are marginalizing out the latent variable denoted by z.

Now, imagine xare sampled from a very high dimensional space like space of all possible images of a given size but the prior p(z)is a unit Gaussian distribution. I am trying to understand why this would be difficult to evaluate considering p(z)is one dimensional.

$$z$$ is still fairly high dimensional, typical values might range between 16 and 1000. This is still much lower than the dimension of $$x$$, which might be on the order of 10000 to 1 million. $$p(z)$$ is a standard multivariate gaussian, with identity covariance.
• @Luca I don't see anywhere where the lecturer claims $z$ is only one dimensional. I agree in that case, the integral can be tractably evaluated. Commented Nov 21, 2021 at 21:29