A random variable:
General sde can be written as the following:
Alternatively this can be written as a Fokker-Planck equation:
Note: the general conservation equation is:
We are interested in the following form of
$$ f(y) = \int p_t(x) \frac{x-y}{\Vert x-y \Vert^2} dx$$
By using using this equation in expectation we see
In order to ensure that batching works properly, we can include a weiner process, and pull towards the origin s.t. taking batches in the expectation result in identical terminal distributions
By taking samples, we can visualize the forward process in the following manner:
Score-based modelling can be generalized to look at Ito sde's of the following form:
To sample from a score based model, we just need to invert the sde as follows:
where
We can estimate
$$\theta^* = \mathrm{argmin}{\theta}\left( \mathbb{E}{t\sim U(0,1)}\mathbb{E}{x_0\sim p{\mathrm{data}}(x)} \mathbb{E}{x_t\sim p(x_t|x_0)} \lambda_t \left[\Vert s\theta(x_t,t)- \nabla_{x_t}\textrm{log }p_{0t}(x_t|x_0) \Vert^2_2 \right] \right)$$