Theory · Path-space importance sampling

Accelerated Langevin Dynamics

A learned importance function steers Langevin dynamics toward rare transitions; path weights recover the original rates.

Michael M. Kim and Wei Cai · Department of Mechanical Engineering, Stanford University

Explore
Illustration: walkers leave A; most fall back, a few cross a saddle into B.

The idea

Tilt every step, keep the kinetics

Rare escapes between metastable basins shape how atomistic systems evolve, yet nearly every excursion falls back. Raising the temperature or adding a bias potential would likely skew the odds between escape channels; tilting each step and weighting each path keeps them.

  1. Tilt each step

    The ratio \(I(\mathbf{y})/I(\mathbf{x})\) of an importance function tilts each step toward B, and a factor \(Z_\tau\) renormalizes it; no gradient of \(I\) is needed.

  2. Carry the weights

    The factors \(Z_\tau\) multiply into a path weight \(W\) that keeps the estimate unbiased for any positive \(I\): errors cost variance, not bias.

  3. Learn the committor

    The optimal \(I\), the committor, makes every \(Z_\tau\) equal 1; a neural network approaches it by driving \(\ln Z_\tau\) to zero where the sampler goes.

The rare-event problem

Many failures before one success

  • Overdamped Langevin
  • Failure and success paths
  • Hill relation
Color map of a two-dimensional energy landscape split by a dotted line into basins Omega A and Omega B, with small circular regions A and B at the two minima, saddles S1 and S2 on the dividing line, a failure path that loops back to A, and a success path that crosses near S1 into B Figure 1a · Schematic
Figure 1a. Schematic: basins \(\Omega_{\rm A}\) and \(\Omega_{\rm B}\) of a landscape \(U(\mathbf{x})\) meet at saddles S1 and S2; arrows trace a failure and a success path from region A.
Schematic of a long trajectory at the edge of region A: a string of red failure excursions separated by escape intervals, followed by one blue success path that reaches region B Figure 1b · Schematic
Figure 1b. Schematic: failures (red) leave A and return, \(t_{\rm AA}^{(k)}\) apart; one success (blue), lasting \(t_{\rm AB}\), reaches B.

The dynamics

A configuration \(\mathbf{x}\) with \(d\) coordinates, in a domain \(\Omega\) with potential energy \(U(\mathbf{x})\), follows overdamped Langevin dynamics at temperature \(T\):

Overdamped LangevinThe model
\[ \begin{aligned} \mathrm{d}\mathbf{x}(t) &= -\gamma^{-1}\,\nabla U(\mathbf{x}(t))\,\mathrm{d}t \\ &\quad {}+ \sqrt{2\gamma^{-1}\beta^{-1}}\;\mathrm{d}\boldsymbol{W}(t) \end{aligned} \]

with friction \(\gamma\), \(\beta = 1/(k_{\rm B}T)\), Boltzmann’s constant \(k_{\rm B}\) and a Wiener process \(\boldsymbol{W}\). The metastable states are basins \(\Omega_{\rm A}\) and \(\Omega_{\rm B}\), the states whose steepest descent reaches the same minimum.

Failures and successes

Small regions A and B surround the minima. A long trajectory splits into paths \(\Gamma = \{\mathbf{x}_1, \dots, \mathbf{x}_N\}\), stored a lag \(\tau\) apart, that leave A and return (failure) or reach B (success); failures dominate overwhelmingly (Figure 1).

The Hill relation

The rate \(r_{\rm AB}\) is the inverse mean first-passage time \(\langle t_{\rm FPT}\rangle\) from A to B: \(\langle N_{\rm AA}\rangle\) failures spaced by \(\langle t_{\rm AA}\rangle\), the mean time between escapes from A, then a success lasting \(\langle t_{\rm AB}\rangle\). With success probability \(P_{\rm AB}\) per escape, the failures form a geometric sum:

Hill relationApproximation · valid for \(P_{\rm AB} \ll 1\)
\[ \begin{aligned} \langle t_{\rm FPT} \rangle &= \langle N_{\rm AA} \rangle\, \langle t_{\rm AA} \rangle + \langle t_{\rm AB} \rangle, \\ \langle N_{\rm AA} \rangle &= \sum_{n=0}^{\infty} n\,(1 - P_{\rm AB})^{n}\, P_{\rm AB} \\ &= P_{\rm AB}^{-1} - 1, \\ r_{\rm AB} &= \langle t_{\rm FPT} \rangle^{-1} \approx J_{\rm A}\, P_{\rm AB} \end{aligned} \]

The last step, valid when \(P_{\rm AB} \ll 1\), drops the \(-1\) and \(\langle t_{\rm AB}\rangle\); \(J_{\rm A} = \langle t_{\rm AA}\rangle^{-1}\) is the flux out of A (Baudel, Guyader and Lelièvre, 2023).

  • Cheap\(J_{\rm A}\): escapes from A are frequent, so an unbiased run near A gives it
  • Recorded\(\rho_{\rm A}\): the same run stores the exit states that start every path
  • Hard\(P_{\rm AB}\): vanishingly small, so brute force sees almost only failures

Importance sampling in path space

Tilt the kernel, then renormalize

  • Stopped kernel
  • Normalization factor
  • Committor
Schematic · one tilted step Schematic: along a line from region A to region B, the gray next-state density around the current state x is reweighted by the rising importance function I(y) into a red density shifted toward B. A B x next state y Kτ K′τ I(y) tilt by I(y)/I(x)
Schematic. Tilting the next-state density \(\mathcal{K}_\tau\) (gray) by \(I(\mathbf{y})/I(\mathbf{x})\) shifts it toward B; dividing by \(Z_\tau(\mathbf{x})\) keeps \(\mathcal{K}'_\tau\) (red) a density.

Tilt and renormalize

Let \(\mathcal{K}_\tau(\mathbf{y}\,|\,\mathbf{x})\) be the density of the next stored state \(\mathbf{y}\) given the current one, \(\mathbf{x}\), a step lasting \(\tau\) or ending early in A or B; a success path has density \(p(\Gamma_{\rm AB}) = \rho_{\rm A}(\mathbf{x}_1) \prod_{i=1}^{N-1} \mathcal{K}_\tau(\mathbf{x}_{i+1}\,|\,\mathbf{x}_i)\). As in earlier rare-event importance sampling (Cai et al., 2002; de Koning et al., 2005), each step is tilted by \(I(\mathbf{y})/I(\mathbf{x})\), then renormalized by \(Z_\tau\):

Tilted kernelDefinition
\[ \begin{aligned} \mathcal{K}'_\tau(\mathbf{y}\,|\,\mathbf{x}) &= \frac{I(\mathbf{y})\,\mathcal{K}_\tau(\mathbf{y}\,|\,\mathbf{x})}{Z_\tau(\mathbf{x})\, I(\mathbf{x})}, \\ Z_\tau(\mathbf{x}) &= \int_{\Omega} \mathrm{d}\mathbf{y}\, \frac{I(\mathbf{y})}{I(\mathbf{x})}\,\mathcal{K}_\tau(\mathbf{y}\,|\,\mathbf{x}) \end{aligned} \]

The optimal importance function

The optimal importance function \(I^{\rm opt}\) needs no renormalization anywhere, \(Z_\tau \equiv 1\):

Optimality conditionSolved by the committor
\[ \begin{gathered} \int_{\Omega} \mathrm{d}\mathbf{y}\, I^{\rm opt}(\mathbf{y})\,\mathcal{K}_\tau(\mathbf{y}\,|\,\mathbf{x}) = I^{\rm opt}(\mathbf{x}), \\ I^{\rm opt} = 0 \ \text{on A}, \qquad I^{\rm opt} = 1 \ \text{on B} \end{gathered} \]

Its solution, the probability of reaching B before returning to A, is the committor (Vanden-Eijnden, 2006). For any other \(I\), the deviation of \(Z_\tau(\mathbf{x})\) from 1 measures how far \(I\) is from satisfying the optimality condition at \(\mathbf{x}\).

Why the committor keeps channels

Along a success path the tilts multiply to \(I(\mathbf{x}_N)/I(\mathbf{x}_1)\). With every \(Z_\tau = 1\), each success path from a start \(\mathbf{x}_1\) gains that one factor, whatever its route: channel odds from that start are preserved, and since the factor is known, the original path density is recovered exactly.

An unbiased estimator

Errors go into the weights

  • Exact identity
  • Path weights
  • Committor-only shortcut

Weighted averageTilted paths and their weights

Exact
in expectation, for any positive \(I\)
Errors cost
variance, not bias

Committor-only shortcutThe network, taken as exact

Exact
only if \(I\) is the committor
Errors cost
uncontrolled error in \(P_{\rm AB}\)

An exact identity

For any \(I\) positive along the path, chaining the renormalized steps relates the tilted density \(p'\) of a success path to the original exactly:

Path-density identityExact · any positive \(I\)
\[ p'(\Gamma_{\rm AB}) = \frac{I(\mathbf{x}_N)}{I(\mathbf{x}_1)} \left[ \prod_{i=1}^{N-1} Z_\tau^{-1}(\mathbf{x}_i) \right] p(\Gamma_{\rm AB}) \]

The weighted estimator

With reward \(R(\Gamma)\) equal to 1 for a success and 0 otherwise, \(P_{\rm AB}\) averages \(R\) over the original paths, hopeless when nearly all fail. Averaged instead over paths drawn with \(\mathcal{K}'_\tau\) from \(\rho_{\rm A}\) (written \(\mathbb{E}'\)), it becomes

Weighted estimatorUnbiased · any positive \(I\)
\[ \begin{aligned} P_{\rm AB} &= \mathbb{E}'_{\Gamma}\!\left[ R(\Gamma)\, W(\Gamma)\, \frac{I(\mathbf{x}_1)}{I(\mathbf{x}_N)} \right], \\ W(\Gamma) &= \prod_{i=1}^{N-1} Z_\tau(\mathbf{x}_i) \end{aligned} \]

where the path weight \(W\) multiplies the normalization factors of every state but the last. Nothing requires \(I\) to be optimal: its deviations from the committor go into the weights and cost variance, not bias. Strictly, only \(P_{\rm AB}\) is unbiased; the rate adds the Hill approximation and the estimate of \(J_{\rm A}\).

Channel by channel

Restricting the reward to the success paths of one channel gives its share from the same weighted ensemble; unweighted counts would not, since the tilt changes each path’s probability by a path-dependent factor. Unanticipated channels count correctly, provided the biased dynamics samples them.

The committor-only shortcut

For the committor, the weighted average collapses to one integral over exit states,

Reactive probabilityExact only for the committor
\[ P_{\rm AB} = \int_{\Omega} \rho_{\rm A}(\mathbf{x}_1)\, I^{\rm opt}(\mathbf{x}_1)\, \mathrm{d}\mathbf{x}_1 \]

the reactive probability of earlier work (Mitchell and Rotskoff, 2024; Lorpaiboon, Weare and Dinner, 2025). With a learned \(I\) in its place, the network’s errors enter \(P_{\rm AB}\) uncorrected.

Making it practical

A swarm per step, a window for weights

  • Gradient-free
  • Resampling
  • Branching random walk
Schematic · one biased step Schematic: from the current state x, a swarm of short unbiased trajectories ends at scattered points colored from blue (low importance) to red (high importance); one high-importance end point is ringed as the next state. importance I increases → next state x M unbiased trajectories
Schematic. Trajectories from \(\mathbf{x}\) end at points \(\mathbf{y}_i\), blue (low \(I\)) to red (high \(I\)); one, drawn in proportion to \(I(\mathbf{y}_i)\), becomes the next state.

A swarm for every step

Integrating over all next states is infeasible in high dimensions, and \(\mathcal{K}_\tau\) itself would require solving the Fokker–Planck equation. Instead, \(M\) independent unbiased trajectories run from \(\mathbf{x}\) for \(\tau\), or until they enter A or B; their end points \(\mathbf{y}_i\) give

Swarm estimate and resamplingUnbiased estimate of \(Z_\tau\)
\[ \begin{aligned} \widehat{Z}_\tau(\mathbf{x}) &= \frac{1}{M} \sum_{i=1}^{M} \frac{I(\mathbf{y}_i)}{I(\mathbf{x})}, \\ p_i &= \frac{I(\mathbf{y}_i)}{\sum_{j=1}^{M} I(\mathbf{y}_j)} \end{aligned} \]

\(\widehat{Z}_\tau\) is an unbiased estimate of \(Z_\tau\) that converges as \(M\) grows. The same swarm supplies the next state, drawn with probability \(p_i\) by sequential importance resampling (Doucet et al., 2001), so no gradient of \(I\) is needed.

A window for the weights

The closer \(I\) is to the committor, the narrower the spread of \(W\), yet even small errors can spread it widely. A branching random walk (Shi, 2015; Blanchet et al., 2026) starts walkers from \(\rho_{\rm A}\) at unit weight and multiplies each weight by \(Z_\tau\) per step. Unlike the classical one, whose offspring numbers follow a fixed distribution, the number of walkers here depends on the weight: inside a window \([W_{\min}, W_{\max}]\) a walker continues, outside it becomes \(\mathcal{R}(W)\) unit-weight walkers:

Stochastic roundingKeeps the total weight on average
\[ \mathcal{R}(W) = \begin{cases} \lfloor W \rfloor + 1 & \text{with probability} \\ & W - \lfloor W \rfloor, \\ \lfloor W \rfloor & \text{otherwise} \end{cases} \]

Zero ends it, one resets it, more split it: a rule from Monte Carlo rendering and particle transport (Arvo and Kirk, 1990) that keeps the total weight on average. A success scores \(W\,I(\mathbf{x}_1)/I(\mathbf{x}_N)\), a failure zero, and \(P_{\rm AB}\) is the mean score.

Schematic · the weight window Schematic: walker weights drift inside a shaded window between W min and W max; a weight that leaves the window through the top splits into copies of weight 1, and weights that leave through the bottom either stop or reset to 1. Wmax Wmin 1 step → split stop reset continue

Learning the importance function

Learn the guide where the paths go

  • Normalization loss
  • Graph network
  • Two directions
Scheme · adaptive training
  1. SampleWalkers follow \(\mathcal{K}'_\tau\) under the current network.
  2. CollectVisited states; success paths join a replay library.
  3. TrainMinimize the loss and update \(\theta\).

Repeat until it converges

A loss from the normalization condition

The committor solves a high-dimensional partial differential equation, so \(I\) is a neural network \(I(\mathbf{x};\theta)\) with parameters \(\theta\), as in earlier committor learning (Li et al., 2022; Strahan et al., 2023), trained with the loss of Mitchell and Rotskoff (2024) and Trizio et al. (2025):

Training lossZero at the committor
\[ \mathcal{L}(\mathbf{x};\theta) = \big[ \ln Z_\tau(\mathbf{x}) \big]^2 + \big[ \ln \bar{Z}_\tau(\mathbf{x}) \big]^2 \]

where \(\bar{Z}_\tau\) is \(Z_\tau\) with \(1 - I\) in place of \(I\). Both terms vanish where the normalization condition holds, so the loss reaches its minimum, zero, at the committor; the revision in preparation ties it to the variance of the path weights, whose factors are the \(Z_\tau\). It is evaluated only on states the sampler itself visits, where transition paths go.

No collective variables

For atomistic systems, \(I\) is a SchNet-style graph network (Schütt et al., 2017) on interatomic distances, invariant to translations, rotations and permutations, so no collective variable enters it; only A, B and, for extended systems, the atoms it reads are chosen per problem. A descriptor-free graph-network committor was learned before (Kang et al., 2026); here the weights keep the estimate unbiased when the network is sub-optimal.

Two directions, one network

If \(I^{\rm opt}\) is optimal from A to B, then \(1 - I^{\rm opt}\) is optimal from B to A. With \(1 - I\) in \(\widehat{Z}_\tau\) and \(p_i\), one network, trained with walkers started near both A and B, serves both directions.

Schematic · one network, two directions Schematic: the importance function I rises from 0 in region A to 1 in region B and guides transitions from A to B; its complement 1 minus I falls from 1 to 0 and guides transitions from B to A. A B I guides A → B 1 − I guides B → A

Across temperatures

The optimal \(I\) depends on temperature through \(\mathcal{K}_\tau\), yet since the estimate is unbiased for any positive \(I\), a network trained at one temperature stays a valid, if sub-optimal, guide at another, at a cost in variance. The paper fine-tunes pretrained networks and, in a revision, reuses one unchanged.

Takeaway

An imperfect committor costs variance, not bias

The learned importance function only guides the dynamics; its deviations from the committor go into the path weights, so the success-probability estimate stays unbiased and the same paths resolve competing channels.

  • ExactThe path-density identity, and the weighted estimate of PAB in expectation, for any positive I.
  • At the optimumZτ ≡ 1, channel ratios preserved from each start, and the committor-only shortcut.
  • ApproximateThe rate rAB ≈ JA PAB, valid when PAB ≪ 1.

Scope: overdamped Langevin dynamics between two metastable states (\(\Omega_{\rm B}\) may collect all metastable states accessible from \(\Omega_{\rm A}\)), counting only channels the biased dynamics samples. The window, swarm size and network are design choices; how many paths a network needs is empirical.

Outlook

Where the framework goes next

Keep exploring

See the theory at work

The paper

Accelerated Langevin Dynamics Simulation via Neural Network-Driven Importance Sampling
Michael M. Kim, Wei Cai
ChemRxiv preprint (2026)

Where this theory appears. The formulation is in the posted preprint, Kim & Cai, ChemRxiv (2026): PDF · ChemRxiv. That includes fine-tuning a network across temperatures. The descriptor-free framing, reuse of one network across temperatures without retraining, the link between the loss and the weight variance, the remark on unanticipated channels and the outlook come from a revision in preparation.