Itô calculus vs Stratonovich calculus
Even without formally studying AI, anyone who follows materials on image generation or language models has probably encountered the term diffusion model.
Those who looked a bit deeper will have heard of the Denoising Diffusion Probabilistic Model (DDPM)1 or the Score-based Generative Model (SGM)2,
and those who tried to understand the difference between the two in order to study them seriously will have learned that they are essentially equivalent, and that sampling in both is described by a Stochastic Differential Equation (SDE) of the following form.
\begin{equation} \dd X(t) = \mu(X(t), t) \dd t + \sigma(X(t), t) \dd W(t) \label{eq: ito sde example} \end{equation}
Going further, those who tried to bring this machinery into their own field of research have probably had to ask what kind of differential-geometric space their data lives in. For data in spaces with a very simple topological structure — images in $\mathbb{R}^n$, or token sequences in ${0, 1}^{n}$ — the diffusion kernel is naturally Gaussian. But data with special constraints, such as molecular structures where interatomic distances are fixed, cannot use this simple Gaussian diffusion kernel. To define the diffusion kernel properly, one must understand the differential-geometric structure of the data space.
An example of such an analysis is the Riemannian Diffusion Model3, and in papers like this one finds the following notation. \begin{equation} \dd X(t) = \sum_k V_k(X(t)) \circ \dd Z_k(t) \label{eq: stratonovich sde example} \end{equation}
The two equations look similar, but the notation differs. Eq.(\ref{eq: ito sde example}) is an SDE written in Itô calculus, while Eq.(\ref{eq: stratonovich sde example}) is written in Stratonovich calculus. In this post we will understand the difference between the two calculi, and see why the Riemannian Diffusion Model uses Stratonovich calculus.
Motivation: Stochastic Integration
The need for two different notations arises in the process of defining stochastic integration. For a stochastic process $X(t)$ following Eq.(\ref{eq: ito sde example}), consider the integral
\begin{equation} \int_0^T f(X(t)) \dd W(t) \end{equation}
How can this integral be defined? An ordinary integral is defined through a Riemann sum:
\begin{equation} \int_0^T f(x) \dd x = \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} f(c_i) (x_{i+1} - x_i), \quad c_i \in [x_i, x_{i+1}] \end{equation}
Here $c_i$ can be chosen as any point inside the interval $[x_i, x_{i+1}]$ without affecting the value of the integral. To see why, Taylor expand $f$ as below and let $M$ be the maximum of $\abs{\dd f/\dd x}$ over the whole domain. The error of each single term is second order in the interval width, so even after summing all $N$ terms the total error vanishes in the limit.
\begin{align} f(x_i + \dd x_i) &= f(x_i) + \frac{\dd f}{\dd x} \dd x_i \notag \newline \abs{(f(c_i) - f(x_i)) (x_{i + 1} - x_i)} &\leq M (x_{i + 1} - x_i)^2 \notag \newline \abs{ \sum_{i=0}^{N-1} (f(c_i) - f(x_i)) (x_{i + 1} - x_i)} &\leq M \sum_{i=0}^{N-1} (x_{i + 1} - x_i)^2 = O(N^{-1}) \end{align}
This approach, however, breaks down for stochastic processes. Suppose $X(t)$ follows Eq.(\ref{eq: ito sde example}), write $X_i = X(t_i)$, and let $\dd W_i = W(t_{i+1}) - W(t_i)$ be a Gaussian random variable with mean $0$ and variance $\dd t_i$. Choose the evaluation point of the $i$-th term as $c_i = X(s_i)$ for some $s_i \in [t_i, t_{i+1}]$. Since the drift part has zero mean against $\dd W_i$ and $\mathbb{E}\qty[(W(s_i) - W_i) \dd W_i] = s_i - t_i$, the error of a single term now contains a term of first order in $\dd t_i$:
\begin{align} \mathbb{E}\qty[\qty(f(X(s_i)) - f(X_i)) \dd W_i] &\approx \mathbb{E}\qty[f’(X_i) \qty(\mu(X_i, t_i)(s_i - t_i) + \sigma(X_i, t_i)\qty(W(s_i) - W_i)) \dd W_i] \notag \newline &= \mathbb{E}\qty[f’(X_i)\, \sigma(X_i, t_i)] (s_i - t_i) = O(N^{-1}) \notag \end{align}
In the deterministic case each term contributed an error of $O(N^{-2})$, so the sum of $N$ terms still vanished. Here each term contributes $O(N^{-1})$, so summing over the $N$ subintervals leaves a total error of $O(1)$: it survives the $N \rightarrow \infty$ limit, and its size depends on where $s_i$ is placed inside each interval. In other words, the value of a stochastic integral genuinely depends on which point of each subinterval the integrand is evaluated at. This is exactly why a stochastic integral must fix the choice of $c_i$ in advance as part of its definition, and Itô calculus and Stratonovich calculus are simply the two most useful conventions among the many possible rules for choosing $c_i$.
Itô calculus: Definition and Properties
Let us first look at the most widely used definition, Itô calculus.
Itô calculus is the most naive approach, the so-called left endpoint rule: the integral is defined by evaluating the integrand at the left endpoint, $c_i = X(t_i)$.
\begin{equation} \int_0^T f(X(t)) \dd W = \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} f(X(t_i)) (W_{i+1} - W_i) \end{equation}
The advantage of this rule is that $c_i = X(t_i)$ is the starting point of the time interval, so the definition never uses information that is not yet available. For that reason, an Itô integral satisfies the Martingale property.
\begin{align} M(s) &= \int_0^s f(X(t)) \dd W(t) \notag \newline \mathbb{E}\qty[M(s) | \mathcal{F}_t] &= M(t) \notag \end{align}
Here $\mathcal{F}_t$ denotes the filtration up to time $t$; it is best understood as all information available before time $t$. In words: if you predict the value of the integral over $[t, s]$ using only present information, the expected future change is zero. Thanks to this property, Itô calculus is the standard choice in probability theory and in simulations in financial engineering.
However, the chain rule does not hold in Itô calculus. For a general function $f(x, t)$ of two variables, the chain rule refers to the relation
\begin{equation} \dd f = \frac{\partial f}{\partial t} \dd t + \frac{\partial f}{\partial x} \dd x \end{equation}
This holds because $\dd t, \dd x$ are infinitesimally small, so terms of second order and higher can be neglected. But in Itô calculus $\dd x = \mu(x, t) \dd t + \sigma(x, t) \dd W$, and among the second-order terms $(\dd x)^2 \sim (\dd W)^2 \sim \dd t$ survives, so the relation up to first order becomes
\begin{equation} \dd f = \frac{\partial f}{\partial t} \dd t + \frac{\partial f}{\partial x} \dd x + \frac{1}{2} \frac{\partial^2 f}{\partial x^2} \sigma(x, t)^2 \dd t \end{equation}
Stratonovich calculus: Definition and Properties
Unlike Itô calculus with its left endpoint rule, Stratonovich calculus uses the approach corresponding to the midpoint rule — or the trapezoidal rule. The reason for this vague phrasing is that every one of these definitions gives the same result. That is, the following integrals are all equal.
\begin{align} \int_0^T f(X(t)) &\circ \dd W(t) \text{, where } t^\star_i = \frac{t_i + t_{i+1}}{2} \notag \newline &= \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} f(X(t^\star_i)) (W_{i+1} - W_i) \notag \newline &= \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} f\qty(\frac{X(t_i) + X(t_{i+1})}{2}) (W_{i+1} - W_i) \notag \newline &= \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} \frac{f(X(t_i)) + f(X(t_{i+1}))}{2} (W_{i+1} - W_i) \end{align}
The reason the three expressions give the same value is as follows. First, the difference between $X(t^\star_i)$ and $\frac{X(t_i) + X(t_{i+1})}{2}$ comes from the Brownian bridge on $[t_i, t_{i+1}]$, and the Brownian bridge is independent of the total increment $W_{i+1} - W_i$ of that interval, so the expectation of the product vanishes and it does not contribute in the limit. Second, $f\qty(\frac{X(t_i) + X(t_{i+1})}{2})$ and $\frac{f(X(t_i)) + f(X(t_{i+1}))}{2}$ differ at the second-order Taylor term by $\frac{1}{8} f’’ (\dd X_i)^2 = O(\dd t_i)$, so multiplying by $\dd W_i$ makes each term $O(N^{-3/2})$, and even summing all $N$ of them gives $O(N^{-1/2}) \rightarrow 0$.
Itô–Stratonovich conversion
Because the Stratonovich integral uses the midpoint, half of the change of $X$ over the interval is already reflected in the integrand. Taylor expanding the midpoint definition,
\begin{align} f(X(t^\star_i)) &\approx f(X(t_i)) + \frac{\partial f}{\partial x}(X(t_i)) \qty(X(t^\star_i) - X(t_i)) \notag \newline X(t^\star_i) - X(t_i) &\approx \sigma(X(t_i), t_i) \qty(W(t^\star_i) - W(t_i)) \notag \end{align}
and from the properties of Brownian motion,
\begin{equation} \mathbb{E}\qty[\qty(W(t^\star_i) - W(t_i))\qty(W(t_{i+1}) - W(t_i))] = t^\star_i - t_i = \frac{\dd t_i}{2} \notag \end{equation}
so exactly half of an extra $\dd t$ term appears compared with the Itô integral. That is,
\begin{equation} \int_0^T f(X(t)) \circ \dd W(t) = \int_0^T f(X(t)) \dd W(t) + \frac{1}{2} \int_0^T \frac{\partial f}{\partial x}(X(t))\, \sigma(X(t), t) \dd t \label{eq: ito stratonovich conversion} \end{equation}
As the simplest example, take $f(x) = x$ and $X = W$. The Stratonovich integral telescopes perfectly in its trapezoidal form.
\begin{align} \int_0^T W \circ \dd W &= \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} \frac{W_{i+1} + W_i}{2} (W_{i+1} - W_i) = \lim_{N \rightarrow \infty} \sum_{i=0}^{N-1} \frac{W_{i+1}^2 - W_i^2}{2} = \frac{W(T)^2}{2} \notag \newline \int_0^T W \dd W &= \frac{W(T)^2}{2} - \frac{T}{2} \notag \end{align}
Note that the Stratonovich result agrees exactly with $\int x \dd x = x^2/2$, what we expect from ordinary calculus.
Chain rule
Using the Itô–Stratonovich conversion, let us show that the ordinary chain rule holds as-is in Stratonovich calculus. Suppose $X(t)$ follows the Stratonovich SDE
\begin{equation} \dd X = b(X, t) \dd t + \sigma(X, t) \circ \dd W \notag \end{equation}
By Eq.(\ref{eq: ito stratonovich conversion}), this is equivalent in Itô notation to
\begin{equation} \dd X = \qty[b + \frac{1}{2} \sigma \frac{\partial \sigma}{\partial x}] \dd t + \sigma \dd W \notag \end{equation}
Applying Itô’s lemma gives
\begin{equation} \dd f = \frac{\partial f}{\partial t} \dd t + \frac{\partial f}{\partial x} \qty[b + \frac{1}{2}\sigma \frac{\partial \sigma}{\partial x}] \dd t + \frac{\partial f}{\partial x} \sigma \dd W + \frac{1}{2} \frac{\partial^2 f}{\partial x^2} \sigma^2 \dd t \notag \end{equation}
Now let us convert the remaining Itô term $\frac{\partial f}{\partial x} \sigma \dd W$ back to Stratonovich notation. Applying Eq.(\ref{eq: ito stratonovich conversion}) to $\frac{\partial f}{\partial x}\sigma$,
\begin{equation} \frac{\partial f}{\partial x} \sigma \dd W = \frac{\partial f}{\partial x} \sigma \circ \dd W - \frac{1}{2}\frac{\partial^2 f}{\partial x^2} \sigma^2 \dd t - \frac{1}{2}\frac{\partial f}{\partial x} \frac{\partial \sigma}{\partial x} \sigma \dd t \notag \end{equation}
and substituting this back, all the $\dd t$ terms cancel, giving
\begin{equation} \dd f = \frac{\partial f}{\partial t} \dd t + \frac{\partial f}{\partial x} \circ \dd X \label{eq: stratonovich chain rule} \end{equation}
That is, the correction term $\frac{1}{2} \partial_x^2 f \sigma^2 \dd t$ that appeared in Itô calculus disappears, and the chain rule holds in exactly the same form as in ordinary calculus.
Intuitively speaking, in the left endpoint rule $f(X_i)$ and $\dd W_i$ are independent, so the $(\dd W)^2 \sim \dd t$ term survives wholesale as a correction. In the midpoint rule, the integrand already “pre-reflects” half of the change over the interval, and that amount exactly matches the size of the Itô correction term, so they cancel each other.
Of course, this is not free. The Stratonovich integral is a non-adapted definition — it refers to part of the future — so it loses the Martingale property. Hence Itô notation is convenient for computing expectations and for numerical simulation, while Stratonovich notation is convenient for coordinate changes and geometric structure. In practice, one simply moves between the two notations via Eq.(\ref{eq: ito stratonovich conversion}) as needed.
Why Stratonovich calculus is more useful in Riemannian Diffusion Model
Let us now return to the original question. Why does the Riemannian Diffusion Model use Stratonovich notation, as in Eq.(\ref{eq: stratonovich sde example})?
Coordinate-free (covariant) notation
There is no global coordinate system on a manifold $\mathcal{M}$. We cover it with several charts and move between them via transition maps. Therefore, an SDE that is well defined on a manifold must preserve its form under coordinate changes. Consider a diffeomorphism $y = \varphi(x)$ between two charts. Applying Eq.(\ref{eq: stratonovich chain rule}) to the Stratonovich SDE $\dd X = \sum_k V_k(X) \circ \dd Z_k$ gives
\begin{equation} \dd Y = D\varphi(X) \circ \dd X = \sum_k \qty(\varphi_\star V_k)(Y) \circ \dd Z_k \notag \end{equation}
so the form is preserved in the new coordinates, and the coefficients transform as the pushforward $\varphi_\star V_k$ of the vector fields. In other words, $V_k$ is meaningful as a coordinate-independent vector field.
In Itô notation, by contrast, the chain rule correction produces an extra term $\frac{1}{2}\sum_k D^2\varphi(V_k, V_k) \dd t$. This term involves second derivatives of the transition map, so it does not transform like a tensor. That is, the drift of an Itô SDE is not a vector field and depends on the chart. To define an Itô SDE on a manifold in a coordinate-free way, one must additionally introduce a connection.
Automatic preservation of constraints
When the data lies on a submanifold of $\mathbb{R}^n$ (a sphere, $SO(3)$, a torus, a Stiefel manifold, and so on), in Stratonovich notation $\sum_k V_k(X) \circ \dd Z_k$ is itself a tangent vector at $X$, so as long as the $V_k$ are tangent to the submanifold, the solution never leaves the manifold.
Take the sphere $S^{n-1}$ as an example. With the projection operator $P(x) = I - x x^\top$, consider
\begin{equation} \dd X = P(X) \circ \dd W \notag \end{equation}
Then by the chain rule,
\begin{equation} \dd \qty(X^\top X) = 2 X^\top \circ \dd X = 2 X^\top P(X) \circ \dd W = 0 \notag \end{equation}
so $X^\top X = 1$ is preserved exactly. The computation ends in one line. Writing the same stochastic process in Itô notation via Eq.(\ref{eq: ito stratonovich conversion}) gives
\begin{equation} \dd X = P(X) \dd W - \frac{n-1}{2} X \dd t \notag \end{equation}
where the term $-\frac{n-1}{2}X \dd t$ is a correction coming from the curvature of the sphere. Looking only at the Itô form, it is not at all obvious why a drift toward the origin is needed; in the Stratonovich form, no such term is needed in the first place. In general, choosing the $V_k$ as an orthonormal frame makes this SDE a Brownian motion on the manifold, which is the stochastic development construction of Eells–Elworthy–Malliavin.
Limit of smooth approximations
By the Wong–Zakai theorem, if one approximates Brownian motion by smooth paths $W^\epsilon$, solves the resulting ordinary ODE, and takes the limit $\epsilon \rightarrow 0$, the solution converges to the Stratonovich solution, not the Itô one. Therefore it is Stratonovich that preserves the geometric intuition of “moving along the flow of the vector fields $V_k$”, and this is also why Stratonovich is preferred in physical modeling.
To summarize, the Riemannian Diffusion Model uses Stratonovich notation because (1) it is covariant under coordinate changes, so the forward/reverse processes can be described on the manifold without choosing a coordinate system, (2) manifold constraints are preserved automatically, and (3) the coefficients $V_k$ can be interpreted as purely geometric objects (vector fields) without curvature correction terms. At the implementation stage, when likelihood computation or numerical integration is needed, one can convert to Itô notation via Eq.(\ref{eq: ito stratonovich conversion}), or use discretizations that exploit the manifold structure explicitly, such as geodesic random walks.
References
-
Ho, J., Jain, A., & Abbeel, P. (2020). Denoising Diffusion Probabilistic Models. In Advances in Neural Information Processing Systems (NeurIPS), 33, 6840-6851. ↩
-
Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., & Poole, B. (2021). Score-Based Generative Modeling through Stochastic Differential Equations. In the 9th International Conference on Learning Representations (ICLR 2021). ↩
-
Huang, C.-W., Aghajohari, M., Bose, A. J., Panangaden, P., & Courville, A. (2022). Riemannian Diffusion Models (arXiv:2208.07949). ↩