MVA · Course notes

Stochastic Calculus in Machine Learning: Sampling and Generative Modelling

M2 MVA · Semester 1 · Modelling · 5 ECTS

Contents

Introduction and overview

Module Stochastic Calculus in Machine Learning: Sampling and Generative Modelling
Official title Stochastic calculus in machine learning : sampling and generative modeling
Instructors Alain OLIVIERO-DURMUS (master-mva.com, 2026–2027)
Period Semester 1 · period 1 (28/09/2026 – 08/01/2027)
Credits and volume 5 ECTS · 24 h (lectures 24 h) per the Université Paris-Saclay programme table
Label Modelling · domains on master-mva.com: Theory
Language Not displayed (the master-mva.com description is written in English)
Assessment master-mva.com (“Mode de validation”): written exam; no weighting displayed · Université Paris-Saclay: “Détail renseigné au niveau Élément Constitutif” (details given at the level of the constituent element; not displayed)
Prerequisites master-mva.com (“Prérequis”): “first year level knowledge in statistics and probability” · Université Paris-Saclay: not displayed

Audience: an M2 student with a solid M1 in probability who uses Langevin samplers or diffusion models and wants to know why they work, when they fail, and how to prove it.

Empirical first: the unadjusted Langevin algorithm run on a standard Gaussian with step 0.5 is stable and mixes in a few dozen iterations, yet its samples have variance 1.33 instead of 1, whatever the number of iterations (ch. 7). On a two-mode target the same algorithm never leaves its starting mode, while a diffusion model driven by the exact scores recovers both modes with the right weights (ch. 8). The course explains both observations with one toolbox: Itô calculus.

The course builds stochastic calculus from Brownian motion up to stochastic differential equations, their partial differential equations and their changes of measure, then uses it to analyse two families of modern algorithms: diffusion-based Markov chain Monte Carlo and score-based generative models. It shares its objects with Computational Statistics (Monte Carlo and MCMC), Introduction to Probabilistic Graphical Models and Deep Generative Models and Optimal Transport for Machine Learning (Wasserstein distances), and it prepares Bayesian Machine Learning, Generative Models for Images and Diffusion and Multiscale Models in Artificial Intelligence.

What you will be able to do

Official objectives and syllabus (2026–2027)

The course description on master-mva.com presents stochastic calculus as an essential tool for understanding and justifying modern machine learning techniques, such as the unadjusted Langevin algorithm and diffusion models. The course is an introduction to stochastic calculus and its applications in machine learning, with a particular focus on sampling and generative modelling.

It has two parts. The first covers the fundamentals of Itô calculus, including diffusion processes and their connections to partial differential equations. The second applies stochastic calculus to the analysis of diffusion-based MCMC methods and generative models.

The description states three objectives: present the foundational concepts of stochastic calculus and Itô calculus; develop familiarity with stochastic differential equations and diffusion processes; and apply these tools to the design and analysis of modern methods such as diffusion-based MCMC and generative models. The announced learning outcomes repeat these three points, adding the relevance of stochastic calculus in modern statistics, machine learning and applied contexts.

The description then announces eight lectures, matched item by item below. The Université Paris-Saclay course detail gives the volume (24 h of lectures, 5 ECTS) and no programme items.

Official topic Course section
Part 1: fundamentals of Itô calculus, diffusion processes and their connections to PDEs ch. 1–6
Part 2: applications to diffusion-based MCMC methods and generative models ch. 7–8
Lecture 1: review of fundamental concepts in stochastic processes ch. 0 (conditional expectation, Gaussian vectors, discrete martingales); ch. 1.1 (processes, filtrations, Kolmogorov’s theorems)
Lecture 1: introduction to standard Brownian motion ch. 1.2–1.3: Definition 1.4, existence (Theorem 1.5), invariances and the Markov property (Proposition 1.6), reflection principle (Proposition 1.7)
Lecture 1: properties and path regularity of Brownian motion ch. 1.4: quadratic variation (Theorem 1.8), infinite variation (Corollary 1.9), Hölder regularity and nowhere differentiability (Theorem 1.10)
Lecture 2: introduction to continuous-time martingales ch. 2.1: martingales, stopping times, optional stopping (Theorem 2.4), exit problem (Example 2.5); local martingales in ch. 2.3
Lecture 2: quadratic variation and Doob–Meyer decomposition ch. 2.3–2.4: Proposition 2.10 (finite variation forces constancy), Theorem 2.11 (quadratic variation of a continuous local martingale), Remark 2.12 (the discrete Doob decomposition, with proof, and the general Doob–Meyer theorem), Proposition 2.13
Lecture 2: martingale convergence theorems ch. 2.2: Doob’s inequality (Theorem 2.6), convergence in L^1 and L^2 (Theorem 2.7), Example 2.8
Lecture 3: stochastic integrals with respect to continuous martingales ch. 3.1–3.2 and 3.4: simple integrands, extension to L^2(M) (Theorem 3.4), localisation, semimartingales
Lecture 3: Itô isometry and properties of the Itô integral Proposition 3.2 (Itô isometry), Theorem 3.4 (martingale property, bracket), Proposition 3.5 (Riemann sums), Example 3.6
Lecture 4: Itô’s formula and applications ch. 4.1–4.2: Theorem 4.1, exponential martingales (Proposition 4.2), Lévy’s characterisation (Theorem 4.3)
Lecture 4: solutions to stochastic differential equations ch. 4.3–4.4: strong existence and uniqueness (Theorem 4.5), Ornstein–Uhlenbeck and geometric Brownian motion (Example 4.6), Euler–Maruyama (Theorem 4.7, Example 4.8)
Lecture 4: connections between SDEs and PDEs (Fokker–Planck, Kolmogorov) ch. 4.5: generator (Definition 4.9), Dynkin’s formula (Proposition 4.10), Kolmogorov backward equation and Feynman–Kac (Theorem 4.11), Fokker–Planck equation (Theorem 4.12), invariant law of Langevin (Corollary 4.13)
Lecture 5: Girsanov’s theorem and change of measure ch. 5.1–5.2: Gaussian warm-up, Theorem 5.1, Novikov’s condition (Proposition 5.2)
Lecture 5: Radon–Nikodym derivatives between diffusion laws ch. 5.3: Theorem 5.3, the Kullback–Leibler formula (Corollary 5.4)
Lecture 5: applications to likelihood ratios and importance sampling ch. 5.4: drift estimation (Example 5.5), mutual singularity in the diffusion coefficient, rare-event importance sampling (Example 5.6)
Lecture 6: martingale problem formulation ch. 6.2: Definition 6.3, why the formulation matters
Lecture 6: equivalence between martingale problems and SDEs Theorem 6.4, with a complete proof when the diffusion matrix is invertible
Lecture 6: weak vs. strong solutions ch. 6.1 and 6.3: Definition 6.1, Tanaka’s equation (Example 6.2), Yamada–Watanabe theorems (Theorems 6.5 and 6.6)
Lecture 7: introduction to diffusion models in generative modelling ch. 8.1 and 8.3: forward noising, Tweedie’s formula, denoising score matching (Proposition 8.3, Example 8.6)
Lecture 7: continuous-time perspective on diffusion models ch. 8.2: time reversal (Theorem 8.1), probability-flow ODE (Proposition 8.2)
Lecture 7: sampling guarantees and theoretical underpinnings ch. 8.4: KL decomposition (Theorem 8.4), discretisation and the literature bounds, Example 8.5
Lecture 8: diffusion-based MCMC methods ch. 7.1: sampling problem, overdamped Langevin diffusion, invariance
Lecture 8: unadjusted Langevin algorithm (ULA): analysis and limitations ch. 7.3–7.4: ULA (Definition 7.3), Gaussian bias (Example 7.4), Wasserstein bound (Theorem 7.5), complexity (Corollary 7.6), KL by Girsanov (Proposition 7.7), bias and instability (ch. 7.4, Proposition 7.9), multimodality (Example 8.5)
Lecture 8: overdamped Langevin dynamics and extensions ch. 7.2 (convergence: Theorems 7.1–7.2), ch. 7.4 (MALA, Definition 7.8; tamed ULA) and ch. 7.5 (kinetic Langevin, stochastic gradients, proximal and preconditioned variants)
Topics: complements Introduction to Probabilistic Graphical Models and Deep Generative Models, Computational Statistics, Bayesian Machine Learning and “Modèles génératifs pour l’image” Where this course fits in the programme (links to the four pages)
Topics: focus on the theoretical foundations of widely used MCMC algorithms and generative models, in contrast with neighbouring courses ch. 7–8 prove the guarantees; the neighbouring courses are listed in Where this course fits
Topics: stochastic calculus in models of physics and biology ch. 4.6: Langevin’s model of a Brownian particle and the Einstein relation (Example 4.14), the Wright–Fisher diffusion of population genetics (Example 4.15)
Assessment: written exam Written-exam proposal in the Projects section

Beyond the syllabus, the page adds the reflection principle (ch. 1.3), the strong order of Euler–Maruyama (ch. 4.4), and, in self-study, current research on sampling and diffusion models (ch. 9).

Where this course fits in the programme

Official prerequisites (master-mva.com): “first year level knowledge in statistics and probability”. The material assumes M1 measure-theoretic probability (conditional expectation, Gaussian vectors, modes of convergence), discrete-time martingales, and basic multivariate calculus; ch. 0 restates what is used.

Course outline

Session plan

24 h in class = 8 sessions of 3 h.

The volume is the Université Paris-Saclay programme table (24 h of lectures). The master-mva.com description announces eight lectures, so each session below is one official lecture; this split is a proposal.

The order follows the official one with a single swap: lecture 8 (Langevin dynamics and ULA) is taught before lecture 7 (diffusion models). The forward noising process of a diffusion model is a Langevin diffusion whose convergence is proved in ch. 7, and the comparison of the two samplers on a multimodal target needs ULA first. Level 1 = foundations, 2 = core results, 3 = advanced and research-level material; the level never decreases.

Session Hours Level Content Practice
1 3 h 1 ch. 0 Review: conditional expectation, Gaussian vectors, discrete martingales; ch. 1 Processes, Brownian motion, invariances, reflection principle, quadratic variation and path regularity (official lecture 1) Ex. 1; Example 1.11
2 3 h 1 ch. 2 Martingales and stopping times, optional stopping, Doob’s inequality, convergence, local martingales, quadratic variation and the Doob–Meyer decomposition (lecture 2) Ex. 2; Example 2.5
3 3 h 2 ch. 3 The Itô integral: simple integrands, isometry, extension to L^2(M), localisation, Riemann sums and the Stratonovich integral, semimartingales (lecture 3) Example 3.6
4 3 h 2 ch. 4 Itô’s formula, Lévy’s characterisation, strong solutions, Euler–Maruyama, generator, Kolmogorov and Fokker–Planck equations, models from physics and biology (lecture 4) Ex. 3, 4, 5, 7, 13; Example 4.8
5 3 h 2 ch. 5 Girsanov’s theorem, Novikov’s condition, likelihoods on path space, KL divergence between diffusions, drift estimation, importance sampling (lecture 5) Ex. 8, 9, 10; Example 5.6
6 3 h 2 ch. 6 Weak solutions and Tanaka’s equation, the martingale problem and its equivalence with SDEs, Yamada–Watanabe theorems (lecture 6) Ex. 11
7 3 h 3 ch. 7 Langevin diffusion: Wasserstein and entropy convergence; ULA: bias, Wasserstein and KL bounds, limitations, MALA and extensions (lecture 8) Ex. 6, 14, 17; Example 7.4
8 3 h 3 ch. 8 Diffusion models: forward noising, time reversal, probability-flow ODE, denoising score matching, KL guarantees (lecture 7) Ex. 12, 15, 16; Examples 8.5–8.6

Self-study, outside the 24 h (about 3 h in total): ch. 9 Research directions and open problems — sampling as optimisation, kinetic Langevin and beyond log-concavity, theory of diffusion models, bridges and interpolants, learned samplers (≈ 3 h, with the open-ended parts of Ex. 16–17).

How to study this module

Independent notes These notes reconstruct the official syllabus from public sources; they are not the instructor’s material.

0. Review: conditional expectation, Gaussian vectors and discrete martingales

Stochastic calculus rests on three M1 tools: conditional expectation, Gaussian vectors and discrete-time martingales. This chapter states them in the form used later; background is in the refresher Probability and Statistics for MVA. All random variables live on a probability space (\Omega, \mathcal F, \mathbb P).

0.1 Conditional expectation

Definition 0.1 — Conditional expectation Let \mathcal G \subset \mathcal F be a sub-σ-algebra and X \in L^1. The conditional expectation \mathbb E[X \mid \mathcal G] is the almost surely unique \mathcal G-measurable integrable variable Y such that \mathbb E[X \mathbf 1_A] = \mathbb E[Y \mathbf 1_A] \qquad \text{for all } A \in \mathcal G . For X \in L^2 it is the orthogonal projection of X onto the closed subspace L^2(\Omega, \mathcal G, \mathbb P).

The rules used in every proof:

0.2 Gaussian vectors

Definition 0.2 — Gaussian vector A random vector X \in \mathbb R^d is Gaussian if every linear combination \langle u, X \rangle is a real Gaussian variable (possibly constant). Its law is determined by its mean m and covariance \Sigma, through the characteristic function \mathbb E\, e^{i \langle u, X \rangle} = \exp\Big( i \langle u, m \rangle - \tfrac12\, u^\top \Sigma u \Big). We write X \sim \mathcal N(m, \Sigma).

Proposition 0.3 — Two facts on Gaussian vectors

  1. The components of a Gaussian vector are independent if and only if they are uncorrelated.
  2. If X_n \sim \mathcal N(m_n, \sigma_n^2) converges in L^2 to X, then m_n \to m, \sigma_n^2 \to \sigma^2, and X \sim \mathcal N(m, \sigma^2).

Proof.

  1. If \Sigma is diagonal, the characteristic function factorises into the product of the characteristic functions of the components, which is independence.
  2. Convergence in L^2 implies convergence of the means and variances, and convergence in law. The characteristic functions therefore converge to \exp(ium - u^2\sigma^2/2). ∎

A Gaussian process (X_t)_{t \ge 0} has Gaussian finite-dimensional marginals; its law is fixed by its mean and covariance functions. Fact 2 makes the Wiener integrals of ch. 3 Gaussian.

0.3 Discrete-time martingales

Definition 0.4 — Discrete martingale A filtration is an increasing sequence of σ-algebras (\mathcal F_n)_{n \ge 0}. An adapted integrable sequence (M_n) is a martingale if \mathbb E[M_{n+1} \mid \mathcal F_n] = M_n \qquad \text{for all } n, a submartingale if “\ge” replaces “=”, and a supermartingale if “\le” does. A stopping time is a variable \tau \in \{0, 1, \dots\} \cup \{\infty\} with \{\tau = n\} \in \mathcal F_n for all n.

Theorem 0.5 — Optional stopping, maximal inequality, convergence Let (M_n) be a martingale.

  1. If \tau is a bounded stopping time, then \mathbb E[M_\tau] = \mathbb E[M_0].
  2. (Doob) For \lambda > 0, and for p > 1, \mathbb P\Big(\max_{k \le n} |M_k| \ge \lambda\Big) \le \frac{\mathbb E|M_n|}{\lambda}, \qquad \mathbb E\Big[\max_{k \le n} |M_k|^p\Big] \le \Big(\frac{p}{p-1}\Big)^p \mathbb E |M_n|^p .
  3. If \sup_n \mathbb E|M_n| < \infty, then M_n converges almost surely to an integrable limit. If \sup_n \mathbb E[M_n^2] < \infty, the convergence also holds in L^2.

Proof.

  1. If \tau \le N, write M_\tau = M_0 + \sum_{k < N} \mathbf 1_{\{\tau > k\}} (M_{k+1} - M_k). The event \{\tau > k\} is in \mathcal F_k, so each term has zero mean.

  2. Let A be the event on the left and \tau the first k \le n with |M_k| \ge \lambda (or n).

    By Jensen, |M| is a submartingale. The events A_k = A \cap \{\tau = k\} lie in \mathcal F_k, and |M_k| \ge \lambda on A_k, so \lambda\, \mathbb P(A_k) \le \mathbb E[|M_k| \mathbf 1_{A_k}] \le \mathbb E[|M_n| \mathbf 1_{A_k}]. Summing over k \le n gives \lambda\, \mathbb P(A) \le \mathbb E[|M_n| \mathbf 1_A]. The L^p bound follows by integrating this inequality in \lambda and applying Hölder’s inequality.

  3. The almost-sure statement is Doob’s upcrossing theorem (Revuz and Yor, ch. II). In the L^2 case the increments are orthogonal, so \mathbb E[(M_n - M_m)^2] = \mathbb E[M_n^2] - \mathbb E[M_m^2] for m \le n; this is a Cauchy sequence because \mathbb E[M_n^2] increases to a finite limit. ∎

Key takeaways — chapter 0

  • Conditional expectation is an L^2 projection, with the tower, “taking out what is known” and independence rules.
  • A Gaussian vector is fixed by its mean and covariance; L^2 limits of Gaussian variables are Gaussian.
  • Martingales have constant mean at bounded stopping times, satisfy Doob’s maximal inequality, and converge when bounded in L^1 or L^2.

1. Stochastic processes and Brownian motion

Brownian motion drives every model of the course. This chapter constructs it, lists its symmetries, and proves the property that forces a new calculus: finite quadratic variation but infinite total variation.

1.1 Processes, filtrations and continuity

Definition 1.1 — Process, filtration, adaptedness A stochastic process is a family X = (X_t)_{t \ge 0} of random variables in \mathbb R^d. A filtration (\mathcal F_t)_{t \ge 0} is an increasing family of sub-σ-algebras of \mathcal F, the information available at time t.

  • X is adapted if each X_t is \mathcal F_t-measurable.
  • X is progressively measurable if, for every t, the map (s, \omega) \mapsto X_s(\omega) on [0,t] \times \Omega is measurable for \mathcal B([0,t]) \otimes \mathcal F_t. An adapted process with continuous paths is progressively measurable.
  • Two processes X and Y are modifications of each other if \mathbb P(X_t = Y_t) = 1 for every t, and indistinguishable if \mathbb P(X_t = Y_t \text{ for all } t) = 1.

The finite-dimensional distributions of X are the laws of the vectors (X_{t_1}, \dots, X_{t_n}). Two theorems of Kolmogorov turn them into a process, then into a continuous one.

Theorem 1.2 — Kolmogorov extension A family of finite-dimensional laws that is consistent (marginalising a law of the family gives the law of the family on fewer times) is the family of finite-dimensional distributions of some process.

Theorem 1.3 — Kolmogorov continuity criterion Suppose that for some \alpha, \beta, C > 0, \mathbb E\, |X_t - X_s|^{\alpha} \le C\, |t - s|^{1 + \beta} \qquad \text{for all } s, t \in [0, T]. Then X has a modification with continuous paths, which is moreover γ-Hölder continuous on [0,T] for every \gamma < \beta / \alpha.

Proof idea. On the dyadic grid of mesh 2^{-n}, Markov’s inequality bounds the probability that some increment exceeds 2^{-n\gamma} by C\, 2^{-n(\beta - \alpha\gamma)}, which is summable. By Borel–Cantelli, the Hölder bound holds on the grid for large n; chaining extends it to [0,T] (Revuz and Yor, Theorem I.2.1).

1.2 Brownian motion

Definition 1.4 — Standard Brownian motion A real process B is a standard Brownian motion if B_0 = 0, its paths are continuous, and its increments over disjoint intervals are independent, with B_t - B_s \sim \mathcal N(0,\, t - s) \qquad \text{for } s \le t . Equivalently, B is a continuous centred Gaussian process with covariance \mathrm{Cov}(B_s, B_t) = s \wedge t.

A d-dimensional Brownian motion has d independent standard components. It is an (\mathcal F_t)-Brownian motion if it is adapted and each increment B_t - B_s is independent of \mathcal F_s.

Theorem 1.5 — Existence Standard Brownian motion exists, and its paths are γ-Hölder continuous on every compact interval for every \gamma < 1/2.

Proof. The covariance s \wedge t is positive semi-definite: for times t_1, \dots, t_n and reals u_i, \sum_{i,j} u_i u_j\, (t_i \wedge t_j) = \int_0^\infty \Big( \sum_i u_i \mathbf 1_{[0, t_i]}(r) \Big)^2 dr \ \ge 0 . Theorem 1.2 therefore gives a centred Gaussian process X with this covariance. Its increments are Gaussian with variance t-s, so \mathbb E|X_t - X_s|^{2p} = c_p |t-s|^p for every integer p.

Theorem 1.3 with \alpha = 2p and \beta = p - 1 gives a continuous modification, γ-Hölder for \gamma < (p-1)/(2p). Letting p \to \infty covers every \gamma < 1/2. ∎

Donsker’s theorem is a constructive alternative: if (\xi_k) are i.i.d. with mean 0 and variance 1, the interpolated walk n^{-1/2} \sum_{k \le nt} \xi_k converges in law to B on C([0,1]).

1.3 Invariances, Markov property and reflection

Proposition 1.6 — Invariances and the Markov property Let B be a standard Brownian motion, c > 0 and s \ge 0. Each of the following processes is again a standard Brownian motion:

  • -B_t (symmetry);
  • c^{-1/2} B_{ct} (scaling);
  • B_{s+t} - B_s, which is moreover independent of \sigma(B_r, r \le s) (simple Markov property);
  • t B_{1/t} for t > 0, extended by 0 at t = 0 (time inversion).

Proof. Each process is a centred Gaussian process. For scaling, \mathrm{Cov}(c^{-1/2}B_{cs}, c^{-1/2}B_{ct}) = c^{-1}(cs \wedge ct) = s \wedge t. For time inversion, \mathrm{Cov}(sB_{1/s}, tB_{1/t}) = st\,(1/s \wedge 1/t) = s \wedge t.

Continuity at 0 of t B_{1/t} follows from the law of large numbers B_u / u \to 0 as u \to \infty. The independence in the Markov property holds because the increments after s are uncorrelated with, hence independent of, the values before s (Proposition 0.3). ∎

A stopping time is a random time \tau \in [0, \infty] such that \{\tau \le t\} \in \mathcal F_t for every t: at each time, one knows whether it has already occurred. The hitting time \tau_a = \inf\{t : B_t = a\} is one.

The events known at time \tau form the σ-algebra \mathcal F_\tau of the events A such that A \cap \{\tau \le t\} \in \mathcal F_t for every t (ch. 2.1 studies both notions).

The strong Markov property extends the third item to stopping times: if \tau is an almost surely finite stopping time, then B_{\tau + t} - B_\tau is a Brownian motion independent of \mathcal F_\tau (Revuz and Yor, ch. III.3).

Proposition 1.7 — Reflection principle For a > 0 and t > 0, with S_t = \max_{s \le t} B_s, \mathbb P(S_t \ge a) = 2\, \mathbb P(B_t \ge a) = \mathbb P(|B_t| \ge a).

Proof. Let \tau_a be the first time B reaches a, so that \{S_t \ge a\} = \{\tau_a \le t\} and B_{\tau_a} = a.

By the strong Markov property, B_{\tau_a + u} - a is a Brownian motion independent of \mathcal F_{\tau_a}, and by symmetry it is as likely to be above 0 as below 0 at time u = t - \tau_a. Hence \mathbb P(\tau_a \le t,\ B_t \ge a) = \tfrac12\, \mathbb P(\tau_a \le t). The left side is \mathbb P(B_t \ge a), because B_t \ge a forces \tau_a \le t. ∎

1.4 Path regularity: the quadratic variation

Brownian paths are continuous but rough. One number measures the roughness and governs Itô calculus.

Theorem 1.8 — Quadratic variation of Brownian motion Let \pi_n = \{0 = t_0 < t_1 < \dots < t_{k_n} = t\} be partitions of [0, t] with mesh |\pi_n| \to 0. Then, in L^2, Q_n = \sum_i \big(B_{t_{i+1}} - B_{t_i}\big)^2 \ \longrightarrow\ t . The convergence is almost sure when \sum_n |\pi_n| < \infty, for instance along dyadic partitions.

Proof. Write \Delta_i = B_{t_{i+1}} - B_{t_i} and \delta_i = t_{i+1} - t_i. The variables \Delta_i^2 - \delta_i are independent and centred, and \mathrm{Var}(\Delta_i^2) = 2 \delta_i^2 because \mathbb E[Z^4] = 3 for Z \sim \mathcal N(0,1). Hence \mathbb E\big[(Q_n - t)^2\big] = \sum_i 2\, \delta_i^2 \ \le\ 2t\, |\pi_n| \ \longrightarrow 0 . If \sum_n |\pi_n| < \infty, Chebyshev’s inequality gives \sum_n \mathbb P(|Q_n - t| > \varepsilon) < \infty for each \varepsilon > 0, and Borel–Cantelli gives almost-sure convergence. ∎

Key result — Brownian increments are of size \sqrt{dt} \sum_i \big(B_{t_{i+1}} - B_{t_i}\big)^2 \longrightarrow t, \qquad \text{in short} \qquad (dB_t)^2 = dt .

Corollary 1.9 — Infinite variation Almost surely, the paths of B have infinite total variation on every interval [s, t] with s < t.

Proof. Along dyadic partitions of [s,t], \sum_i \Delta_i^2 \ \le\ \max_i |\Delta_i| \cdot \sum_i |\Delta_i| . The maximum tends to 0 by uniform continuity of the path. If the total variation \sum_i |\Delta_i| stayed bounded, the left side would tend to 0, contradicting Theorem 1.8, which gives the limit t - s > 0. ∎

Hence \int H_s\, dB_s cannot be a pathwise Stieltjes integral, and ch. 3 needs a probabilistic construction.

Theorem 1.10 — Hölder regularity and nowhere differentiability Almost surely, the paths of B are γ-Hölder on compacts for every \gamma < 1/2 (Theorem 1.5), are not 1/2-Hölder, and are nowhere differentiable (Paley, Wiener and Zygmund, 1933).

Proof sketch for nowhere differentiability. If the path had a derivative bounded by K at some s \in [0,1], then for large n three consecutive increments over intervals of length 1/n next to s would be at most 7K/n in absolute value.

Each increment has density at most \sqrt{n/2\pi}, so a fixed position has probability at most (14K/\sqrt{2\pi n})^3. A union bound over the n positions gives O(n^{-1/2}) \to 0.

Example 1.11 — Quadratic and total variation on one simulated path One path on [0,1] with 2^{20} Gaussian increments; both variations along coarser dyadic grids.

import numpy as np

rng = np.random.default_rng(1)
T, n_max = 1.0, 2 ** 20
dB = rng.standard_normal(n_max) * np.sqrt(T / n_max)    # finest increments
B = np.concatenate([[0.0], np.cumsum(dB)])                # one Brownian path on [0, 1]
for k in [4, 8, 12, 16, 20]:
    incr = np.diff(B[:: n_max // 2 ** k])                 # increments on a dyadic grid of 2^k steps
    qv, tv = np.sum(incr ** 2), np.sum(np.abs(incr))
    print(f"2^{k:<2d} steps: quadratic variation {qv:.4f}   total variation {tv:7.1f}")

The quadratic variations, 1.0082, 0.9981, 1.0353, 1.0000 and 0.9971, stay at t = 1 with fluctuations of order \sqrt{2/n}. The total variations, 3.3, 12.8, 52.1, 204.6 and 815.2, grow like \mathbb E \sum_i |\Delta_i| = \sqrt{2n/\pi}, which equals 817 for n = 2^{20}.

Key takeaways — chapter 1

  • Brownian motion is the continuous centred Gaussian process with covariance s \wedge t.
  • It is invariant under symmetry, scaling, time shift and time inversion, and restarts at stopping times; reflection gives the law of its maximum.
  • Its quadratic variation on [0,t] is t: infinite variation, nowhere differentiable paths.

2. Continuous-time martingales

Stochastic integrals are martingales, controlled by martingale inequalities. This chapter transfers ch. 0.3 to continuous time and introduces the quadratic variation process.

From now on, (\mathcal F_t) is a filtration satisfying the usual conditions (it is right-continuous and contains the null sets), and B is an (\mathcal F_t)-Brownian motion.

2.1 Martingales and stopping times

Definition 2.1 — Continuous-time martingale An adapted process M with \mathbb E|M_t| < \infty for all t is a martingale if \mathbb E[M_t \mid \mathcal F_s] = M_s \qquad \text{for all } s \le t . Sub- and supermartingales are defined as in discrete time. Unless stated otherwise, the martingales of this course have continuous paths.

Proposition 2.2 — Three Brownian martingales For every \theta \in \mathbb R, the following processes are martingales: B_t, \qquad B_t^2 - t, \qquad \exp\big(\theta B_t - \tfrac12 \theta^2 t\big).

Proof. Write B_t = B_s + (B_t - B_s), where the increment is independent of \mathcal F_s with law \mathcal N(0, t-s).

  • First moment: \mathbb E[B_t \mid \mathcal F_s] = B_s + 0.
  • Second moment: expanding the square, \mathbb E[B_t^2 \mid \mathcal F_s] = B_s^2 + 2B_s \cdot 0 + (t - s).
  • Exponential: by independence of the increment, \mathbb E[e^{\theta B_t} \mid \mathcal F_s] = e^{\theta B_s}\, \mathbb E\, e^{\theta(B_t - B_s)} = e^{\theta B_s} e^{\theta^2 (t-s)/2}. ∎

Definition 2.3 — Stopping time A random time \tau \in [0, \infty] is a stopping time if \{\tau \le t\} \in \mathcal F_t for every t. Its σ-algebra is \mathcal F_\tau = \{ A \in \mathcal F : A \cap \{\tau \le t\} \in \mathcal F_t \text{ for all } t \}. The first time a continuous adapted process enters a closed set is a stopping time.

Theorem 2.4 — Optional stopping Let M be a continuous martingale and \tau a stopping time.

  1. The stopped process M^\tau_t = M_{t \wedge \tau} is a martingale.
  2. If \tau \le T for a constant T, then \mathbb E[M_\tau] = \mathbb E[M_0].

Proof. The dyadic stopping times \tau_n = 2^{-n} \lceil 2^n \tau \rceil take finitely many values and decrease to \tau. Let N = \lceil T \rceil + 1, so that \tau_n \le N.

For A \in \mathcal F_{\tau_n}, the time equal to \tau_n on A and to N off A is a stopping time of the grid 2^{-n}\mathbb N. Theorem 0.5 applied to it gives M_{\tau_n} = \mathbb E[M_N \mid \mathcal F_{\tau_n}], so the family \{M_{\tau_n}\} is uniformly integrable.

Path continuity gives M_{\tau_n} \to M_\tau, hence part 2. Part 1 follows by applying part 2 to \tau \wedge t and \tau \wedge s on events of \mathcal F_s. ∎

Example 2.5 — Exit of Brownian motion from an interval Let a, b > 0 and let \tau be the exit time of B from (-a, b). Then \mathbb P(B_\tau = b) = \frac{a}{a+b}, \qquad \mathbb E[\tau] = ab .

Proof.

  • Optional stopping for B_t^2 - t at the bounded time \tau \wedge n gives \mathbb E[\tau \wedge n] = \mathbb E[B_{\tau \wedge n}^2] \le \max(a,b)^2. Monotone convergence gives \mathbb E\tau < \infty, so \tau is finite almost surely.
  • Optional stopping for B gives \mathbb E B_{\tau \wedge n} = 0. Since |B_{\tau \wedge n}| \le \max(a,b), dominated convergence gives \mathbb E B_\tau = 0, that is, b\, p - a(1-p) = 0 with p = \mathbb P(B_\tau = b).
  • Similarly \mathbb E \tau = \mathbb E B_\tau^2 = b^2 p + a^2(1-p) = ab. ∎

For a = 1, b = 2: \mathbb P(B_\tau = 2) = 1/3 and \mathbb E\tau = 2. An Euler simulation with step 10^{-3} checks this.

import numpy as np

rng = np.random.default_rng(2)
a, b, dt, n_paths = 1.0, 2.0, 1e-3, 20_000
x, tau = np.zeros(n_paths), np.zeros(n_paths)
alive, t = np.ones(n_paths, dtype=bool), 0.0
while alive.any():                                        # Euler steps until every path has left (-a, b)
    t += dt
    x[alive] += np.sqrt(dt) * rng.standard_normal(alive.sum())
    out = alive & ((x <= -a) | (x >= b))
    tau[out], alive = t, alive & ~out
print(f"P(exit at b) = {np.mean(x >= b):.4f}   (exact a/(a+b) = {a / (a + b):.4f})")
print(f"E[tau]       = {tau.mean():.4f}   (exact ab = {a * b:.4f})")

The run prints 0.3401 and 2.0523. The exit probability is within two standard errors (0.0034) of 1/3. The excess of \mathbb E\tau, four standard errors (0.013), is a discretisation bias: checking the exit only on the grid detects it late, by a time of order \sqrt{dt}.

2.2 Doob’s inequality and convergence

Theorem 2.6 — Doob’s L^2 inequality For a continuous martingale M and t \ge 0, \mathbb E\Big[\sup_{s \le t} M_s^2\Big] \le 4\, \mathbb E\big[M_t^2\big].

Proof. Apply Theorem 0.5 (with p = 2) to the discrete martingale (M_{kt2^{-n}})_{k \le 2^n}. The maximum over the dyadic points increases with n to the supremum over [0,t], by continuity of the paths. Monotone convergence concludes. ∎

Theorem 2.7 — Martingale convergence Let M be a continuous martingale.

  1. If \sup_t \mathbb E|M_t| < \infty, then M_t converges almost surely to an integrable variable M_\infty.
  2. If \sup_t \mathbb E[M_t^2] < \infty, the convergence also holds in L^2, and M_t = \mathbb E[M_\infty \mid \mathcal F_t] \qquad \text{for all } t.
  3. More generally, M_t converges in L^1 if and only if M is uniformly integrable, if and only if M is closed by some integrable M_\infty as in part 2.

Proof idea. Doob’s upcrossing inequality along dyadic times, uniform in the grid, extends to the continuous path, which therefore cannot oscillate forever. Part 2 adds Theorem 2.6 to the L^2 argument of Theorem 0.5 (Revuz and Yor, ch. II.2).

Example 2.8 — Almost-sure convergence without L^1 convergence The martingale Z_t = \exp(B_t - t/2) has \mathbb E Z_t = 1. Yet B_t / t \to 0 almost surely, so the exponent t\,(B_t/t - 1/2) tends to -\infty and Z_t \longrightarrow 0 \quad \text{almost surely}. The limit has mean 0: (Z_t) is not uniformly integrable. This gap returns with Novikov’s condition in ch. 5.

2.3 Local martingales

Stochastic integrals of merely locally square-integrable integrands need not be martingales; localisation names them.

Definition 2.9 — Continuous local martingale An adapted continuous process M is a continuous local martingale if there are stopping times \tau_n \uparrow \infty such that each stopped process M^{\tau_n} - M_0 is a martingale. Such (\tau_n) is a localising sequence; one can always take \tau_n = \inf\{t : |M_t - M_0| \ge n\}.

  • A bounded continuous local martingale is a martingale (dominated convergence).
  • A nonnegative continuous local martingale with M_0 integrable is a supermartingale (Fatou’s lemma).

Proposition 2.10 — Finite variation forces constancy A continuous local martingale whose paths have finite variation on every compact interval is constant: M_t = M_0 for all t, almost surely.

Proof. By localisation, assume M_0 = 0 and that both M and its total variation V_t are bounded by a constant K. For a partition of [0,t], the orthogonality of martingale increments gives \mathbb E[M_t^2] = \mathbb E \sum_i (M_{t_{i+1}} - M_{t_i})^2 \le \mathbb E\Big[ V_t \max_i |M_{t_{i+1}} - M_{t_i}| \Big]. As the mesh tends to 0, the maximum tends to 0 by uniform continuity and stays bounded by 2K. Dominated convergence gives \mathbb E[M_t^2] = 0. ∎

2.4 Quadratic variation and the Doob–Meyer decomposition

For Brownian motion, B^2 - t is a martingale and t is the quadratic variation. This holds for every continuous local martingale.

Theorem 2.11 — Quadratic variation of a continuous local martingale Let M be a continuous local martingale. There is a unique continuous, increasing, adapted process \langle M \rangle with \langle M \rangle_0 = 0 such that M_t^2 - \langle M \rangle_t \quad \text{is a continuous local martingale}. Moreover, for partitions of [0,t] with mesh tending to 0, in probability, \sum_i \big(M_{t_{i+1}} - M_{t_i}\big)^2 \longrightarrow \langle M \rangle_t .

Proof. Uniqueness. Let A and A' both qualify. Their difference A - A' equals (M^2 - A') - (M^2 - A), so it is a continuous local martingale. It also has finite variation and value 0 at time 0.

Proposition 2.10 gives A = A'.

Existence. For bounded M, the sums \sum_i (M_{t_{i+1} \wedge t} - M_{t_i \wedge t})^2 are Cauchy in L^2 as the mesh tends to 0, and M^2 minus each sum is the martingale M_0^2 + 2\sum_i M_{t_i}(M_{t_{i+1}} - M_{t_i}). The limit is continuous and increasing; localisation does the rest (Revuz and Yor, Theorem IV.1.8; Le Gall, Theorem 4.9). ∎

The bracket of two continuous local martingales is defined by polarisation: \langle M, N \rangle = \tfrac14 \big( \langle M + N \rangle - \langle M - N \rangle \big). It is the unique continuous finite-variation process with \langle M, N \rangle_0 = 0 such that MN - \langle M, N \rangle is a local martingale. For a d-dimensional Brownian motion, \langle B^i, B^j \rangle_t = \delta_{ij}\, t.

Remark 2.12 — The Doob–Meyer decomposition In discrete time the decomposition is explicit. An adapted integrable sequence (X_n) is X_n = X_0 + N_n + A_n, with A_n = \sum_{k < n} \mathbb E[X_{k+1} - X_k \mid \mathcal F_k] and N = X - X_0 - A a martingale null at 0. The process A is predictable (A_{n+1} is \mathcal F_n-measurable), and it is increasing exactly when X is a submartingale.

The decomposition is unique, because a predictable martingale null at 0 vanishes. For X = M^2 with M a martingale, A_n is the sum of the conditional variances of the increments, the discrete analogue of \langle M \rangle.

Theorem 2.11 is the continuous case of the Doob–Meyer decomposition: every submartingale of class (D) is uniquely a martingale plus a predictable increasing process null at 0 (Karatzas and Shreve, Theorem 1.4.10). For M^2, that process is \langle M \rangle.

Proposition 2.13 — L^2 martingales and their bracket Let M be a continuous local martingale with M_0 = 0. Then M is a martingale bounded in L^2 if and only if \mathbb E\langle M \rangle_\infty < \infty, and in that case \mathbb E\big[M_\infty^2\big] = \mathbb E\big[\langle M \rangle_\infty\big].

Proof. Let \tau_n localise both M and M^2 - \langle M \rangle, so that \mathbb E[M_{t \wedge \tau_n}^2] = \mathbb E\langle M \rangle_{t \wedge \tau_n}.

If \mathbb E\langle M \rangle_\infty < \infty, Theorem 2.6 bounds \mathbb E \sup_{s \le t} M_{s \wedge \tau_n}^2 by 4\,\mathbb E\langle M \rangle_\infty.

By Fatou, \sup_s |M_s| is square-integrable, so M is a martingale bounded in L^2, and the identity follows by dominated convergence. Conversely, if M is a martingale bounded in L^2, conditional Jensen gives \mathbb E\langle M \rangle_{t \wedge \tau_n} = \mathbb E[M_{t \wedge \tau_n}^2] \le \mathbb E[M_t^2], and monotone convergence bounds \mathbb E\langle M \rangle_\infty. ∎

Key result — the quadratic variation compensates the square M_t^2 - \langle M \rangle_t \ \text{ is a local martingale}, \qquad \langle M \rangle_t = \lim \sum_i \big(M_{t_{i+1}} - M_{t_i}\big)^2 .

Key takeaways — chapter 2

  • Optional stopping holds at bounded stopping times; with B and B^2 - t it solves the exit problem.
  • Doob’s inequality controls the running maximum; L^2-bounded martingales converge and are closed by their limit, but \exp(B_t - t/2) \to 0 has mean 1.
  • A continuous local martingale has a quadratic variation \langle M \rangle compensating M^2; with finite variation, it is constant.

3. The Itô integral

We want to define \int_0^t H_s\, dB_s, the limit of \sum_i H_{t_i} (B_{t_{i+1}} - B_{t_i}), for random integrands H. Corollary 1.9 rules out a pathwise definition. Itô defines the integral as a limit in L^2(\mathbb P), using one exact identity: the Itô isometry.

3.1 Simple integrands and the isometry

Definition 3.1 — Simple process and its integral A simple process is H_s = \sum_{i=0}^{k-1} \xi_i\, \mathbf 1_{(t_i, t_{i+1}]}(s), \qquad 0 = t_0 < t_1 < \dots < t_k, where each \xi_i is bounded and \mathcal F_{t_i}-measurable: the value used on (t_i, t_{i+1}] is known at the left end point. For a continuous local martingale M, its integral is (H \cdot M)_t = \int_0^t H_s\, dM_s = \sum_{i} \xi_i \big( M_{t_{i+1} \wedge t} - M_{t_i \wedge t} \big).

Proposition 3.2 — Itô isometry for simple integrands Let H be simple and M a continuous martingale bounded in L^2. Then H \cdot M is a continuous martingale bounded in L^2, and \mathbb E\Big[ \Big( \int_0^t H_s\, dM_s \Big)^2 \Big] = \mathbb E\Big[ \int_0^t H_s^2\, d\langle M \rangle_s \Big]. For M = B, the right side is \mathbb E \int_0^t H_s^2\, ds.

Proof. Write \Delta_i = M_{t_{i+1} \wedge t} - M_{t_i \wedge t}.

Each term \xi_i \Delta_i has conditional mean 0 given \mathcal F_{t_i}, because \xi_i is known at t_i; so H \cdot M is a martingale.

  • Cross terms vanish: for i < j, \mathbb E[\xi_i \Delta_i \xi_j \Delta_j] = \mathbb E[\xi_i \Delta_i \xi_j\, \mathbb E[\Delta_j \mid \mathcal F_{t_j}]] = 0.
  • Diagonal terms: since M^2 - \langle M \rangle is a martingale, \mathbb E[\Delta_i^2 \mid \mathcal F_{t_i}] = \mathbb E[\langle M \rangle_{t_{i+1} \wedge t} - \langle M \rangle_{t_i \wedge t} \mid \mathcal F_{t_i}].

Taking out \xi_i^2 and summing gives the identity. ∎

Key result — the Itô isometry \mathbb E\Big[ \Big( \int_0^t H_s\, dB_s \Big)^2 \Big] = \mathbb E \int_0^t H_s^2\, ds .

3.2 Extension to square-integrable integrands

Definition 3.3 — The spaces L^2(M) and \mathcal H^2 For a continuous martingale M bounded in L^2, L^2(M) is the space of progressively measurable processes with \| H \|_{L^2(M)}^2 = \mathbb E \int_0^\infty H_s^2\, d\langle M \rangle_s < \infty . \mathcal H^2 is the space of continuous martingales N bounded in L^2 with N_0 = 0, with norm \|N\|_{\mathcal H^2} = (\mathbb E N_\infty^2)^{1/2}.

Theorem 3.4 — The Itô integral Simple processes are dense in L^2(M). The map H \mapsto H \cdot M extends uniquely to a linear isometry from L^2(M) into \mathcal H^2. For H \in L^2(M):

  1. H \cdot M is a continuous martingale, with \mathbb E[(H \cdot M)_t] = 0;
  2. its quadratic variation is \langle H \cdot M \rangle_t = \int_0^t H_s^2\, d\langle M \rangle_s ;
  3. for every continuous local martingale N, \langle H \cdot M, N \rangle = \int H\, d\langle M, N \rangle, and this property characterises H \cdot M.

Proof. Density. Let H be orthogonal in L^2(M) to every simple process, and let X_t = \int_0^t H_s\, d\langle M \rangle_s . Testing against \xi \mathbf 1_{(s,t]} gives \mathbb E[\xi (X_t - X_s)] = 0 for every bounded \mathcal F_s-measurable \xi.

So X is a continuous martingale of finite variation, hence X = 0 by Proposition 2.10, and H = 0 in L^2(M).

Extension. For simple H^n \to H in L^2(M), the integrals H^n \cdot M are Cauchy in \mathcal H^2 by Proposition 3.2. That space is complete: Doob’s inequality (Theorem 2.6) turns L^2 convergence of terminal values into L^2 convergence of suprema, which preserves continuity. The limit does not depend on the sequence.

Properties 1 and 2 pass to the limit from simple processes; property 3 is proved in the same way (Revuz and Yor, Theorem IV.2.2). ∎

Localisation. Let M be a continuous local martingale and H a progressive process such that, almost surely for every t, \int_0^t H_s^2\, d\langle M \rangle_s < \infty . Stopping when this integral or |M| exceeds n reduces the construction to Theorem 3.4.

Then H \cdot M is a continuous local martingale with the same bracket; its mean need not be 0.

For deterministic f \in L^2([0,t]), the Wiener integral \int_0^t f(s)\, dB_s is an L^2 limit of Gaussian variables, hence (Proposition 0.3) \int_0^t f(s)\, dB_s \sim \mathcal N\Big(0, \int_0^t f(s)^2\, ds\Big).

3.3 Riemann sums and the role of the left end point

Proposition 3.5 — Riemann sums Let H be continuous and adapted, and M a continuous local martingale. For partitions of [0,t] with mesh tending to 0, in probability, \sum_i H_{t_i} \big(M_{t_{i+1}} - M_{t_i}\big) \longrightarrow \int_0^t H_s\, dM_s .

Proof. By localisation, assume H, M and \langle M \rangle bounded. The Riemann sum is the integral of the simple process H^\pi = \sum_i H_{t_i} \mathbf 1_{(t_i, t_{i+1}]}. By the isometry, its distance to \int_0^t H\, dM in L^2 is \mathbb E \int_0^t (H^\pi_s - H_s)^2\, d\langle M \rangle_s , which tends to 0 by uniform continuity of H on [0,t] and dominated convergence. ∎

Example 3.6 — \int B\, dB and the Stratonovich integral With \Delta_i = B_{t_{i+1}} - B_{t_i}, the algebraic identity B_{t_i} \Delta_i = \tfrac12 \big( B_{t_{i+1}}^2 - B_{t_i}^2 \big) - \tfrac12 \Delta_i^2 summed over i, together with Proposition 3.5 and Theorem 1.8, gives \int_0^t B_s\, dB_s = \tfrac12 \big( B_t^2 - t \big).

The correction -t/2, absent from ordinary calculus, comes from the quadratic variation; it makes the integral a martingale with mean 0.

With the average \frac12 (B_{t_i} + B_{t_{i+1}}) in place of B_{t_i}, the sum telescopes to \frac12 B_t^2 exactly: the Stratonovich integral. It obeys the ordinary chain rule but is not a martingale; its mean is t/2.

import numpy as np

rng = np.random.default_rng(3)
n, n_paths = 500, 5_000
dB = rng.standard_normal((n_paths, n)) * np.sqrt(1.0 / n)
B = np.hstack([np.zeros((n_paths, 1)), np.cumsum(dB, axis=1)])
ito = np.sum(B[:, :-1] * dB, axis=1)                      # left end points
strat = np.sum(0.5 * (B[:, :-1] + B[:, 1:]) * dB, axis=1) # average of the two end points
B1 = B[:, -1]
print(f"mean |Ito sum - (B_1^2 - 1)/2|   = {np.mean(np.abs(ito - (B1**2 - 1) / 2)):.4f}")
print(f"mean |Strat. sum - B_1^2 / 2|     = {np.mean(np.abs(strat - B1**2 / 2)):.1e}")
print(f"E[Ito integral] = {ito.mean():+.4f}   E[(Ito integral)^2] = {np.mean(ito**2):.4f}  (isometry: 0.5)")
print(f"E[Strat. integral] = {strat.mean():+.4f}")

With 500 steps, the Itô sums differ from (B_1^2 - 1)/2 by 0.025 on average (the error of the discrete quadratic variation); the averaged sums equal B_1^2/2 up to rounding. The Itô integral has empirical mean -0.005 and second moment 0.4945, and the isometry predicts \mathbb E \int_0^1 B_s^2\, ds = \int_0^1 s\, ds = 0.5 . The Stratonovich integral has mean 0.4947, close to t/2 = 0.5.

3.4 Continuous semimartingales

Definition 3.7 — Continuous semimartingale A continuous semimartingale is a process X_t = X_0 + M_t + A_t , where M is a continuous local martingale and A a continuous adapted process of finite variation, both null at 0. By Proposition 2.10, the decomposition is unique.

Its quadratic variation is \langle X \rangle = \langle M \rangle: finite-variation parts do not contribute to sums of squares. Integrals are defined term by term, \int_0^t H_s\, dX_s = \int_0^t H_s\, dM_s + \int_0^t H_s\, dA_s , the second integral being a pathwise Stieltjes integral.

Solutions of SDEs, X_t = X_0 + \int_0^t b_s\, ds + \int_0^t \sigma_s\, dB_s, are continuous semimartingales with \langle X \rangle_t = \int_0^t \sigma_s^2\, ds.

Key takeaways — chapter 3

  • The Itô integral is the L^2 limit of left-point Riemann sums, built on the isometry \mathbb E(\int H\, dB)^2 = \mathbb E \int H^2\, ds.
  • For H \in L^2(M), H \cdot M is a martingale with bracket \int H^2\, d\langle M \rangle; otherwise a local martingale.
  • Left points give the martingale \frac12(B_t^2 - t); averaged points give the Stratonovich integral \frac12 B_t^2.

4. Itô’s formula, stochastic differential equations and their PDEs

This chapter gives the chain rule of stochastic calculus and uses it to solve SDEs, to link their laws to PDEs, and to analyse two classical models of physics and biology.

4.1 Itô’s formula

Theorem 4.1 — Itô’s formula Let X = (X^1, \dots, X^d) be a vector of continuous semimartingales and f \in C^2(\mathbb R^d). Then, almost surely for all t, f(X_t) = f(X_0) + \sum_{i} \int_0^t \partial_i f(X_s)\, dX^i_s + \frac12 \sum_{i,j} \int_0^t \partial_{ij} f(X_s)\, d\langle X^i, X^j \rangle_s . For f \in C^{1,2}([0, \infty) \times \mathbb R^d), the term \int_0^t \partial_s f(s, X_s)\, ds is added.

Proof. Sketch for d = 1. By localisation, X, \langle X \rangle and the variation of the finite-variation part are bounded, so f'' is uniformly continuous on the range of X. On a partition of [0,t], Taylor’s formula gives f(X_{t_{i+1}}) - f(X_{t_i}) = f'(X_{t_i})\, \Delta_i + \tfrac12 f''(\xi_i)\, \Delta_i^2 , with \Delta_i = X_{t_{i+1}} - X_{t_i} and \xi_i between X_{t_i} and X_{t_{i+1}}.

  • The first-order terms form a Riemann sum converging to \int_0^t f'(X_s)\, dX_s (Proposition 3.5).
  • The sums \sum_i f''(X_{t_i}) \Delta_i^2 converge to \int_0^t f''(X_s)\, d\langle X \rangle_s, since squared increments converge to those of \langle X \rangle (Theorem 2.11).
  • The remainder is at most \max_i |f''(\xi_i) - f''(X_{t_i})| \sum_i \Delta_i^2, a vanishing maximum times a bounded sum. ∎

In differential notation, the formula is computed with the multiplication table dt \cdot dt = 0, \qquad dt \cdot dB^i_t = 0, \qquad dB^i_t \cdot dB^j_t = \delta_{ij}\, dt . For instance d(B_t^2) = 2 B_t\, dB_t + dt, which is Example 3.6 again.

Key result — Itô’s formula for a diffusion If dX_t = b_t\, dt + \sigma_t\, dB_t in \mathbb R^d and a_t = \sigma_t \sigma_t^\top, then df(X_t) = \Big( \nabla f(X_t) \cdot b_t + \tfrac12 \operatorname{tr}\big(a_t \nabla^2 f(X_t)\big) \Big) dt + \nabla f(X_t)^\top \sigma_t\, dB_t .

4.2 Two applications

Proposition 4.2 — Stochastic exponential Let M be a continuous local martingale with M_0 = 0. The process \mathcal E(M)_t = \exp\big(M_t - \tfrac12 \langle M \rangle_t\big) solves \mathcal E(M)_t = 1 + \int_0^t \mathcal E(M)_s\, dM_s. It is a positive continuous local martingale, hence a supermartingale.

Proof. Apply Itô’s formula to f(x, y) = e^{x - y/2} and the pair (M, \langle M \rangle), whose second component has finite variation: d\mathcal E(M) = \mathcal E(M)\, dM - \tfrac12 \mathcal E(M)\, d\langle M \rangle + \tfrac12 \mathcal E(M)\, d\langle M \rangle = \mathcal E(M)\, dM . Definition 2.9 gives the supermartingale property. ∎

Theorem 4.3 — Lévy’s characterisation of Brownian motion Let M be a continuous local martingale in \mathbb R^d with M_0 = 0 and \langle M^i, M^j \rangle_t = \delta_{ij}\, t. Then M is an (\mathcal F_t)-Brownian motion.

Proof. Fix u \in \mathbb R^d and let Z_t = \exp\big(i \langle u, M_t \rangle + \tfrac12 |u|^2 t\big). Itô’s formula, applied to real and imaginary parts, gives dZ_t = Z_t \Big( i \langle u, dM_t \rangle + \tfrac12 |u|^2 dt - \tfrac12 \sum_{j,k} u_j u_k\, d\langle M^j, M^k \rangle_t \Big) = i Z_t \langle u, dM_t \rangle . So Z is a local martingale, bounded by e^{|u|^2 T/2} on [0,T], hence a martingale. The identity \mathbb E[Z_t \mid \mathcal F_s] = Z_s reads \mathbb E\big[ e^{i \langle u, M_t - M_s \rangle} \mid \mathcal F_s \big] = e^{-|u|^2 (t-s)/2}. The increment M_t - M_s is therefore independent of \mathcal F_s, with law \mathcal N(0, (t-s) I_d). ∎

Lévy’s theorem recognises Brownian motions in ch. 5 and ch. 6. For moments, the Burkholder–Davis–Gundy inequalities extend Doob’s: for p > 0 and M_0 = 0, \mathbb E \sup_{s \le t} |M_s|^p is comparable to \mathbb E\langle M \rangle_t^{p/2} (Revuz and Yor, Theorem IV.4.1).

4.3 Stochastic differential equations: strong solutions

Definition 4.4 — Strong solution Let b : \mathbb R^d \to \mathbb R^d and \sigma : \mathbb R^d \to \mathbb R^{d \times m} be measurable.

Let B be an m-dimensional (\mathcal F_t)-Brownian motion and \xi an \mathcal F_0-measurable initial value.

A strong solution of dX_t = b(X_t)\, dt + \sigma(X_t)\, dB_t, \qquad X_0 = \xi, is a continuous adapted process with X_t = \xi + \int_0^t b(X_s)\, ds + \int_0^t \sigma(X_s)\, dB_s for all t, almost surely. Pathwise uniqueness holds if two solutions on the same space, with the same B and \xi, are indistinguishable.

Theorem 4.5 — Existence and uniqueness under Lipschitz coefficients (Itô) Assume that for some L and all x, y, |b(x) - b(y)| + \|\sigma(x) - \sigma(y)\|_F \le L\, |x - y| , and that \mathbb E|\xi|^2 < \infty. Then the SDE has a pathwise unique strong solution, and \mathbb E \sup_{t \le T} |X_t|^2 < \infty for every T.

Proof. Fix T. For continuous adapted Y with \mathbb E \sup_{t \le T}|Y_t|^2 < \infty, let \Phi(Y)_t = \xi + \int_0^t b(Y_s)\, ds + \int_0^t \sigma(Y_s)\, dB_s, which has the same integrability (linear growth).

Key estimate. For two such Y, Y', using (x+y)^2 \le 2x^2 + 2y^2, Cauchy–Schwarz on the ds integral, and Doob’s inequality with the isometry on the dB integral: \mathbb E \sup_{s \le t} |\Phi(Y)_s - \Phi(Y')_s|^2 \le K \int_0^t \mathbb E \sup_{u \le s} |Y_u - Y'_u|^2\, ds, \qquad K = 2L^2 (T + 4).

Uniqueness. For two solutions X, X' (localised), \phi(t) = \mathbb E \sup_{s \le t} |X_s - X'_s|^2 satisfies \phi(t) \le K \int_0^t \phi(s)\, ds, so \phi = 0 by Gronwall’s lemma.

Existence. Let X^0 = \xi and X^{n+1} = \Phi(X^n). Iterating the key estimate gives \mathbb E \sup_{s \le T} |X^{n+1}_s - X^n_s|^2 \le C\, \frac{(KT)^n}{n!} . By Markov’s inequality and Borel–Cantelli, X^n converges uniformly on [0,T], almost surely and in L^2, to a continuous adapted X, and the key estimate gives X = \Phi(X). ∎

Example 4.6 — Ornstein–Uhlenbeck process and geometric Brownian motion

Ornstein–Uhlenbeck. Let dX_t = -\theta X_t\, dt + \sigma\, dB_t with \theta > 0. Itô’s formula gives d(e^{\theta t} X_t) = \sigma e^{\theta t} dB_t, hence X_t = e^{-\theta t} X_0 + \sigma \int_0^t e^{-\theta (t-s)}\, dB_s . Given X_0 = x, the Wiener integral is Gaussian (ch. 3.2), so X_t \sim \mathcal N\Big( e^{-\theta t} x,\ \frac{\sigma^2}{2\theta} \big(1 - e^{-2\theta t}\big) \Big) \ \longrightarrow\ \mathcal N\Big(0, \frac{\sigma^2}{2\theta}\Big).

Geometric Brownian motion. Let dX_t = \mu X_t\, dt + \sigma X_t\, dB_t with X_0 > 0. Itô’s formula for \log X_t gives d \log X_t = (\mu - \sigma^2/2)\, dt + \sigma\, dB_t, hence X_t = X_0 \exp\big( (\mu - \tfrac12 \sigma^2)\, t + \sigma B_t \big). By Proposition 2.2, \mathbb E X_t = X_0 e^{\mu t}, yet \frac1t \log X_t \to \mu - \sigma^2/2 almost surely.

With \mu = 0.05 and \sigma = 0.4, the mean grows like e^{0.05 t} while almost every path tends to 0, since \mu - \sigma^2/2 = -0.03.

4.4 The Euler–Maruyama scheme

Simulation replaces the SDE by the recursion, for a step h and k \ge 0, X^h_{k+1} = X^h_k + h\, b(X^h_k) + \sigma(X^h_k) \big( B_{(k+1)h} - B_{kh} \big), \qquad X^h_0 = \xi .

Theorem 4.7 — Strong order one half Under the assumptions of Theorem 4.5, there is a constant C, depending on L, T, \mathbb E|\xi|^2, |b(0)| and \|\sigma(0)\|_F, such that \mathbb E \max_{k \le T/h} \big| X_{kh} - X^h_k \big|^2 \le C\, h .

Proof. Sketch. With \eta(s) = h \lfloor s / h \rfloor, the interpolation \bar X_t = \xi + \int_0^t b(\bar X_{\eta(s)})\, ds + \int_0^t \sigma(\bar X_{\eta(s)})\, dB_s equals X^h_k at t = kh.

  • Over one step, drift and noise move \bar X by O(h) and O(\sqrt h) in L^2: \mathbb E|\bar X_s - \bar X_{\eta(s)}|^2 \le C_1 h.
  • The key estimate of Theorem 4.5, with |b(X_s) - b(\bar X_{\eta(s)})| \le L(|X_s - \bar X_s| + |\bar X_s - \bar X_{\eta(s)}|) and the same for \sigma, gives e(t) \le 2K \int_0^t e(s)\, ds + 2K C_1 T h for e(t) = \mathbb E \sup_{s \le t} |X_s - \bar X_s|^2.
  • Gronwall’s lemma concludes. ∎

The weak error is of order h: |\mathbb E f(X_T) - \mathbb E f(X^h_{T/h})| \le C h for smooth f (Talay and Tubaro, 1990). Sampling cares about the weak error; ch. 7 measures it on the invariant law.

Example 4.8 — Measuring the strong order For geometric Brownian motion the exact solution is known (Example 4.6), so the error is computed path by path, with the same Brownian increments.

import numpy as np

rng = np.random.default_rng(4)
mu, sigma, x0, T = 1.0, 0.8, 1.0, 1.0
n_paths, n_fine = 5_000, 2 ** 10
dW = rng.standard_normal((n_paths, n_fine)) * np.sqrt(T / n_fine)
exact = x0 * np.exp((mu - sigma**2 / 2) * T + sigma * dW.sum(axis=1))   # closed-form GBM at time T
hs, errs = [], []
for k in [2, 4, 6, 8, 10]:
    m = 2 ** k
    incr = dW.reshape(n_paths, m, -1).sum(axis=2)       # the same Brownian path on a coarser grid
    x = np.full(n_paths, x0)
    for j in range(m):                                  # Euler-Maruyama
        x = x + mu * x * (T / m) + sigma * x * incr[:, j]
    hs.append(T / m)
    errs.append(np.sqrt(np.mean((x - exact) ** 2)))
    print(f"h = 2^-{k:<2d}  strong L2 error at T = {errs[-1]:.4f}")
print(f"fitted order: {np.polyfit(np.log(hs), np.log(errs), 1)[0]:.2f}")

The errors are 1.197, 0.521, 0.234, 0.110 and 0.053 for h = 2^{-2}, \dots, 2^{-10}: dividing h by 4 roughly halves the error. The fitted order is 0.56 \approx \tfrac12 .

4.5 Generator, Kolmogorov and Fokker–Planck equations

Here X solves dX_t = b(X_t)\, dt + \sigma(X_t)\, dB_t with Lipschitz coefficients, a = \sigma \sigma^\top, and X^x starts at x.

Definition 4.9 — Generator The generator of the diffusion is the second-order operator \mathcal L f(x) = b(x) \cdot \nabla f(x) + \frac12 \sum_{i,j} a_{ij}(x)\, \partial_{ij} f(x), \qquad f \in C^2 . Its formal adjoint acts on densities: \mathcal L^* p = - \sum_i \partial_i (b_i\, p) + \frac12 \sum_{i,j} \partial_{ij} (a_{ij}\, p) .

Proposition 4.10 — Dynkin’s formula For f \in C^2_c(\mathbb R^d), the process M^f_t = f(X_t) - f(X_0) - \int_0^t \mathcal L f(X_s)\, ds is a martingale. In particular, \frac{d}{dt} \mathbb E f(X_t) = \mathbb E\, \mathcal L f(X_t).

Proof. By Itô’s formula, M^f_t = \int_0^t \nabla f(X_s)^\top \sigma(X_s)\, dB_s, whose integrand is bounded (\nabla f has compact support, \sigma is continuous): a true martingale (Theorem 3.4). ∎

Theorem 4.11 — Kolmogorov backward equation Let g be bounded and continuous, and u(t, x) = \mathbb E\, g(X^x_t). If u \in C^{1,2} with bounded derivatives, then \partial_t u = \mathcal L u, \qquad u(0, \cdot) = g . This regularity holds when b, \sigma and g are smooth with bounded derivatives (Øksendal, Theorem 8.1.1; Pavliotis, ch. 2).

Proof. Fix t. By the Markov property, N_s = u(t - s, X^x_s) = \mathbb E[g(X^x_t) \mid \mathcal F_s] for s \le t is a martingale. Itô’s formula writes N as a local martingale plus \int_0^s (-\partial_t u + \mathcal L u)(t - r, X^x_r)\, dr . This integral is a local martingale of finite variation, hence zero (Proposition 2.10); its continuous integrand vanishes at r = 0, where X^x_0 = x. ∎

With a killing rate V \ge 0, the same proof gives the Feynman–Kac formula: u(t,x) = \mathbb E\big[g(X^x_t)\, e^{-\int_0^t V(X^x_s)\, ds}\big] solves \partial_t u = \mathcal L u - V u.

Theorem 4.12 — Fokker–Planck equation If X_t has a density p_t(x), smooth in (t, x), then \partial_t p_t = \mathcal L^* p_t . A probability density \pi is invariant (if X_0 \sim \pi then X_t \sim \pi for all t) when \mathcal L^* \pi = 0.

Proof. For f \in C^\infty_c, Proposition 4.10 and two integrations by parts give \int f\, \partial_t p_t\, dx = \frac{d}{dt} \int f\, p_t\, dx = \int (\mathcal L f)\, p_t\, dx = \int f\, \mathcal L^* p_t\, dx . There are no boundary terms (f has compact support), and f is arbitrary. ∎

Corollary 4.13 — The overdamped Langevin diffusion Let U \in C^2(\mathbb R^d) with Z = \int e^{-U} dx < \infty, and \pi = e^{-U} / Z. The diffusion dX_t = -\nabla U(X_t)\, dt + \sqrt 2\, dB_t has generator \mathcal L f = \Delta f - \nabla U \cdot \nabla f and leaves \pi invariant. It is reversible: for f, g \in C^2_c, \int g\, \mathcal L f\, d\pi = - \int \nabla f \cdot \nabla g\, d\pi = \int f\, \mathcal L g\, d\pi .

Proof. Here \mathcal L^* p = \nabla \cdot (p \nabla U) + \Delta p = \nabla \cdot (p\, \nabla U + \nabla p). For p = \pi, \nabla \pi = -\pi \nabla U, so the flux \pi \nabla U + \nabla \pi vanishes.

For reversibility, e^{-U}(\Delta f - \nabla U \cdot \nabla f) = \nabla \cdot (e^{-U} \nabla f); one integration by parts against g gives the symmetric form. ∎

Ch. 7 starts here: to sample from \pi \propto e^{-U}, simulate this diffusion.

4.6 Diffusions in physics and biology

The course description stresses models of physics and biology; two classical ones use exactly the tools above.

Example 4.14 — Langevin’s Brownian particle and the Einstein relation A particle of mass m in a fluid at temperature \Theta feels a friction -\gamma V and molecular kicks (Langevin, 1908): m\, dV_t = -\gamma V_t\, dt + \sqrt{2 \gamma k_B \Theta}\, dB_t , with k_B Boltzmann’s constant: an Ornstein–Uhlenbeck process with rate \gamma/m and noise \sqrt{2\gamma k_B \Theta}/m.

  • Its stationary law is \mathcal N(0, k_B \Theta / m) (Example 4.6), the Maxwell distribution: friction and temperature fix the noise (fluctuation–dissipation).
  • At stationarity, \mathrm{Cov}(V_0, V_s) = (k_B \Theta / m)\, e^{-\gamma s / m}, so the position X_t = X_0 + \int_0^t V_s\, ds satisfies \frac{\mathrm{Var}(X_t - X_0)}{t} = \frac2t \int_0^t (t - s)\, \mathrm{Cov}(V_0, V_s)\, ds \ \longrightarrow\ 2D, \qquad D = \frac{k_B \Theta}{\gamma} .

This is Einstein’s relation (1905). With a force -\nabla U and negligible inertia, the position solves \gamma\, dX = -\nabla U(X)\, dt + \sqrt{2\gamma k_B \Theta}\, dB, with invariant law proportional to e^{-U/(k_B\Theta)}: Corollary 4.13 up to units.

Example 4.15 — The Wright–Fisher diffusion of population genetics In a haploid population of N individuals, the frequency of a neutral allele changes by random resampling at each generation. In units of N generations and for large N, it follows dX_t = \sqrt{X_t (1 - X_t)}\, dB_t, \qquad X_0 = x \in (0,1). The coefficient is not Lipschitz at 0 and 1, but Hölder of order 1/2 suffices for pathwise uniqueness (Theorem 6.6).

  • Fixation probability. X is a bounded martingale, absorbed in \{0, 1\} at the time \tau, which is finite because its mean (next item) is finite. Hence \mathbb P(X_\tau = 1) = \mathbb E X_\tau = x (Theorem 2.7).
  • Mean fixation time. By Dynkin’s formula up to \tau, u(x) = \mathbb E_x \tau solves \frac12 x(1-x)\, u'' = -1 with u(0) = u(1) = 0: u(x) = -2\big( x \log x + (1 - x) \log(1 - x) \big).

For x = 1/2, u = 2 \log 2 \approx 1.39: the allele is lost or fixed after about 1.39\, N generations on average.

Key takeaways — chapter 4

  • Itô’s formula is Taylor’s formula to second order with (dB)^2 = dt; it gives stochastic exponentials and Lévy’s characterisation.
  • Lipschitz SDEs have unique strong solutions; Euler–Maruyama has strong order 1/2 and weak order 1.
  • The generator gives Kolmogorov’s backward equation for expectations and the Fokker–Planck equation for densities.
  • The Langevin diffusion leaves \pi \propto e^{-U} invariant and is reversible.

5. Girsanov’s theorem and changes of measure

Changing the drift of a diffusion amounts to reweighting its paths, and Girsanov’s theorem gives the weight. It yields likelihoods for diffusions, importance samplers, and the Kullback–Leibler formula between two diffusions behind the guarantees of ch. 7 and ch. 8.

5.1 Warm-up: shifting a Gaussian

Let Z \sim \mathcal N(0,1) under \mathbb P and define \mathbb Q by d\mathbb Q / d\mathbb P = e^{\theta Z - \theta^2/2}. For every u, \mathbb E_{\mathbb Q}\, e^{iuZ} = e^{-\theta^2/2}\, \mathbb E\, e^{(\theta + iu) Z} = e^{iu\theta - u^2/2}, so Z \sim \mathcal N(\theta, 1) under \mathbb Q. Girsanov’s theorem does this for every increment of a Brownian path, with a shift that may depend on the past.

5.2 Girsanov’s theorem

Theorem 5.1 — Girsanov Let \theta be a progressive process in \mathbb R^d with \int_0^T |\theta_s|^2 ds < \infty almost surely, and Z_t = \exp\Big( \int_0^t \theta_s \cdot dB_s - \frac12 \int_0^t |\theta_s|^2\, ds \Big), \qquad t \le T . If \mathbb E Z_T = 1, then \mathbb Q = Z_T \cdot \mathbb P is a probability measure equivalent to \mathbb P on \mathcal F_T, and W_t = B_t - \int_0^t \theta_s\, ds \quad \text{is a } \mathbb Q\text{-Brownian motion on } [0, T].

Proof.

  1. Z = \mathcal E(\int \theta \cdot dB) is a positive supermartingale (Proposition 4.2); with constant mean \mathbb E Z_T = 1, it is a martingale on [0,T].
  2. Bayes’ rule. \mathbb E_{\mathbb Q}[Y_t \mid \mathcal F_s] = \mathbb E[Z_t Y_t \mid \mathcal F_s] / Z_s, so Y is a \mathbb Q-local martingale when ZY is a \mathbb P-local martingale.
  3. Itô’s product rule, with dZ = Z\, \theta \cdot dB and d\langle Z, B^i \rangle = Z \theta^i dt, gives d(Z W^i) = Z\, dB^i - Z \theta^i dt + W^i dZ + Z \theta^i dt = Z\, dB^i + W^i dZ , a \mathbb P-local martingale. So each W^i is a continuous \mathbb Q-local martingale.
  4. Brackets are limits in probability of sums of products of increments, a notion preserved by \mathbb Q \ll \mathbb P. Hence \langle W^i, W^j \rangle_t = \langle B^i, B^j \rangle_t = \delta_{ij} t under \mathbb Q, and Lévy’s theorem (Theorem 4.3) concludes. ∎

Proposition 5.2 — Novikov’s condition If \mathbb E \exp\Big( \frac12 \int_0^T |\theta_s|^2\, ds \Big) < \infty , then \mathbb E Z_T = 1. In particular this holds when \theta is bounded.

Proof. Bounded case, |\theta| \le K. Write Z_t^2 = \mathcal E(2\theta \cdot B)_t \exp\big(\int_0^t |\theta_s|^2 ds\big) \le e^{K^2 T}\, \mathcal E(2\theta \cdot B)_t. The stochastic exponential is a positive supermartingale, so \mathbb E Z_\tau^2 \le e^{K^2 T} for every stopping time \tau \le T.

Along a localising sequence \tau_n, the variables Z_{\tau_n \wedge T} are bounded in L^2, hence uniformly integrable. Therefore \mathbb E Z_T = \lim_n \mathbb E Z_{\tau_n \wedge T} = 1. The general case is Revuz and Yor, Proposition VIII.1.15. ∎

A condition is needed: with \theta \equiv 1 on [0, \infty), Z_t \to 0 almost surely (Example 2.8), and Z_\infty = 0 is no density.

5.3 Radon–Nikodym derivatives between diffusion laws

Let \mathcal C = C([0,T], \mathbb R^d) with its canonical process \omega_t. For i = 1, 2, let \mathbb P^i be the law on \mathcal C of the solution of dX_t = b_i(t, X)\, dt + dB_t, \qquad X_0 \sim \nu , where the drift b_i(t, \omega) may depend on the path up to time t (it is progressive). Let \mathbb W^\nu be the law of \xi + B with \xi \sim \nu independent of B.

Theorem 5.3 — Likelihood of a diffusion path Assume that the SDEs are well posed in law and that the exponential below has mean 1 under \mathbb W^\nu (for instance, b_i bounded). Then \mathbb P^i is equivalent to \mathbb W^\nu, with \frac{d\mathbb P^i}{d\mathbb W^\nu}(\omega) = \exp\Big( \int_0^T b_i(t, \omega) \cdot d\omega_t - \frac12 \int_0^T |b_i(t, \omega)|^2\, dt \Big). Consequently, d\mathbb P^1 / d\mathbb P^2 is the ratio of the two densities.

Proof. Under \mathbb W^\nu, \omega_t - \omega_0 is a Brownian motion. Let \mathbb Q have the stated density.

By Theorem 5.1 with \theta_t = b_i(t, \omega), the process \omega_t - \omega_0 - \int_0^t b_i(s, \omega)\, ds is a \mathbb Q-Brownian motion. So under \mathbb Q the canonical process solves the SDE with initial law \nu. Uniqueness in law, assumed in the statement, gives \mathbb Q = \mathbb P^i; ch. 6 studies when it holds. ∎

Path-dependent drifts matter: the interpolation of an Euler scheme has drift b(\omega_{kh}) on [kh, (k+1)h), so Theorem 5.3 compares an algorithm with the diffusion it discretises (ch. 7 and ch. 8).

Corollary 5.4 — Kullback–Leibler divergence between two diffusions Under the assumptions of Theorem 5.3, and if \mathbb E_{\mathbb P^1} \int_0^T |b_1 - b_2|^2 dt < \infty, then \mathrm{KL}(\mathbb P^1 \,\|\, \mathbb P^2) = \frac12\, \mathbb E_{\mathbb P^1} \int_0^T \big| b_1(t, X) - b_2(t, X) \big|^2\, dt . If the initial laws differ, \mathrm{KL}(\nu_1 \| \nu_2) is added.

With noise \sigma\, dB_t for a constant invertible \sigma, replace b_1 - b_2 by \sigma^{-1}(b_1 - b_2).

In particular, with noise \sqrt 2\, dB_t, the factor \frac12 becomes \frac14.

Proof. Under \mathbb P^1, d\omega_t = b_1\, dt + dW^1_t with W^1 a \mathbb P^1-Brownian motion. Substituting into the ratio of the densities of Theorem 5.3, \log \frac{d\mathbb P^1}{d\mathbb P^2} = \int_0^T (b_1 - b_2) \cdot dW^1_t + \int_0^T \Big( (b_1 - b_2) \cdot b_1 - \tfrac12 |b_1|^2 + \tfrac12 |b_2|^2 \Big) dt . The second integrand equals \frac12 |b_1 - b_2|^2. The stochastic integral has mean 0 under the integrability assumption (Theorem 3.4). With different initial laws, condition on \omega_0 and use the chain rule of the KL divergence. ∎

Key result — the KL divergence between two diffusions with the same noise \mathrm{KL}\big(\mathrm{Law}(X^1_T) \,\|\, \mathrm{Law}(X^2_T)\big) \le \mathrm{KL}(\mathbb P^1 \| \mathbb P^2) = \frac12\, \mathbb E \int_0^T |b_1 - b_2|^2(t, X^1)\, dt

The inequality on the left is data processing: mapping a path to its value at time T cannot increase the divergence. A drift error along the path thus bounds the error of the final sample.

5.4 Likelihood ratios and importance sampling

Example 5.5 — Estimating the drift of an Ornstein–Uhlenbeck process We observe a continuous path of dX_t = -\theta X_t\, dt + dB_t on [0, T] and want \theta > 0. By Theorem 5.3 with b(x) = -\theta x, the log-likelihood with respect to Wiener measure is \ell_T(\theta) = -\theta \int_0^T X_t\, dX_t - \frac{\theta^2}{2} \int_0^T X_t^2\, dt . It is maximised at \hat\theta_T = - \frac{\int_0^T X_t\, dX_t}{\int_0^T X_t^2\, dt}, \qquad \hat\theta_T - \theta = - \frac{\int_0^T X_t\, dB_t}{\int_0^T X_t^2\, dt} .

The numerator is a martingale with bracket \int_0^T X_t^2\, dt, and the ergodic theorem gives \frac1T \int_0^T X_t^2 dt \to 1/(2\theta). Hence \hat\theta_T \to \theta, and the martingale central limit theorem gives \sqrt T(\hat\theta_T - \theta) \to \mathcal N(0, 2\theta) (Exercise 9).

The diffusion coefficient is different. For dX = \sigma\, dB, one observed path on [0,T] has quadratic variation exactly \sigma^2 T (Theorem 1.8). The laws for two values of \sigma are mutually singular: no likelihood ratio exists, and \sigma is read off a single path without error.

Example 5.6 — Importance sampling of a rare event We estimate, for a = 4, p = \mathbb P\Big(\max_{t \le 1} B_t \ge a\Big) = 2\, \mathbb P(B_1 \ge a) = 6.334 \times 10^{-5} (Proposition 1.7). Crude Monte Carlo with 2 \times 10^4 paths sees the event about once.

Under d\mathbb Q / d\mathbb P = e^{a B_1 - a^2/2}, Theorem 5.1 with \theta \equiv a gives B_t = W_t + a t for a \mathbb Q-Brownian motion W; more than half of the paths now reach a, and p = \mathbb E_{\mathbb Q}\Big[ \mathbf 1_{\{\max_t B_t \ge a\}}\, e^{-a B_1 + a^2/2} \Big].

Paths use a grid of 200 steps. Between two grid values x, y < a, a Brownian bridge reaches a with probability e^{-2(a-x)(a-y)/dt} (reflection principle); a constant drift does not change the bridge, so this removes the discretisation bias.

import numpy as np
from scipy.stats import norm

rng = np.random.default_rng(5)
a, n, n_paths = 4.0, 200, 20_000
dt = 1.0 / n
# Crude Monte Carlo of P(B_1 > a): about 0.6 successes expected
crude = np.mean(rng.standard_normal(n_paths) > a)
# Importance sampling: simulate under Q, where B_t = W_t + a t, and reweight by dP/dQ
dB = a * dt + np.sqrt(dt) * rng.standard_normal((n_paths, n))
B = np.hstack([np.zeros((n_paths, 1)), np.cumsum(dB, axis=1)])
w = np.exp(-a * B[:, -1] + a**2 / 2)                       # Girsanov weight on F_1
x0, x1 = B[:, :-1], B[:, 1:]
p_cross = np.where((x0 < a) & (x1 < a), np.exp(-2 * (a - x0) * (a - x1) / dt), 1.0)
hit = 1 - np.prod(1 - p_cross, axis=1)                      # P(the bridge reaches a | grid values)
for name, est, exact in [("P(B_1 > a)      ", w * (B[:, -1] > a), norm.sf(a)),
                         ("P(max B_t >= a) ", w * hit, 2 * norm.sf(a))]:
    m, se = est.mean(), est.std() / np.sqrt(n_paths)
    print(f"{name} IS = {m:.4e} +/- {1.96 * se:.1e}   exact = {exact:.4e}")
print(f"crude Monte Carlo of P(B_1 > a) with {n_paths} draws: {crude:.1e}")

The importance-sampling estimates, with 95 % half-widths, are 3.226 \times 10^{-5} \pm 0.093 \times 10^{-5} for \mathbb P(B_1 > 4) (exact 3.167 \times 10^{-5}) and 6.363 \times 10^{-5} \pm 0.27 \times 10^{-5} for the maximum (exact 6.334 \times 10^{-5}).

Crude Monte Carlo returns 0; it would need about 10^8 draws for the same 3 % precision.

The zero-variance change of measure is the conditional law given the event: a diffusion whose extra drift is the gradient of the log-probability of the event given the current state (a Doob h-transform). The reverse drift of diffusion models (ch. 8) has the same structure.

Key takeaways — chapter 5

  • Reweighting by \mathcal E(\int \theta \cdot dB)_T adds the drift \int \theta\, ds to Brownian motion, if the exponential has mean 1 (Novikov).
  • Same noise, different drifts: equivalent laws with an explicit density; different noise levels: mutually singular laws.
  • The KL divergence between two such diffusions is half the integrated squared drift difference; it bounds the KL of the marginals.
  • Likelihood ratios give drift estimators; drift changes give importance samplers.

6. Martingale problems, weak and strong solutions

Theorem 4.5 builds a solution from a given Brownian motion, but some equations have no such solution. This chapter separates what a solution is from how it is built: weak solutions, the martingale problem of Stroock and Varadhan, and the Yamada–Watanabe theorems.

6.1 Weak solutions and Tanaka’s equation

Definition 6.1 — Weak solution, uniqueness in law A weak solution of dX_t = b(X_t)\, dt + \sigma(X_t)\, dB_t with initial law \mu is a filtered probability space carrying a Brownian motion B and a continuous adapted X with X_0 \sim \mu that satisfy the integral equation. The space and the Brownian motion are part of the solution.

  • Uniqueness in law holds if all weak solutions with initial law \mu have the same law on C([0, \infty), \mathbb R^d).
  • Pathwise uniqueness (Definition 4.4) compares two solutions on the same space with the same B and the same X_0.

Example 6.2 — Tanaka’s equation Let \mathrm{sgn}(x) = 1 for x > 0 and -1 for x \le 0, and consider dX_t = \mathrm{sgn}(X_t)\, dB_t, \qquad X_0 = 0 .

  • Weak existence. For a Brownian motion X, B_t = \int_0^t \mathrm{sgn}(X_s)\, dX_s has bracket t, so it is a Brownian motion (Lévy), and dX = \mathrm{sgn}(X)\, dB since \mathrm{sgn}^2 = 1.

  • Uniqueness in law. Every solution is a continuous local martingale with bracket t: a Brownian motion.

  • No pathwise uniqueness. -X solves the equation with the same B: the signs differ only on the Lebesgue-null set of times where X_t = 0.

  • No strong solution. Tanaka’s formula extends Itô’s formula to the function |x|, by smoothing it: |X_t| = \int_0^t \mathrm{sgn}(X_s)\, dX_s + L_t, \qquad L_t = \lim_{\varepsilon \to 0} \frac{1}{2\varepsilon} \int_0^t \mathbf 1_{\{|X_s| < \varepsilon\}}\, ds . The local time L measures the time that X spends near 0 (Revuz and Yor, ch. VI.1). The integral is B_t, so B_t = |X_t| - L_t is a functional of |X|.

    The sign of X, independent of |X|, is therefore not a function of B: it is extra randomness (Revuz and Yor, ch. IX.1).

Weak existence and uniqueness in law can thus hold without strong existence; for sampling, only the law matters.

6.2 The martingale problem

By Dynkin’s formula (Proposition 4.10), f(X_t) - \int_0^t \mathcal L f(X_s)\, ds is a martingale. Stroock and Varadhan made this the definition of a diffusion with generator \mathcal L.

Definition 6.3 — Martingale problem Let b and a be measurable and locally bounded, with a(x) symmetric non-negative, and let \mathcal L be as in Definition 4.9.

A probability \mathbb P on C([0,\infty), \mathbb R^d) with canonical process X solves the martingale problem \mathrm{MP}(b, a, \mu) if X_0 \sim \mu and, for every f \in C^\infty_c(\mathbb R^d), M^f_t = f(X_t) - f(X_0) - \int_0^t \mathcal L f(X_s)\, ds is a \mathbb P-martingale for the canonical filtration. The problem is well posed if it has exactly one solution for every initial law.

Theorem 6.4 — Martingale problems and weak solutions Let \sigma satisfy \sigma \sigma^\top = a. A probability \mathbb P solves \mathrm{MP}(b, a, \mu) if and only if it is the law of a weak solution of dX = b(X)\, dt + \sigma(X)\, dB with X_0 \sim \mu. In particular, uniqueness in law for the SDE is the same as uniqueness for the martingale problem.

Proof. Weak solution ⇒ martingale problem. This is Dynkin’s formula, whose proof only used Itô’s formula.

Martingale problem ⇒ weak solution, for \sigma invertible. Localise with the exit times \tau_R of balls, so that f(x) = x_i and f(x) = x_i x_j may be used.

  • With f = x_i: the process M = X - X_0 - \int_0^\cdot b(X_s)\, ds is a continuous local martingale, so X is a semimartingale.
  • With f = x_i x_j: the process X^i X^j - \int_0^\cdot (X^i b_j + X^j b_i + a_{ij})(X_s)\, ds is a local martingale. Itô’s product rule writes X^i X^j as a local martingale plus \int (X^i b_j + X^j b_i)\, ds + \langle M^i, M^j \rangle.
  • Subtracting, \langle M^i, M^j \rangle - \int a_{ij}(X_s)\, ds is a local martingale of finite variation, hence zero (Proposition 2.10).
  • Let B = \int \sigma(X_s)^{-1} dM_s. Its brackets are \int \sigma^{-1} a\, \sigma^{-\top} ds = t\, I, so B is a Brownian motion (Theorem 4.3). Finally dX = b(X)\, dt + dM = b(X)\, dt + \sigma(X)\, dB.

If \sigma is degenerate, the same proof works on an enlarged space carrying an independent Brownian motion (Karatzas and Shreve, Proposition 5.4.6). ∎

The formulation pays off in three ways.

6.3 From weak to strong: the Yamada–Watanabe theorems

Theorem 6.5 — Yamada–Watanabe If weak existence and pathwise uniqueness hold, then uniqueness in law holds and there is a strong solution. Moreover the strong solution is a measurable functional of (X_0, B).

Proof idea. Put two weak solutions on one space with a common Brownian motion and initial value, conditionally independent given these. Pathwise uniqueness makes them equal, and a process conditionally independent of itself given (X_0, B) is a function of (X_0, B) (Revuz and Yor, ch. IX.1).

Theorem 6.6 — Pathwise uniqueness with Hölder diffusion coefficient In dimension one, assume that b is Lipschitz and that |\sigma(x) - \sigma(y)| \le h(|x - y|) for an increasing h with h(0) = 0 and \int_{0^+} \frac{du}{h(u)^2} = \infty . Then pathwise uniqueness holds. This covers every \sigma that is Hölder of order 1/2, such as \sqrt{x(1-x)} (Example 4.15) or \sqrt{x} (Feller’s branching diffusion).

Proof. Sketch. Let X, X' be two solutions and \Delta = X - X'.

The divergence of the integral allows one to build smooth even functions \varphi_n with \varphi_n(x) \uparrow |x|, |\varphi_n'| \le 1, and 0 \le \varphi_n''(x) \le 2/(n\, h(|x|)^2) on the support of \varphi_n''. Itô’s formula gives \mathbb E\, \varphi_n(\Delta_t) = \mathbb E \int_0^t \varphi_n'(\Delta_s) (b(X_s) - b(X'_s))\, ds + \frac12 \mathbb E \int_0^t \varphi_n''(\Delta_s) (\sigma(X_s) - \sigma(X'_s))^2\, ds . The second term is at most t/n, because (\sigma(X) - \sigma(X'))^2 \le h(|\Delta|)^2. Letting n \to \infty yields \mathbb E|\Delta_t| \le L \int_0^t \mathbb E|\Delta_s|\, ds, and Gronwall’s lemma gives \Delta = 0 (Yamada and Watanabe, 1971). ∎

Noise can also restore uniqueness. For dX = b(X)\, dt + dB with b bounded measurable, \dot x = b(x) may have many solutions, yet the SDE has a unique strong solution (Zvonkin, 1974, in dimension one; Veretennikov, 1981). Weak existence already follows from Girsanov’s theorem with \theta = b(X).

Key takeaways — chapter 6

  • A weak solution comes with its own Brownian motion; Tanaka’s equation has weak solutions and uniqueness in law, but no strong solution.
  • A diffusion is a solution of the martingale problem of its generator; this gives existence by compactness, the Markov property, and diffusion limits of Markov chains.
  • Weak existence plus pathwise uniqueness gives a strong solution; in dimension one, Hölder-1/2 noise suffices for pathwise uniqueness.

7. Langevin dynamics and the unadjusted Langevin algorithm

We want samples from a density \pi(x) \propto e^{-U(x)} on \mathbb R^d known up to its normalising constant, such as a Bayesian posterior. This chapter proves that the Langevin diffusion of Corollary 4.13 converges to \pi, discretises it into the unadjusted Langevin algorithm (ULA), and prices the discretisation.

7.1 The sampling problem and the Langevin diffusion

In Bayesian logistic regression with a Gaussian prior of precision \lambda, U(x) = \lambda |x|^2 / 2 + \sum_i \log(1 + e^{-y_i \langle a_i, x \rangle}): the normalising constant is a d-dimensional integral, but \nabla U is cheap.

The overdamped Langevin diffusion is dX_t = -\nabla U(X_t)\, dt + \sqrt 2\, dB_t . It leaves \pi invariant (Corollary 4.13) and, for Lipschitz \nabla U, has a unique strong solution (Theorem 4.5). Write \mu P_t for the law of X_t when X_0 \sim \mu.

Assumption (A). U \in C^2(\mathbb R^d) and, for some 0 < m \le L, its Hessian satisfies m I \preceq \nabla^2 U(x) \preceq L I for all x.

The condition number is \kappa = L / m, and x^\star denotes the minimiser of U.

In the logistic example, m \ge \lambda and L \le \lambda + \frac14 \|A\|^2, with A the matrix of rows a_i. Laws are compared in Wasserstein distance, W_2(\mu, \nu) = \inf \big\{ (\mathbb E|X - Y|^2)^{1/2} : X \sim \mu,\ Y \sim \nu \big\}, an infimum over couplings, which is attained.

7.2 Exponential convergence of the diffusion

Theorem 7.1 — Contraction in Wasserstein distance Under (A), for all initial laws \mu, \nu and t \ge 0, W_2(\mu P_t, \nu P_t) \le e^{-mt}\, W_2(\mu, \nu), \qquad \text{in particular} \qquad W_2(\mu P_t, \pi) \le e^{-mt}\, W_2(\mu, \pi).

Proof. Couple (X_0, Y_0) optimally and drive both solutions with the same Brownian motion (synchronous coupling). The noise cancels: d(X_t - Y_t) = -\big(\nabla U(X_t) - \nabla U(Y_t)\big)\, dt . Strong convexity gives \langle \nabla U(x) - \nabla U(y), x - y \rangle \ge m |x - y|^2, so \frac{d}{dt} |X_t - Y_t|^2 \le -2m |X_t - Y_t|^2 and |X_t - Y_t| \le e^{-mt} |X_0 - Y_0|. Take expectations; for the second claim, \nu = \pi is invariant. ∎

Convergence in entropy needs a functional inequality. With the relative Fisher information I(\nu \| \pi) = \int |\nabla \log (d\nu / d\pi)|^2\, d\nu, \pi satisfies a logarithmic Sobolev inequality with constant C_{\mathrm{LS}} if, for all smooth \nu \ll \pi, \mathrm{KL}(\nu \| \pi) \le \frac{C_{\mathrm{LS}}}{2}\, I(\nu \| \pi). By the Bakry–Émery criterion, (A) gives C_{\mathrm{LS}} = 1/m; for the standard Gaussian, C_{\mathrm{LS}} = 1 (Bakry, Gentil and Ledoux, 2014, ch. 5).

Theorem 7.2 — Entropy decay under a log-Sobolev inequality If \pi satisfies a logarithmic Sobolev inequality with constant C_{\mathrm{LS}}, and \mu_t = \mu_0 P_t has a smooth positive density, then \mathrm{KL}(\mu_t \| \pi) \le e^{-2t / C_{\mathrm{LS}}}\, \mathrm{KL}(\mu_0 \| \pi).

Proof. With \pi \propto e^{-U}, the Fokker–Planck equation (Theorem 4.12) can be written \partial_t \mu_t = \nabla \cdot (\mu_t \nabla U) + \Delta \mu_t = \nabla \cdot \Big( \mu_t\, \nabla \log \frac{\mu_t}{\pi} \Big). Since \int \partial_t \mu_t = 0, an integration by parts gives \frac{d}{dt}\, \mathrm{KL}(\mu_t \| \pi) = \int \partial_t \mu_t \, \log \frac{\mu_t}{\pi}\, dx = - \int \Big| \nabla \log \frac{\mu_t}{\pi} \Big|^2 d\mu_t = - I(\mu_t \| \pi). The log-Sobolev inequality turns this into \frac{d}{dt} \mathrm{KL} \le -\frac{2}{C_{\mathrm{LS}}} \mathrm{KL}, and Gronwall’s lemma concludes. ∎

Key result — Langevin dissipates relative entropy \frac{d}{dt}\, \mathrm{KL}(\mu_t \| \pi) = - I(\mu_t \| \pi) \le -\frac{2}{C_{\mathrm{LS}}}\, \mathrm{KL}(\mu_t \| \pi)

Log-Sobolev inequalities survive bounded perturbations of U (Holley and Stroock, 1987), so Theorem 7.2 covers some non-convex potentials. But with two modes separated by a barrier of height \Delta U, C_{\mathrm{LS}} grows like e^{\Delta U}; ch. 8 shows the consequence.

7.3 The unadjusted Langevin algorithm

Definition 7.3 — ULA With step \gamma > 0 and i.i.d. Z_k \sim \mathcal N(0, I_d), ULA is the Euler–Maruyama scheme of the Langevin diffusion: X_{k+1} = X_k - \gamma\, \nabla U(X_k) + \sqrt{2\gamma}\, Z_{k+1}. Its kernel is R_\gamma, and \mu_0 R_\gamma^n is the law of X_n. Without noise, it is gradient descent.

Example 7.4 — The bias of ULA on a Gaussian target Let U(x) = |x|^2 / (2s^2), so \pi = \mathcal N(0, s^2 I_d) and X_{k+1} = (1 - \gamma / s^2) X_k + \sqrt{2\gamma}\, Z_{k+1}. For \gamma < 2 s^2 the chain is stable, with Gaussian stationary law of variance v = (1 - \gamma/s^2)^2 v + 2\gamma per coordinate: v = \frac{s^2}{1 - \gamma / (2 s^2)} = s^2 + \frac{\gamma}{2} + O(\gamma^2).

The chain converges geometrically, but to the wrong law: the bias in W_2 is \sqrt d\, |\sqrt v - s| \approx \sqrt d\, \gamma / (4s), of order \gamma and growing with d. The code compares ULA with its Metropolis-corrected version MALA (Definition 7.8) on \mathcal N(0,1).

import numpy as np

rng = np.random.default_rng(6)
U = lambda x: 0.5 * x**2                                    # target N(0, 1)
grad_U = lambda x: x
n_chains, n_iter = 20_000, 400
for gamma in [0.1, 0.5, 1.0]:
    x_ula = np.zeros(n_chains)
    x_mala = np.zeros(n_chains)
    for _ in range(n_iter):
        x_ula = x_ula - gamma * grad_U(x_ula) + np.sqrt(2 * gamma) * rng.standard_normal(n_chains)
        y = x_mala - gamma * grad_U(x_mala) + np.sqrt(2 * gamma) * rng.standard_normal(n_chains)
        log_q_fwd = -(y - x_mala + gamma * grad_U(x_mala)) ** 2 / (4 * gamma)
        log_q_bwd = -(x_mala - y + gamma * grad_U(y)) ** 2 / (4 * gamma)
        log_r = -U(y) + U(x_mala) + log_q_bwd - log_q_fwd   # Metropolis-Hastings correction
        accept = np.log(rng.uniform(size=n_chains)) < log_r
        x_mala = np.where(accept, y, x_mala)
    print(f"gamma = {gamma:.1f}: Var ULA = {x_ula.var():.3f} (theory {1 / (1 - gamma / 2):.3f})"
          f"   Var MALA = {x_mala.var():.3f}")

The ULA variances are 1.057, 1.321 and 2.056 (predicted 1.053, 1.333, 2.000); the MALA variances, 0.994, 0.994 and 1.001, show no bias.

Theorem 7.5 — Non-asymptotic Wasserstein bound for ULA Under (A) and 0 < \gamma \le 1/L, for every initial law \mu_0 and every n \ge 0, W_2(\mu_0 R_\gamma^n, \pi) \le (1 - m\gamma)^n\, W_2(\mu_0, \pi) + 1.5\, \kappa \sqrt{\gamma d} .

Proof. Let Y be the stationary Langevin diffusion, Y_0 \sim \pi optimally coupled with X_0, and let ULA use its Brownian increments: \sqrt{2\gamma} Z_{k+1} = \sqrt 2 (B_{(k+1)\gamma} - B_{k\gamma}). The error e_k = X_k - Y_{k\gamma} satisfies e_{k+1} = \Big[ e_k - \gamma \big( \nabla U(X_k) - \nabla U(Y_{k\gamma}) \big) \Big] + \int_{k\gamma}^{(k+1)\gamma} \big( \nabla U(Y_s) - \nabla U(Y_{k\gamma}) \big)\, ds .

Contraction. By the mean value theorem, the bracket is (I - \gamma H) e_k with m I \preceq H \preceq L I, and \|I - \gamma H\| \le 1 - m\gamma since \gamma \le 1/L.

Local error. Integration by parts gives \mathbb E_\pi |\nabla U|^2 = \mathbb E_\pi \Delta U \le L d. For s = k\gamma + u, the stationary diffusion satisfies, in L^2 norm, \| Y_s - Y_{k\gamma} \|_{L^2} \le u \sqrt{L d} + \sqrt{2 d u} . Multiplying by L and integrating over u \in [0, \gamma] bounds the L^2 norm of the integral by \delta = L\sqrt{Ld}\, \gamma^2 / 2 + \frac23 L \sqrt{2d}\, \gamma^{3/2} \le 1.5\, L \sqrt d\, \gamma^{3/2}, using \sqrt{L\gamma} \le 1.

Recursion. By Minkowski, \|e_{k+1}\|_{L^2} \le (1 - m\gamma) \|e_k\|_{L^2} + \delta, so \|e_n\|_{L^2} \le (1 - m\gamma)^n \|e_0\|_{L^2} + \delta / (m\gamma). As Y_{n\gamma} \sim \pi, the left side bounds W_2(\mu_0 R_\gamma^n, \pi), and \delta/(m\gamma) \le 1.5\, \kappa \sqrt{\gamma d}. ∎

Such bounds are due to Dalalyan (2017) and Durmus and Moulines (2017, 2019); Dalalyan and Karagulyan (2019) get the constant 1.65 for \gamma \le 2/(m + L). The bias term is of order \gamma^{1/2}, while Example 7.4 shows order \gamma; with a Lipschitz Hessian, a finer analysis recovers order \gamma (Durmus and Moulines, 2019).

Corollary 7.6 — Complexity of ULA Start at the minimiser x^\star; then W_2(\delta_{x^\star}, \pi)^2 = \mathbb E_\pi |X - x^\star|^2 \le d/m, by integration by parts against \langle \nabla U(x), x - x^\star \rangle \ge m|x - x^\star|^2. To reach W_2 \le \varepsilon, it suffices to take \gamma = \min\Big( \frac1L, \frac{\varepsilon^2}{9 \kappa^2 d} \Big), \qquad n \ge \frac{1}{m\gamma} \log \frac{2\sqrt{d/m}}{\varepsilon} . For small \varepsilon, this is n = O\big( \kappa^2 d\, m^{-1} \varepsilon^{-2} \log(d / (m\varepsilon^2)) \big) gradient evaluations.

Girsanov’s theorem gives a second, information-theoretic route, reused in ch. 8.

Proposition 7.7 — KL error of ULA over a finite horizon Let \eta(t) = \gamma \lfloor t / \gamma \rfloor, and let \bar X solve d\bar X_t = -\nabla U(\bar X_{\eta(t)})\, dt + \sqrt 2\, dB_t from \bar X_0 = x, so that \bar X_{k\gamma} = X_k. Let Y be the Langevin diffusion from x. Under (A), for T = n\gamma, \mathrm{KL}\big(\mathrm{Law}(X_n) \,\|\, \mathrm{Law}(Y_T)\big) \le \frac{L^2}{4} \int_0^T \mathbb E \big|\bar X_t - \bar X_{\eta(t)}\big|^2 dt \le \frac{L^2 T}{4} \Big( 2 d \gamma + \gamma^2 \max_{k < n} \mathbb E |\nabla U(X_k)|^2 \Big).

Proof. Both processes have noise \sqrt 2\, dB, with drifts -\nabla U(\omega_{\eta(t)}) (path-dependent) and -\nabla U(\omega_t). Corollary 5.4 with the factor \frac14, data processing, and the Lipschitz bound on \nabla U give the first inequality. For the second, \bar X_t - \bar X_{\eta(t)} = -(t - \eta(t)) \nabla U(X_k) + \sqrt 2 (B_t - B_{\eta(t)}). ∎

With Pinsker’s inequality and Theorem 7.2, this bound of order L^2 T d\gamma gives total-variation guarantees for ULA, as in Dalalyan (2017).

7.4 Limitations

The bias. At fixed step, ULA targets \pi_\gamma \ne \pi. Remedies: decreasing steps (Durmus and Moulines, 2017) or a Metropolis correction.

Definition 7.8 — Metropolis-adjusted Langevin algorithm (MALA) From X_k = x, propose y = x - \gamma \nabla U(x) + \sqrt{2\gamma}\, Z and accept it with probability \alpha(x, y) = \min\Big(1, \frac{\pi(y)\, q(y, x)}{\pi(x)\, q(x, y)}\Big), \qquad q(x, y) \propto \exp\Big( -\frac{|y - x + \gamma \nabla U(x)|^2}{4\gamma} \Big); otherwise stay at x. The chain is \pi-reversible for every \gamma (Roberts and Tweedie, 1996).

MALA is exact, but its step must shrink like d^{-1/3} from a stationary start (Roberts and Rosenthal, 1998).

Instability. The globally Lipschitz gradient of (A) is not a technicality.

Proposition 7.9 — ULA diverges for a quartic potential Let d = 1 and U(x) = x^4/4. The Langevin diffusion is ergodic, yet for every \gamma > 0 and every starting point, ULA satisfies |X_k| \to \infty with positive probability, and \mathbb E X_k^2 \to \infty.

Proof. Here X_{k+1} = X_k - \gamma X_k^3 + \sqrt{2\gamma}\, Z_{k+1}. If \gamma x^2 \ge 4, then |x - \gamma x^3| = |x| (\gamma x^2 - 1) \ge 3|x|.

On E_k = \{\sqrt{2\gamma}\, |Z_{k+1}| \le |X_k|\}, this gives |X_{k+1}| \ge 2 |X_k|. From |X_0| = r \ge 2/\sqrt\gamma, the event \bigcap_k E_k forces |X_k| \ge 2^k r; its probability is at least \prod_k \mathbb P(\sqrt{2\gamma}|Z| \le 2^k r) > 0, the failure probabilities being summable.

From any start, the noise reaches \{|x| \ge 2/\sqrt\gamma\} in one step with positive probability, and X_k^2 \ge 4^k r^2 on the divergence event. ∎

Tamed ULA replaces \gamma \nabla U by \gamma \nabla U / (1 + \gamma |\nabla U|) and is stable (Brosse, Durmus, Moulines and Sabanis, 2019); for superlinear coefficients, Euler moments diverge even as h \to 0 (Hutzenthaler, Jentzen and Kloeden, 2011).

Multimodality. With separated modes, the log-Sobolev constant and the mixing times are exponentially large (ch. 7.2); ch. 8 sidesteps this by learning.

7.5 Extensions of overdamped Langevin dynamics

Key takeaways — chapter 7

  • The Langevin diffusion contracts in W_2 at rate m (synchronous coupling) and dissipates entropy at rate 2/C_{\mathrm{LS}}.
  • ULA converges geometrically to a biased law: bias of order \gamma on Gaussians, at most 1.5\,\kappa\sqrt{\gamma d} in W_2 under (A).
  • Girsanov bounds the KL error of ULA on [0,T] by O(L^2 T d \gamma).
  • ULA fails for superlinear gradients and multimodal targets; MALA and taming are remedies.

8. Diffusion models: generative modelling by time reversal

A diffusion model learns to sample from a data distribution \mu known through samples. It noises the data with a simple diffusion, then runs it backwards in time, which needs the gradient of the log-density of the noisy data: the score. This chapter derives the reverse equation, learns the score, and bounds the error with Girsanov’s theorem.

8.1 The forward noising process

Let \mu be a probability measure on \mathbb R^d with a finite second moment. The forward process is the Ornstein–Uhlenbeck diffusion dX_t = -X_t\, dt + \sqrt 2\, dB_t, \qquad X_0 \sim \mu, \qquad t \in [0, T].

By Example 4.6, with \alpha_t = e^{-t} and \sigma_t^2 = 1 - e^{-2t}, X_t = \alpha_t X_0 + \sigma_t Z, \qquad Z \sim \mathcal N(0, I_d) \text{ independent of } X_0 . For t > 0, the law p_t of X_t has a smooth positive density (a Gaussian convolution). The forward process is the Langevin diffusion with U(x) = |x|^2/2 and invariant law \gamma_d = \mathcal N(0, I_d), whose log-Sobolev constant is 1. Theorem 7.2 gives, for 0 < t_0 < T, \mathrm{KL}(p_T \| \gamma_d) \le e^{-2(T - t_0)}\, \mathrm{KL}(p_{t_0} \| \gamma_d) . The noising forgets the data exponentially fast, whatever \mu. The variance-preserving SDE of Song et al. (2021), dX = -\frac12 \beta(t) X\, dt + \sqrt{\beta(t)}\, dB, is a time change of this process.

8.2 Time reversal

Theorem 8.1 — Reverse-time SDE (Anderson, 1982; Haussmann and Pardoux, 1986) Let X solve dX_t = b(t, X_t)\, dt + \sqrt 2\, dB_t on [0, T], with marginal densities p_t.

Under regularity and integrability conditions on b and p_t, the reversed process Y_t = X_{T - t} is a weak solution of dY_t = \big( -b(T-t, Y_t) + 2\, \nabla \log p_{T-t}(Y_t) \big)\, dt + \sqrt 2\, dW_t, \qquad Y_0 \sim p_T , for a Brownian motion W. For the forward process of ch. 8.1, the reverse drift is y + 2 \nabla \log p_{T-t}(y).

Proof. The marginals match. Write q_t = p_{T-t}. The Fokker–Planck equation of the forward process is \partial_s p_s = -\nabla \cdot (b\, p_s) + \Delta p_s, so \partial_t q_t = \nabla \cdot (b\, p_{T-t}) - \Delta p_{T-t} . For the drift \tilde b = -b + 2 \nabla \log p_{T-t}, and since p \nabla \log p = \nabla p, the Fokker–Planck operator of the reversed equation gives -\nabla \cdot (\tilde b\, q_t) + \Delta q_t = \nabla \cdot (b\, p_{T-t}) - 2 \Delta p_{T-t} + \Delta p_{T-t}, which is the same. The identity of the path laws follows from the same computation on transition densities and uniqueness of the martingale problem (Haussmann and Pardoux, 1986). ∎

Key result — generating data by running the noise backwards dY_t = \big( Y_t + 2\, \nabla \log p_{T-t}(Y_t) \big)\, dt + \sqrt 2\, dW_t, \qquad Y_0 \sim p_T \approx \mathcal N(0, I_d) \quad \Longrightarrow \quad Y_T \sim \mu

Proposition 8.2 — Probability-flow ODE The ordinary differential equation \frac{dx_t}{dt} = b(t, x_t) - \nabla \log p_t(x_t) transports p_0 to p_t: if x_0 \sim p_0, then x_t \sim p_t. Run backwards from x_T \sim p_T, it is a deterministic sampler.

Proof. The law of x_t solves \partial_t \rho = -\nabla \cdot \big( (b - \nabla \log p_t)\, \rho \big), and \rho_t = p_t is the solution since -\nabla \cdot (b\, p_t) + \Delta p_t = \partial_t p_t (Fokker–Planck). ∎

8.3 Learning the score

The reverse SDE needs the unknown \nabla \log p_t. Two identities make it learnable from samples.

Proposition 8.3 — Tweedie’s formula and denoising score matching With X_t = \alpha_t X_0 + \sigma_t Z as in ch. 8.1 and t > 0:

  1. (Tweedie) The score is a conditional expectation: \nabla \log p_t(x) = -\frac{\mathbb E[Z \mid X_t = x]}{\sigma_t} = \frac{\alpha_t\, \mathbb E[X_0 \mid X_t = x] - x}{\sigma_t^2} .
  2. (Vincent, 2011) For every measurable s with \mathbb E|s(X_t)|^2 < \infty, \mathbb E \big| s(X_t) - \nabla \log p_t(X_t) \big|^2 = \mathbb E \Big| s(X_t) + \frac{Z}{\sigma_t} \Big|^2 - C_t , where C_t does not depend on s.

Proof.

  1. Write p_t(x) = \int \varphi_{\sigma_t}(x - \alpha_t y)\, \mu(dy), with \varphi_\sigma the density of \mathcal N(0, \sigma^2 I_d) and \nabla \varphi_\sigma(u) = -\frac{u}{\sigma^2} \varphi_\sigma(u). Differentiating under the integral and dividing by p_t(x) (Bayes’ formula) gives \nabla \log p_t(x) = -\mathbb E[X_t - \alpha_t X_0 \mid X_t = x] / \sigma_t^2, and X_t - \alpha_t X_0 = \sigma_t Z.
  2. By part 1, \nabla \log p_t(X_t) is the orthogonal projection of -Z/\sigma_t onto the L^2 functions of X_t, a space containing s(X_t). Pythagoras gives the identity with C_t = \mathbb E|Z/\sigma_t + \nabla \log p_t(X_t)|^2. ∎

Part 2 replaces an unknown regression target by a known one: a network s_\theta(t, x) minimises \int_{t_0}^T \lambda(t)\, \mathbb E \Big| s_\theta(t, X_t) + \frac{Z}{\sigma_t} \Big|^2 dt over samples of X_0, Z and t. With \lambda(t) = \sigma_t^2 and s_\theta = -\varepsilon_\theta / \sigma_t, this is the noise-prediction loss \mathbb E|\varepsilon_\theta(t, X_t) - Z|^2 of Ho, Jain and Abbeel (2020).

Memorisation. With the empirical measure of n training points and its exact score, p_t is a mixture of n Gaussians and the reverse process ends on the training points. A diffusion model generalises only because its learned score is not the exact empirical score (ch. 9).

8.4 Sampling guarantees

The algorithm replaces p_T by \gamma_d and the score by an estimate \hat s, and stops at a small t_0 > 0, since the score may blow up as t \to 0 for data near a low-dimensional set: d\hat Y_t = \big( \hat Y_t + 2\, \hat s(T - t, \hat Y_t) \big)\, dt + \sqrt 2\, dW_t, \qquad \hat Y_0 \sim \gamma_d, \qquad t \le T - t_0 . Let \hat q be the law of \hat Y_{T - t_0}, the output.

Theorem 8.4 — KL decomposition of the generation error Let \varepsilon_t^2 = \mathbb E_{p_t} |\hat s(t, \cdot) - \nabla \log p_t|^2. Assume that Corollary 5.4 applies to the pair formed by the exact reverse process and the algorithm (for instance, \hat s Lipschitz in x and \int \varepsilon_t^2\, dt < \infty). Then \mathrm{KL}(p_{t_0} \| \hat q) \le \underbrace{e^{-2(T - t_0)}\, \mathrm{KL}(p_{t_0} \| \gamma_d)}_{\text{initialisation}} + \underbrace{\int_{t_0}^T \varepsilon_t^2\, dt}_{\text{score estimation}} .

Proof. Let \mathbb P and \mathbb Q be the laws on [0, T - t_0] of the exact reverse process (Theorem 8.1), started at p_T, and of the algorithm, started at \gamma_d.

Both have noise \sqrt 2\, dW, and their drifts differ by 2(\nabla \log p_{T-t} - \hat s(T-t, \cdot)).

  • Data processing: \mathrm{KL}(p_{t_0} \| \hat q) \le \mathrm{KL}(\mathbb P \| \mathbb Q), by looking only at the final value.
  • Corollary 5.4 with the factor \frac14 and different initial laws: \mathrm{KL}(\mathbb P \| \mathbb Q) = \mathrm{KL}(p_T \| \gamma_d) + \int_0^{T - t_0} \mathbb E \big| \nabla \log p_{T-t}(Y_t) - \hat s(T - t, Y_t) \big|^2 dt .
  • Under \mathbb P, Y_t \sim p_{T-t}; the substitution t \mapsto T - t turns the integral into \int_{t_0}^T \varepsilon_t^2\, dt.
  • The bound on \mathrm{KL}(p_T \| \gamma_d) is that of ch. 8.1. ∎

Three remarks put the theorem in context.

Example 8.5 — Diffusion sampling against ULA on a two-mode target Let d = 1 and \mu = 0.2\, \mathcal N(-3, 0.25) + 0.8\, \mathcal N(3, 0.25). Each p_t is a Gaussian mixture (means \pm 3\alpha_t, variances 0.25\alpha_t^2 + \sigma_t^2) with an exact score.

We run the reverse SDE and the probability-flow ODE from \mathcal N(0,1) (T = 6, 400 Euler steps), and ULA on U = -\log \mu (\gamma = 0.01, 2 000 steps) from the left mode.

import numpy as np

rng = np.random.default_rng(7)
w, m, s = np.array([0.2, 0.8]), np.array([-3.0, 3.0]), np.array([0.5, 0.5])   # data: Gaussian mixture

def score(t, x):
    """Exact score of p_t, the law of e^{-t} X_0 + sqrt(1 - e^{-2t}) Z (forward OU)."""
    al = np.exp(-t)
    v = al**2 * s**2 + 1 - al**2                              # component variances at time t
    logc = np.log(w) - 0.5 * np.log(v) - (x[:, None] - al * m) ** 2 / (2 * v)
    r = np.exp(logc - logc.max(axis=1, keepdims=True))
    r /= r.sum(axis=1, keepdims=True)                         # responsibilities
    return np.sum(r * (al * m - x[:, None]) / v, axis=1)

n, T, N = 10_000, 6.0, 400
h = T / N
y_sde = rng.standard_normal(n)                                # start from N(0, 1), not p_T
y_ode = y_sde.copy()
for k in range(N):
    t = T - k * h                                             # forward time seen by the reverse step
    y_sde = y_sde + h * (y_sde + 2 * score(t, y_sde)) + np.sqrt(2 * h) * rng.standard_normal(n)
    y_ode = y_ode + h * (y_ode + score(t, y_ode))             # probability-flow ODE, Euler step
x_ula = np.full(n, -3.0)                                      # ULA on U = -log p_0, started in the left mode
for _ in range(2_000):
    x_ula = x_ula + 0.01 * score(0.0, x_ula) + np.sqrt(0.02) * rng.standard_normal(n)
for name, y in [("reverse SDE", y_sde), ("prob. flow ODE", y_ode), ("ULA", x_ula)]:
    print(f"{name:15s} weight of the right mode = {np.mean(y > 0):.3f}   "
          f"spread of |y| around 3 = {np.abs(y).std():.3f}")

The reverse SDE and the probability-flow ODE give the right mode weights 0.797 and 0.796 (true 0.8) and spreads 0.517 and 0.507 (true 0.5). ULA samples its starting mode well (spread 0.501), but the right mode gets weight 0.000.

Between the modes, U rises 16.6 nats above the left mode, so the Langevin diffusion needs a time of order e^{16.6} to cross (Kramers’ law), against 20 time units simulated. The diffusion sampler crosses no barrier: the weights are encoded in the score at large t, where p_t is nearly Gaussian.

Example 8.6 — Learning the score by denoising score matching We learn, from samples only, the score of a mixture of three Gaussians in \mathbb R^2 (weights 0.5, 0.3, 0.2; standard deviation 0.3). A small network predicts Z from (X_t, t), is trained for 3 000 Adam steps, and drives the reverse SDE (500 steps, t_0 = 10^{-3}).

import numpy as np
import torch

torch.manual_seed(0)
torch.set_num_threads(1)
means = torch.tensor([[0.0, 2.0], [-1.7, -1.0], [1.7, -1.0]])
weights = torch.tensor([0.5, 0.3, 0.2])

def sample_data(n):                                       # three-component Gaussian mixture in 2D
    idx = torch.multinomial(weights, n, replacement=True)
    return means[idx] + 0.3 * torch.randn(n, 2)

net = torch.nn.Sequential(torch.nn.Linear(3, 128), torch.nn.SiLU(),
                          torch.nn.Linear(128, 128), torch.nn.SiLU(), torch.nn.Linear(128, 2))
opt = torch.optim.Adam(net.parameters(), lr=2e-3)
T, delta = 5.0, 1e-3
for step in range(3_000):                                 # denoising score matching, noise-prediction form
    x0 = sample_data(512)
    t = delta + (T - delta) * torch.rand(512, 1)
    z = torch.randn_like(x0)
    xt = torch.exp(-t) * x0 + torch.sqrt(1 - torch.exp(-2 * t)) * z
    loss = ((net(torch.cat([xt, t], dim=1)) - z) ** 2).sum(dim=1).mean()
    opt.zero_grad()
    loss.backward()
    opt.step()

@torch.no_grad()
def score(t, x):                                          # s_theta(t, x) = -eps_theta(t, x) / sigma_t
    tt = torch.full((x.shape[0], 1), t)
    return -net(torch.cat([x, tt], dim=1)) / np.sqrt(1 - np.exp(-2 * t))

y, N = torch.randn(5_000, 2), 500
ts = np.linspace(T, delta, N + 1)
for k in range(N):                                        # Euler-Maruyama on the reverse SDE
    h = ts[k] - ts[k + 1]
    y = y + h * (y + 2 * score(ts[k], y)) + np.sqrt(2 * h) * torch.randn_like(y)
label = torch.cdist(y, means).argmin(dim=1)
print("final training loss:", round(loss.item(), 3))
print("mode weights:", np.round(torch.bincount(label, minlength=3).numpy() / len(y), 3), "target [0.5 0.3 0.2]")
print("within-mode std:", round((y - means[label]).std().item(), 3), "target 0.3")

The generated mode weights are 0.504, 0.293 and 0.203 (target 0.5, 0.3, 0.2), and the within-mode standard deviation is 0.355 (target 0.3). The excess comes from the score error at small noise levels, where the score varies fastest: the term \int \varepsilon_t^2\, dt of Theorem 8.4.

Key takeaways — chapter 8

  • The forward Ornstein–Uhlenbeck process makes any data distribution nearly Gaussian, exponentially fast in KL.
  • Its time reversal has drift y + 2\nabla \log p_{T-t}(y); the probability-flow ODE has the same marginals.
  • Tweedie’s formula makes the score a conditional expectation of the noise, learned by least squares.
  • By Girsanov, the KL error is at most an e^{-2T} initialisation term plus the integrated score error plus a discretisation term, with no log-concavity of the data.

9. Research directions and open problems

This chapter is for self-study. It surveys active questions around the two applications of the course, with entry points into the literature. The works cited are listed in the References.

9.1 Sampling as optimisation in the space of measures

Jordan, Kinderlehrer and Otto (1998) showed that the Fokker–Planck equation of the Langevin diffusion is the gradient flow of the functional \nu \mapsto \mathrm{KL}(\nu \| \pi) for the Wasserstein distance W_2. Theorem 7.2 is then the statement that this functional decreases along its own gradient flow.

This viewpoint imports convex optimisation into sampling. Wibisono (2018) reads ULA as a forward–flow splitting of this gradient flow, which explains its bias. Durmus, Majewski and Miasojedow (2019) analyse Langevin Monte Carlo as a stochastic convex optimisation algorithm.

Open questions. What is the optimal number of gradient queries to sample a strongly log-concave target to accuracy \varepsilon, and how does it depend on d and \kappa? Upper bounds have improved quickly, while matching lower bounds are known only in restricted settings.

9.2 Beyond overdamped Langevin

9.3 Theory of diffusion models

Open questions. Why do trained models generalise instead of memorising their training set (ch. 8.3)? How should the score be estimated when d is large but the data have low intrinsic dimension? Which guarantees hold for deterministic samplers, which have no noise to correct their errors?

9.4 Bridges, flows and interpolants

Diffusion models transport a Gaussian to the data along a fixed noising path. Other paths are possible.

Open question. Which interpolation minimises the total error, including the learning error, for a given computational budget?

9.5 Sampling with learned diffusions

Key takeaways — chapter 9

  • Langevin dynamics is a Wasserstein gradient flow of the KL divergence; sampling complexity is studied with tools of convex optimisation.
  • Kinetic Langevin, better discretisations and isoperimetric inequalities extend the guarantees of ch. 7; multimodal targets remain hard for local samplers.
  • Diffusion models have KL guarantees under minimal data assumptions; generalisation, low intrinsic dimension and deterministic samplers are open.
  • Bridges, interpolants and learned samplers for unnormalised targets reuse the same toolbox: SDEs, Fokker–Planck equations and Girsanov’s theorem.

Exercises

The exercises are sorted by level: ★ applies the course, ★★ combines results or proves a short statement, ★★★ is open-ended or research-flavoured. Exercises 6, 9, 14, 16 and 17 are computational.

  1. ★ The Brownian bridge. Let \beta_t = B_t - t B_1 for t \in [0,1]. Show that \beta is a centred Gaussian process with \mathrm{Cov}(\beta_s, \beta_t) = s(1-t) for s \le t, and that it is independent of B_1.

    Solution. For s \le t, \mathrm{Cov}(\beta_s, \beta_t) = s - ts - st + st = s(1 - t). Also \mathrm{Cov}(\beta_t, B_1) = t - t = 0. The vector (\beta_{t_1}, \dots, \beta_{t_n}, B_1) is Gaussian, so zero covariance means independence (Proposition 0.3). Hence \beta is Brownian motion conditioned on B_1 = 0, the bridge used in Example 5.6.

  2. ★ Exit from an asymmetric interval. Brownian motion starts at 0, and \tau is its exit time from (-1, 3). Compute \mathbb P(B_\tau = 3) and \mathbb E\tau. Generalise to a start at x \in (-a, b).

    Solution. Example 2.5 with a = 1, b = 3 gives \mathbb P(B_\tau = 3) = \tfrac14, \qquad \mathbb E\tau = 3 . From x, the same two martingales give \mathbb P(B_\tau = b) = (x + a)/(a + b) and \mathbb E\tau = (x + a)(b - x).

  3. ★ Itô’s formula in practice. (a) Compute d(B_t^3), d(t B_t) and d(e^{B_t}). (b) Deduce \mathbb E B_t^4 = 3t^2 from Itô’s formula. (c) Show that \int_0^t s\, dB_s = t B_t - \int_0^t B_s\, ds, and give its law.

    Solution. (a) d(B^3) = 3B^2 dB + 3B\, dt, d(tB) = B\, dt + t\, dB, and d(e^B) = e^B dB + \frac12 e^B dt.

    (b) d(B^4) = 4B^3 dB + 6B^2 dt. The dB integral is a true martingale, since \mathbb E \int_0^t B_s^6\, ds < \infty. Hence \mathbb E B_t^4 = 6 \int_0^t s\, ds = 3t^2.

    (c) Integrate d(tB_t). The left side is a Wiener integral, so \int_0^t s\, dB_s \sim \mathcal N(0, t^3/3).

  4. ★ Covariance of the Ornstein–Uhlenbeck process. Let dX = -\theta X\, dt + \sigma\, dB with X_0 \sim \mathcal N(0, \sigma^2/(2\theta)) independent of B. Show that \mathrm{Cov}(X_s, X_t) = \frac{\sigma^2}{2\theta} e^{-\theta|t-s|}. Deduce the variance of the time average \frac1T \int_0^T X_t\, dt for large T.

    Solution. For s \le t, X_t = e^{-\theta(t-s)} X_s + \sigma \int_s^t e^{-\theta(t-r)} dB_r, and the integral is independent of \mathcal F_s. So \mathrm{Cov}(X_s, X_t) = e^{-\theta(t-s)} \mathrm{Var}(X_s). Then \mathrm{Var}\Big(\frac1T \int_0^T X_t\, dt\Big) = \frac{2}{T^2} \int_0^T (T - u)\, \frac{\sigma^2}{2\theta} e^{-\theta u}\, du \sim \frac{\sigma^2}{\theta^2 T}.

  5. ★ Invariant densities in dimension one. Let dX = b(X)\, dt + \sigma(X)\, dB with \sigma > 0. (a) Show that a density with zero probability flux, -b\pi + \frac12 (\sigma^2 \pi)' = 0, satisfies \mathcal L^* \pi = 0, and solve for \pi.

    (b) Apply this to the Ornstein–Uhlenbeck process and to the Cox–Ingersoll–Ross process dX = (\alpha - \beta X)\, dt + c\sqrt X\, dB on (0, \infty), with \alpha, \beta, c > 0.

    Solution. (a) \mathcal L^* \pi is the derivative of the flux. With g = \sigma^2 \pi, the equation reads g' = (2b/\sigma^2)\, g, so \pi(x) \propto \frac{1}{\sigma(x)^2} \exp\Big( \int_0^x \frac{2 b(y)}{\sigma(y)^2}\, dy \Big). (b) For the Ornstein–Uhlenbeck process this gives e^{-\theta x^2/\sigma^2}, the law \mathcal N(0, \sigma^2/(2\theta)). For the CIR process it gives x^{2\alpha/c^2 - 1} e^{-2\beta x / c^2}: a Gamma law with shape 2\alpha/c^2 and rate 2\beta/c^2.

  6. ★ ULA on a high-dimensional Gaussian (Python). Let \pi = \mathcal N(0, I_d) with d = 100. Run ULA from 0 with \gamma \in \{0.05, 0.1, 0.2\} for 300 iterations on 2 000 parallel chains. Estimate the stationary variance v per coordinate, compute W_2 = \sqrt d\, |\sqrt v - 1|, and compare with Example 7.4 and Theorem 7.5.

    Hints and expected result. Here m = L = 1 and v = 1/(1 - \gamma/2) = 1.026, 1.053, 1.111. The distances are W_2 = 0.127,\ 0.260,\ 0.541, while the bound 1.5 \sqrt{\gamma d} of Theorem 7.5 gives 3.35, 4.74 and 6.71. On Gaussians the bound is pessimistic by an order of magnitude, because the true bias is of order \gamma, not \gamma^{1/2}.

  7. ★★ A strict local martingale. Let B be a Brownian motion in \mathbb R^3 started at x \ne 0; admit that it never hits 0.

    (a) Show that M_t = 1/|B_t| is a continuous local martingale. (b) Show that \mathbb E M_t \to 0, so that M is not a martingale.

    Solution. (a) f(y) = 1/|y| is harmonic on \mathbb R^3 \setminus \{0\}. Itô’s formula, stopped at the hitting times of small spheres around 0 (which tend to infinity), gives M_t = M_0 + \int_0^t \nabla f(B_s) \cdot dB_s.

    (b) For R > 0, split according to |B_t| \ge R or not. The density of B_t is at most (2\pi t)^{-3/2} and \int_{|y| < R} |y|^{-1} dy = 2\pi R^2, so \mathbb E M_t \le 1/R + 2\pi R^2 (2\pi t)^{-3/2}.

    With R = \sqrt t, this is O(t^{-1/2}), while M_0 = 1/|x|. As in Definition 2.9, M is a positive supermartingale, but its mean decreases strictly.

  8. ★★ Kullback–Leibler divergence between two Ornstein–Uhlenbeck processes. Let \mathbb P^i be the law on [0, T] of dX = -\theta_i X\, dt + dB, both started from \mathcal N(0, 1/(2\theta_1)). Show that \mathrm{KL}(\mathbb P^1 \| \mathbb P^2) = \frac{(\theta_1 - \theta_2)^2\, T}{4\theta_1}. For \theta_1 = 1 and \theta_2 = 1.1, how long must the path be for the divergence to reach 1?

    Solution. By Corollary 5.4, the divergence is \frac12 \mathbb E_{\mathbb P^1} \int_0^T (\theta_1 - \theta_2)^2 X_t^2\, dt, and \mathbb E X_t^2 = 1/(2\theta_1) by stationarity under \mathbb P^1. Here the divergence is 0.0025\, T, which reaches 1 at T = 400. Distinguishing two drifts at distance \delta takes a time of order 1/\delta^2, in line with Exercise 9.

  9. ★★ Maximum likelihood for the drift of an Ornstein–Uhlenbeck process (Python). Simulate dX = -\theta X\, dt + dB with \theta = 2, from stationarity, with Euler step 0.01 on [0, T] for T \in \{10, 100, 1000\}, with 200 replications.

    Compute \hat\theta_T of Example 5.5 with sums in place of integrals, compare its spread with \sqrt{2\theta/T}, and prove consistency.

    Hints and expected result. \hat\theta_T - \theta = -M_T / \langle M \rangle_T with M = \int X\, dB. The ergodic theorem gives \langle M \rangle_T / T \to 1/(2\theta), and M_T / \langle M \rangle_T \to 0 almost surely when \langle M \rangle_\infty = \infty (strong law of large numbers for martingales).

    A run gives empirical means 2.17, 2.02 and 2.01, and standard deviations 0.68, 0.197 and 0.063, against \sqrt{2\theta/T} = 0.632, 0.200, 0.063. The excess at T = 10 is a finite-sample bias of the ratio estimator.

  10. ★★ Cameron–Martin and small balls. With h(t) = t on [0, 1], use Girsanov’s theorem to show that \frac{\mathbb P(\sup_{t \le 1} |B_t - t| < \varepsilon)}{\mathbb P(\sup_{t \le 1} |B_t| < \varepsilon)} \longrightarrow e^{-1/2} \qquad (\varepsilon \to 0).

    Solution. Under d\mathbb Q / d\mathbb P = e^{B_1 - 1/2}, W = B - h is a Brownian motion (Theorem 5.1 with \theta \equiv 1).

    Writing \mathbb P in terms of \mathbb Q and then renaming W as B gives \mathbb P\Big(\sup_t |B_t - t| < \varepsilon\Big) = \mathbb E\Big[ \mathbf 1_{\{\sup_t |B_t| < \varepsilon\}}\, e^{-B_1 - 1/2} \Big]. On the event, |B_1| < \varepsilon, so the ratio lies between e^{-1/2 - \varepsilon} and e^{-1/2 + \varepsilon}. The factor e^{-\frac12 \int h'^2} is the energy cost of following the path h.

  11. ★★ Tanaka’s equation in detail. Let X be a Brownian motion and B = \int \mathrm{sgn}(X)\, dX. (a) Prove that \int_0^t \mathbf 1_{\{X_s = 0\}} ds = 0 almost surely, and deduce that \int_0^t \mathbf 1_{\{X_s = 0\}} dX_s = 0.

    (b) Conclude that X and -X both solve dY = \mathrm{sgn}(Y)\, dB.

    Solution. (a) By Fubini, \mathbb E \int_0^t \mathbf 1_{\{X_s = 0\}} ds = \int_0^t \mathbb P(X_s = 0)\, ds = 0. The stochastic integral has bracket \int \mathbf 1_{\{X = 0\}} ds = 0, so it vanishes (Proposition 2.13).

    (b) With the convention \mathrm{sgn}(0) = -1, one has \mathrm{sgn}(-x) = -\mathrm{sgn}(x) - 2 \cdot \mathbf 1_{\{x = 0\}}. Hence \int \mathrm{sgn}(-X)\, dB = -\int \mathrm{sgn}(X)\, dB - 2 \int \mathbf 1_{\{X = 0\}}\, dB = -X - 0.

  12. ★★ Tweedie’s formula for Gaussian data. Let \mu = \mathcal N(m, s^2 I_d) and v_t = \alpha_t^2 s^2 + \sigma_t^2.

    (a) Compute p_t, \nabla \log p_t and \mathbb E[X_0 \mid X_t], and check Proposition 8.3. (b) Compute C_t. (c) What does denoising score matching return over affine functions s(x) = Ax + c?

    Solution. (a) p_t = \mathcal N(\alpha_t m, v_t I_d), \nabla \log p_t(x) = -(x - \alpha_t m)/v_t, and \mathbb E[X_0 \mid X_t = x] = m + \frac{\alpha_t s^2}{v_t} (x - \alpha_t m). Substituting into Tweedie’s formula, and using 1 - \alpha_t^2 s^2 / v_t = \sigma_t^2 / v_t, returns the score.

    (b) By the Pythagorean identity, C_t = \mathbb E|Z|^2/\sigma_t^2 - \mathbb E|\nabla \log p_t(X_t)|^2 = d/\sigma_t^2 - d/v_t.

    (c) The affine class contains the exact score, so the minimiser is A = -I/v_t, c = \alpha_t m / v_t.

  13. ★★ Fixation in the Wright–Fisher diffusion. (a) Check that u(x) = -2(x \log x + (1-x) \log(1-x)) solves \frac12 x(1-x) u'' = -1 with u(0) = u(1) = 0. (b) Compute u(0.1) and interpret it. (c) Prove \mathbb P(X_\tau = 1) = x with Dynkin’s formula.

    Solution. (a) u'(x) = -2 \log\frac{x}{1-x} and u''(x) = -\frac{2}{x(1-x)}. (b) u(0.1) = 0.650: an allele at frequency 10 % disappears or fixes after 0.65\, N generations on average, and it is lost with probability 0.9.

    (c) For f(x) = x, \mathcal L f = 0, so X is a bounded martingale, and optional stopping gives \mathbb E X_\tau = x.

  14. ★★★ ULA beyond Lipschitz gradients (Python). Let U(x) = x^2/2 + x^4/4 on \mathbb R.

    (a) Explain why Theorem 7.5 does not apply and what Proposition 7.9 predicts. (b) Run ULA from 0 with \gamma \in \{0.01, 0.02, 0.05, 0.1\} on 10^4 chains for 10^4 steps. Record the fraction of chains that diverge and the bias of \mathbb E X^2, using quadrature for the exact value. (c) Estimate the order of the bias in \gamma. (d) Repeat with tamed ULA, and discuss.

    Hints and expected result. (a) \nabla U is not globally Lipschitz; from |x| \ge 2/\sqrt\gamma the chain diverges with positive probability. (b) From 0, no chain diverges in practice: the noise almost never reaches 2/\sqrt\gamma \ge 6.3.

    The exact value is \mathbb E_\pi X^2 = 0.4679, and the ULA biases are about +0.003, +0.005, +0.014 and +0.031. Long runs are needed to see them: compute the stationary law of each chain on a grid, or average over chains and iterations.

    (c) The bias is linear in \gamma, about 0.3\gamma, as the weak order 1 of Euler–Maruyama predicts. (d) Taming gives biases of about +0.011, +0.023, +0.061 and +0.134: stability everywhere costs a fourfold larger constant. Open question: design a scheme that is both stable and as accurate as ULA where ULA is stable.

  15. ★★★ Diffusion model on Gaussian data: exact analysis. Let \mu = \mathcal N(0, s^2) in dimension one, with the exact score, the reverse SDE started from \mathcal N(0,1) in continuous time, and t_0 = 0. (a) Show that the output is Gaussian with variance s^2 + \frac{(1 - s^2)\, s^4}{(e^{2T} + s^2 - 1)^2}. (b) For s^2 = 4 and T \in \{1, 2, 3\}, compare \mathrm{KL}(\mu \| \hat q), \mathrm{KL}(p_T \| \gamma_1) and e^{-2T} \mathrm{KL}(\mu \| \gamma_1). (c) Which step of the proof of Theorem 8.4 is loose here?

    Solution. (a) With v_u = 1 + (s^2 - 1)e^{-2u}, the score is -y/v_{T-t}, and the reverse variance solves V' = 2(1 - 2/v_{T-t})V + 2. The deviation from the exact solution is multiplied by \exp\big(2\int_0^T (1 - 2/v_u)\, du\big) = e^{2T} s^4 / (e^{2T} + s^2 - 1)^2, and it starts at 1 - v_T = (1 - s^2) e^{-2T}.

    (b) All laws are centred Gaussians, so each divergence is explicit. For T = 1, 2, 3:

    Quantity T = 1 T = 2 T = 3
    \mathrm{KL}(\mu \Vert \hat q) 3.6 \times 10^{-3} 3.3 \times 10^{-6} 1.3 \times 10^{-9}
    \mathrm{KL}(p_T \Vert \gamma_1) 3.3 \times 10^{-2} 7.3 \times 10^{-4} 1.4 \times 10^{-5}
    e^{-2T}\, \mathrm{KL}(\mu \Vert \gamma_1) 0.109 0.015 0.0020

    (c) Two steps are loose. The log-Sobolev rate e^{-2T} is attained only by mean shifts, so a variance error decays like e^{-4T}. Data processing ignores that the reverse dynamics itself contracts the initial error, which gives the observed e^{-8T} decay in KL.

  16. ★★★ Memorisation (Python, open-ended). Replace \mu in Example 8.5 by the empirical measure of n = 20 samples of it, and use the exact score of the resulting Gaussian mixture. (a) Show that, as t_0 \to 0, the outputs concentrate on the training points: measure the distance to the nearest training point. (b) Propose a remedy, such as a larger t_0, kernel smoothing of the empirical measure, or a smooth parametric score. Study the trade-off between fidelity (a Kolmogorov–Smirnov distance to \mu) and novelty (distance to the training set).

    Hints and expected result. With the exact empirical score, the output at time t_0 is a training point plus noise of standard deviation \sigma_{t_0} \approx \sqrt{2 t_0}, so the median distance to the training set shrinks like \sqrt{t_0}. Larger t_0 trades memorisation for blur; this trade-off is an open question for trained networks (ch. 9.3).

  17. ★★★ Kinetic Langevin dynamics. Consider dX = V\, dt, dV = -\nabla U(X)\, dt - \lambda V\, dt + \sqrt{2\lambda}\, dB. (a) Write its generator and show that \rho(x, v) \propto e^{-U(x) - |v|^2/2} is invariant. (b) Explain why the proof of Theorem 7.2 fails. (c) Implement a splitting scheme and compare it with ULA on \mathcal N(0, \mathrm{diag}(1, 10^{-2})) at an equal number of gradient evaluations (Python, open-ended).

    Solution of (a)–(b). The generator is \mathcal L = v \cdot \nabla_x - \nabla U \cdot \nabla_v - \lambda v \cdot \nabla_v + \lambda \Delta_v. The Hamiltonian part gives -\nabla_x \cdot (v \rho) + \nabla_v \cdot (\nabla U \rho) = v \cdot \nabla U\, \rho - \nabla U \cdot v\, \rho = 0, and the friction–noise part gives \lambda \nabla_v \cdot (v\rho + \nabla_v \rho) = 0. The entropy now decreases at rate \lambda \int |\nabla_v \log(\mu_t/\rho)|^2 d\mu_t, which vanishes for laws of the form f(x)\, e^{-|v|^2/2} that are not at equilibrium. So no log-Sobolev argument applies directly, and convergence needs hypocoercivity (Villani, 2009).

Projects and assessment

The official assessment, on master-mva.com, is a written exam; no weighting, homework or project is displayed, and the Université Paris-Saclay course detail gives the assessment at the level of the constituent element only. The projects below are therefore proposals for practice and for self-assessment, sized like a typical MVA paper study. The written-exam proposal mirrors the official format.

Solo projects

  1. [Solo · ≈ 20 h] Step size and bias of ULA for Bayesian logistic regression. How does the bias of ULA scale with the step, and when does MALA pay off? A paper study of Durmus and Moulines (2019).
    • Implement: ULA for several steps \gamma \le 1/L, MALA, and a long MALA run as reference; compute m and L of the posterior.
    • Data: the breast-cancer data set bundled with scikit-learn (569 samples, 30 standardised features), Gaussian prior of precision 1.
    • Deliverables: code, 4–6 page report, 10-minute talk. Chapters: ch. 4, 7.
    • Success criterion: the bias of posterior means and variances, against \gamma, has a log–log slope between 0.8 and 1.2; the report compares it with Theorem 7.5 and finds the cheapest method for a fixed accuracy.
  2. [Solo · ≈ 20 h] Strong and weak orders of SDE schemes. Do Euler–Maruyama and Milstein reach their theoretical orders, and what happens for non-Lipschitz coefficients? Based on Kloeden and Platen (1992) and Talay and Tubaro (1990).
    • Implement: both schemes for geometric Brownian motion (exact solution known) and for the Cox–Ingersoll–Ross process, with a positivity-preserving truncation for the latter.
    • Deliverables: code, 4–6 page report with error-versus-step plots, 10-minute talk. Chapters: ch. 4, 6.
    • Success criterion: fitted strong orders 0.5 \pm 0.1 and 1.0 \pm 0.1 on geometric Brownian motion, weak order 1.0 \pm 0.15, and a documented failure mode for CIR.
  3. [Solo · ≈ 20 h] Girsanov importance sampling for a rare exit. Estimate the probability that the Ornstein–Uhlenbeck process dX = -X\, dt + \sqrt 2\, dB, started at 0, exceeds a level a before time T = 1, with a chosen so that this probability is about 10^{-6}.
    • Implement: crude Monte Carlo, constant-drift importance sampling, and a state-dependent drift change guided by large deviations, with the Brownian-bridge correction of Example 5.6.
    • Reference value: finite differences for the Kolmogorov backward equation of the hitting probability.
    • Deliverables: code, 4–6 page report, 10-minute talk. Chapters: ch. 1, 4, 5.
    • Success criterion: relative error below 5 % (95 % level) with 10^4 paths, matching the PDE value.

Group projects

  1. [Group of 2–3 · ≈ 30 h each] Score-based generative modelling through SDEs. A paper study of Song, Sohl-Dickstein, Kingma, Kumar, Ermon and Poole (2021).
    • Implement: denoising score matching for the variance-preserving SDE, the reverse-SDE sampler, the probability-flow ODE, and a predictor–corrector sampler with a Langevin corrector.
    • Data: two-moons and Swiss-roll samples from scikit-learn, and the 8×8 digits data set bundled with scikit-learn (1 797 images).
    • Split: member A trains the score networks; member B writes the samplers; member C writes the evaluation (sliced Wasserstein distance, likelihood through the ODE).
    • Deliverables: code, 8-page joint report, 20-minute talk. Chapters: ch. 4, 5, 8.
    • Success criterion: sliced Wasserstein distance to held-out data within twice the distance between two halves of the held-out data.
  2. [Group of 2–3 · ≈ 30 h each] Checking the KL guarantees of diffusion models. A paper study of Conforti, Durmus and Gentiloni Silveri (2025), with Chen et al. (2023).
    • Setting: Gaussian mixtures in dimensions 1, 2 and 10, where the scores are exact; controlled score errors are added.
    • Implement: Euler and exponential-integrator samplers; KL estimates by quadrature in low dimension and by Monte Carlo with exact densities otherwise.
    • Split: member A derives each term of Theorem 8.4 for mixtures; member B runs the samplers; member C estimates the divergences and their uncertainty.
    • Deliverables: code, 8-page joint report, 20-minute talk. Chapters: ch. 5, 7, 8.
    • Success criterion: the initialisation, score and discretisation terms reproduced with the predicted dependence on T, on the score error and on the step, over at least one decade each.
  3. [Group of 2–3 · ≈ 30 h each] Kinetic against overdamped Langevin on ill-conditioned targets. A paper study of Cheng, Chatterji, Bartlett and Jordan (2018).
    • Implement: ULA, MALA and a kinetic Langevin discretisation.
    • Targets: Gaussians with condition number 100 in dimensions 10 to 1 000 (exact W_2), and the Bayesian logistic regression of solo project 1.
    • Split: member A writes the samplers; member B the Gaussian experiments; member C the logistic experiments and effective sample sizes.
    • Deliverables: code, 8-page joint report, 20-minute talk. Chapters: ch. 7, 9.
    • Success criterion: for each method, the exponents of d and of 1/\varepsilon in the number of gradient evaluations needed for W_2 \le \varepsilon, fitted over at least one decade of each.
    • On the Gaussian targets, the exact ULA bias of Example 7.4 predicts \sqrt d / \varepsilon evaluations up to logarithms, and the fitted exponents must match it within 0.15.
    • The report compares every fit with the worst-case bounds d / \varepsilon^2 for ULA (Corollary 7.6) and \sqrt d / \varepsilon for kinetic Langevin (Cheng et al.), and explains the gaps.

Written exam (proposal)

Three hours, no documents, four independent questions.

  1. Question (5 points). State and prove the convergence in L^2 of the quadratic variation of Brownian motion along partitions of [0, t]. Deduce that Brownian paths have infinite variation. State the Itô isometry for simple integrands and prove it.

    Expected: the variance computation \mathbb E(Q_n - t)^2 = 2 \sum \delta_i^2 \le 2t |\pi_n| (Theorem 1.8); the bound \sum \Delta_i^2 \le \max_i |\Delta_i| \sum |\Delta_i| (Corollary 1.9); vanishing cross terms by conditioning and diagonal terms \mathbb E[\xi_i^2] \delta_i (Proposition 3.2).

  2. Question (5 points). Let dX = -\theta X\, dt + \sigma\, dB. Solve the equation, give the law of X_t and the stationary law, and check the stationary law with the Fokker–Planck equation. For \sigma = \sqrt 2, write ULA with step \gamma and compute its stationary variance.

    Expected: X_t = e^{-\theta t} X_0 + \sigma \int_0^t e^{-\theta(t-s)} dB_s, Gaussian with variance \sigma^2(1 - e^{-2\theta t})/(2\theta); the zero-flux equation (Example 4.6, Theorem 4.12); ULA X_{k+1} = (1 - \gamma\theta) X_k + \sqrt{2\gamma} Z has stationary variance 2/(\theta(2 - \gamma\theta)), a bias of order \gamma.

  3. Question (5 points). State Girsanov’s theorem. Prove that the KL divergence between the path laws of dX = b_i(X)\, dt + dB, i = 1, 2, with the same initial law, equals \frac12 \mathbb E_1 \int_0^T |b_1 - b_2|^2(X_t)\, dt. Apply it to two Ornstein–Uhlenbeck drifts.

    Expected: Theorem 5.1 with Novikov’s condition; the substitution d\omega = b_1 dt + dW^1 and the identity (b_1 - b_2) \cdot b_1 - \frac12 |b_1|^2 + \frac12 |b_2|^2 = \frac12 |b_1 - b_2|^2 (Corollary 5.4); the value (\theta_1 - \theta_2)^2 T / (4\theta_1) (Exercise 8).

  4. Question (5 points). For the forward process dX = -X\, dt + \sqrt 2\, dB, show that the marginals of the SDE with drift y + 2\nabla \log p_{T-t}(y) are p_{T-t}. Then prove that denoising score matching and score matching have the same minimisers.

    Expected: the Fokker–Planck computation of Theorem 8.1, using p \nabla \log p = \nabla p; Tweedie’s formula and the Pythagorean identity of Proposition 8.3.

Total: 5 + 5 + 5 + 5 = 20 points.

Grading rubric (proposal)

Criterion Weight What earns the marks
Mathematical understanding 30 % The stochastic model, its assumptions and the key theorem are stated precisely, with the idea of the proof
Correctness of the implementation 25 % Code runs from a fixed seed, is validated on a case with a known answer, and matches the paper’s setting
Experimental design and analysis 20 % Comparisons at equal cost, Monte Carlo error bars, log–log slopes fitted honestly, failures reported
Report and presentation 15 % Clear structure within the page and time limits, readable figures, correct answer to “why does it work?”
Questions and teamwork 10 % Precise answers to questions; for groups, a visible and balanced split of the work

References

Official references (master-mva.com, 2026–2027)

Textbooks

Stochastic calculus and diffusions

Langevin sampling

Diffusion models