- ODEs are equations defined using derivatives of variables. In the simplest form, how a physical object position as a function of time is updated can be defined using some function .
- What does this equation mean?
- Write the differential equation in a shorter way, and explain it.
- This states that infinitesimal change in position is equal to the function scaled by infinitesimal difference
- An equation of the form gives the value of y according to function f at any point inside the support of the function. While a differential equation is a vector field that gives the change of position at any point and at any time t.
- The way to solve a differential equation is to take an initial point, and sum the infinitesimal changes over time.
- To make the integral tractable, above formulation can be discretized to and , and turned into a summation.
Before talking about SDEs, let’s talk about Stochasticity over time: Weiner Process.
- Weiner Process models position of a particle with a purely random trajectory in a Euclidean space. Mathematically, we can represent the position as: , where is a probability distribution.
- The above equation is a differential equation with a non-deterministic function that follows some distribution, and we equate the infinitesimal change in position to random move in space scaled times the infinitesimal time that move is followed.
- Since is a random variable, each position also follows the same distribution and, we treat each position in time itself as a random variable, governed by equation above.
- We can choose any distribution for , but Good ol’ friend Gaussian doesn’t like that, and is staring right at us through the Central limit hole! We model the probability of random movement with a standard Gaussian, .
- We choose amount of infinitesimal time to be . We’ll understand the reason why shortly.
- Thirdly, we want the starting position of the differential equation to be .
- Since is a random variable, we don’t know its integral. Rather we look at the first two moments:
- .
- So, all paths stay around initial position 0, and start to spread further proportional to the length of the path. Also, the derivation turned out to be straightforward due to our choice of infinitesimal time .
- The process defined so far is an elementary stochastic process called Wiener process that defines the path of infinitesimal movement of particle.
add a brownian motion picture
Let’s define the properties of the Wiener process:
- Initial position:
- Independent increments: . Any future motion is independent of past motion. This can be seen as continuous time analog of iid steps in random walks.
- Stationary Gaussian increments: . The displacement of the particle over an interval is Gaussian distributed with mean 0 and variance proportional to the interval. We just proved this above.
- Continuous time paths but nowhere differentiable. Paths are continuous, but this being a stochastic process, Wiener process is not differentiable because , so .
- Other properties include the covariance structure: , Markov property: for , Martingale property: .
We write the Brownian motion SDE by equating the infinitesimal change in position with Brownian motion which is defined by a normally distributed random variable scaled by .
Interestingly, Wiener process is continuous but non-differentiable. Intuitively, we know that differential of a continuous function in classical calculus measures the rate of change of the function on an infinitesimal change in domain. But for Wiener process, , where is a random variable (usually Gaussian) which does not depend on time. So, no matter how much we zoom into the domain to get the infinitesimal value, we’ll always have a random brownian motion on the finer axis, which explains the fractal property of Brownian motion.
Enter fractal picture from wikipedia
SDE
An SDE is just combination of ODE and stochastic process. We defined a stochastic differential equation which is the infinitesimal change in random variable as sum of deterministic change and stochastic process (infinitesimal Wiener process)
This is also known as Ito drift-diffusion process. Solving the SDE, we’ll assume constant and .
is a random variable. Let’s calculate analytical mean and variance of the process.
- Ito’s Process: Ito’s lemma that tells how to differentiate an SDE: Ito’s (Di)Lemma
- Ornstein-Uhlenbeck process: Solving (Some) SDEs
- Fokker-Planck Equation
Questions that we're going to answer in this document:
- Write Fokker-Planck equation. Understand the physical intuition behind it.
- Derive FP equation, and reverse SDE using FP equation.
- Why FP equation is necessary to show that stochastic equation used in score-based models preserve the intermediate distribution?
- Derive PF-ODE from the SDE and FP equation.
For the drift function and diffusion function , we let evolve with the forward SDE,
Why is ?
Notice that is a d-dimensional Wiener process. So, there exists d-independent noise sources of . To find out the effect of these noise channels on coordinate of , . Thus, is the map that takes dim noise vector and produces dim perturbation, where each row of g calculates effect of the noise sources on coordinate .
Time reversal of diffusion/reverse SDE
- Why do we want to reverse an SDE?
Score estimation using SDE
Stochastic Calculus
Introduction to Stochastic Calculus | Ji-Ha’s Blog
Itô Processes and The Fundamental Theorem of Stochastic Calculus
ItoSDE_Tutorial
LW - Blog