Throughout this course, overdamped Langevin dynamics in a potential is
with inverse temperature and a standard Brownian motion. The infinitesimal generator is written . Students may use numpy for the coding problem.
Problem 1
Problem 1.1 (Generator of Overdamped Langevin).
Let follow the SDE above on , and let be smooth and compactly supported.
Write the infinitesimal generator
as a second-order differential operator. Identify the drift vector and the diffusion matrix. (Itô’s formula is enough.)
Specialize to and . Compute in terms of and .
Now take the double well . Simplify to an explicit function of and . At the two minima and at the barrier , state whether is positive, negative, or zero, and give a one-sentence interpretation in terms of mean-square displacement.
Solution
Itô’s formula for with and reads
Taking , dividing by , and sending kills the martingale term and leaves
The drift is . The diffusion matrix is , so the second-order part is . Equivalently, with .
In one dimension, has and , so
For one has , hence
At the minima , this equals : thermal noise inflates away from the well bottoms. At the barrier , it is again . For the term is negative and, at low temperature, dominates: the restoring force pulls the particle back toward and decreases in the mean. The generator applied to is the instantaneous drift of the mean-square position; it is not the same object as at finite .
Problem 2
Problem 1.2 (Girsanov for a Constant Extra Drift).
Keep the same reference process , and let be the law of the controlled SDE
where the extra drift is a constant vector (no or dependence). Work on a fixed horizon .
Identify the Girsanov kernel such that . Write the Radon–Nikodym derivative on as an exponential martingale.
Compute explicitly. Confirm that it equals
(This is the course identity at .)
Write the importance weight that you would use to reweight controlled trajectories back to the reference. For constant , simplify it as far as possible.
Solution
Matching drifts, the extra physical drift equals with . Therefore
Girsanov’s theorem gives
Equivalently, in terms of the -Brownian motion,
because . Either form is acceptable if the driving Brownian motion is named.
By definition . Under the stochastic integral against is a mean-zero martingale, so
The same identity holds for a nonconstant adapted control , with replaced by . The factor is tied to the convention ; a different noise scale would change the prefactor.
The importance weight is the reciprocal
This is the constant- case of the course formula
For later homeworks: if is the exact Doob control, these weights are deterministic (zero-variance importance sampling) in continuous time. A constant is not the Doob control of a double well, so the weights fluctuate.
Problem 3
Problem 1.3 (Euler–Maruyama on the 1D Double Well).
Consider the scalar double well , so . Let and . The rare-event probability of interest is the committor
Implement Euler–Maruyama for the overdamped Langevin SDE:
Stop each trajectory at the first index with or , and record which boundary was hit. You may use numpy. A typical step is ; if a path has not hit by a large cutoff (e.g. steps), treat that as a failure and report the failure rate.
Starting at , estimate for several inverse temperatures, e.g. . Report means and a crude error bar (binomial or bootstrap). What value should you get, and why does it not depend on ?
Repeat from . Plot against (or against on a log scale for ). Describe the trend: as grows, hitting before from the left of the barrier becomes a genuine rare event.
Briefly state two numerical caveats of Euler–Maruyama for this problem (step-size bias near the absorbing points, and mixing / hitting-time explosion at large ).
Solution
A compact integrator is
import numpy as npdef Vprime(x): return 4.0 * x * (x**2 - 1.0)def hit_AB(x0, beta, dt=1e-3, n_paths=2000, max_steps=1_000_000, rng=None): rng = np.random.default_rng(rng) sigma = np.sqrt(2.0 * dt / beta) hits_B = 0 failures = 0 for _ in range(n_paths): x = float(x0) for _ in range(max_steps): x = x - Vprime(x) * dt + sigma * rng.standard_normal() if x <= -1.0: break if x >= 1.0: hits_B += 1 break else: failures += 1 n_ok = n_paths - failures qhat = hits_B / n_ok if n_ok else np.nan se = np.sqrt(qhat * (1 - qhat) / n_ok) if n_ok else np.nan return qhat, se, failures
Vectorizing the inner loop over an ensemble (stop each path independently with a mask) is acceptable and much faster. Absorbing logic must use and , not a soft neighborhood of the well bottoms, if the target is the PDE with Dirichlet data on .
By evenness of the two wells are symmetric, so for every. A correct code should return estimates statistically consistent with , with error bars shrinking as . If appears to depend on , the integrator, the absorbing sets, or the starting point is wrong. (A common bug is absorbing at instead of , which measures a different committor.)
From the particle sits on the -side of the barrier. Then decreases rapidly in : most paths fall into , and the -hits become Arrhenius-rare. A sketch of the exact 1D formula (Homework 2) is
which is a useful check of the Monte Carlo. At the event is not rare; at a few thousand naive paths already give a small with a large relative error. That is the point of the course: brute-force hitting estimates die exponentially in .
Two caveats worth marking:
Euler–Maruyama has weak order . Near and a single step of size can overshoot the boundary, biasing the hitting location and (later) any Girsanov weight that assumes the discrete scheme matches the SDE.
Mean hitting times from the well scale like . At large , many paths need a huge cutoff, and a finite cutoff systematically undercounts the rare -hits. Reducing and increasing the cutoff should both be reported if is to be trusted.
Grading: a working EM loop; across ; a monotone drop in as increases; and a short discussion of bias versus rarity.