You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, we may know a function proportional to the true density:
$$
\tilde{p}(x) \propto p(x)
$$
This means $\tilde{p}(x)$ has the same shape as $p(x)$, but it may not integrate to 1. To make it a valid probability density, we need to divide by the normalizing constant which is very difficult to compute in high dimensions.
$$
p(x) = \frac{\tilde{p}(x)}{Z}
$$
where:
$$
Z = \int \tilde{p}(x)dx
$$
The constant $Z$ makes sure that:
$$
\int p(x)dx = 1
$$
However, the score function does not depend on $Z$. Taking logarithm both side, we have:
So the point is 'go to' the mean $\mu$. This means gradient ascent is deterministic, if we start from same $x_0$, we always get the same result. But sampling means generating many points whose distribution follows $p(x)$:
$$
x \sim p(x)
$$
3. Langevin Dynamics
To make gradient ascent become a sampling method, Langevin dynamics adds Gaussian noise:
We can obvious see the first term $(1-\eta)x_k$ force the sample toward the mean $0$. But it do not go straight here because we have the second term that inject noise to this process, that make the sample keeps moving around the high-density region.
The next section will show how and why we can inject noise but still reserve our source distribution, this just work in this specific case not generalization. The author of blog Langevin Diffusion Tutorial: Hands-on Introduction has a good more generalize version.
With $0 < \eta < 1$, $\mathbb{E}[x_k] \rightarrow 0$, thus we can confirm that the mean of the samples move toward to mean of the target Gaussian.