Module 6: Methods for Solving the Doob-Control Problem
Modules 1–5 built the mathematics of the Doob -transform. A hitting event gives a committor that solves a linear PDE; Cole–Hopf turns that PDE into an HJB; two prescribed marginals give a Schrödinger system. None of that tells you how anyone computes the field in a space where a grid is impossible.
This lecture is the climax. There is one object,
and three families of estimators that dominate the 2024–2026 literature:
Doob’s Lagrangian (Du, Plainer, Brekelmans et al., NeurIPS 2024, arXiv:2410.07974) — simulation-free least action over pinned Gaussian path families. Floor: a path-family bias.
Adjoint Matching (Domingo-Enrich et al., ICLR 2025, arXiv:2409.08861) — lean costate as a conditional expectation. Floor: a conditional variance. Needs rollouts unless the base bridge is closed form.
Value Matching / REACT (Du, He, Zhang, Vanden-Eijnden, Domingo-Enrich, arXiv:2604.13213) — pathwise martingale residual. Floor: exactly . Off-policy in .
They all chase the same field. What separates them is the estimator: which measure the residual is integrated against, how far backward credit survives, and whether the method can certify itself.
Navy sits on the axis: Value Matching, floor . Green is lifted by a path-family bias: Doob’s Lagrangian. Maroon is lifted by a conditional variance: Adjoint Matching. Drag . All three bowls share a minimiser; they do not share a height.
The Object All Three Chase
Fix a finite horizon , dynamics , and a terminal cost . The control problem is
with entering as . Cole–Hopf turns the (nonlinear) HJB into a linear backward Kolmogorov equation,
and the optimal control is read off the same field: . This is the finite-horizon version of the committor identity of Modules 1–4.
Definition 6.1 (Softened Committor).
For a hitting-time problem with sets and , pick and solve
The map is affine and invertible, so learning is equivalent to learning . Now everywhere, so and are bounded. Without , diverges on and is singular at .
The hitting-time value is the stationary field of Module 4, with and optimally biased potential in the reversible overdamped case.
Adjoint Matching needs at a fixed, so a comparison of all three on one footing uses a smooth terminal cost at fixed horizon for the bake-off, and switches to the committor setting wherever the off-policy story is told — because that story needs a stationary .
Figure 6.1. The shared 1D problem: double well V=(x^2-1)^2, leave x=-1, pay g(x)=\lambda(x-1)^2 at T=2. Middle: the value \Phi(t,x). Right: the optimal control u^\star=-\sigma\partial_x\Phi.
Notation 6.1 (Three losses, one notation).
All three take a candidate (equivalently ) and return a number.
(a) Least action — what Doob’s Lagrangian minimises.
This is the control cost itself. It is minimised at , where its value is — not zero.
(b) Adjoint Matching — regression onto a backward costate.
is integrated backward along a frozen (stop-gradient) trajectory. equals only in conditional expectation.
(c) Value Matching — a pathwise martingale residual.
with . At the residual vanishes for every single path.
Figure 6.2. One-parameter sweep \theta=s\theta^\star through the truth. Left: shapes, rescaled to [0,1]. Right: absolute scale — AM sits near 10^3, least action near 8.2, VM near 0.
The three floors have three different causes.
Least action. with equality at : the floor is the optimal cost, a real physical quantity.
Adjoint Matching. Least squares onto a noisy but unbiased target. Writing ,
On-policy, the floor is taken under the law of , so it drifts with . Since the floor can be a thousand times the signal, that drift can dominate the argmin.
Value Matching. The residual is an identity path by path, so there is no irreducible variance left behind. The only remainder at finite step is Euler–Maruyama error.
Figure 6.3. Adjoint Matching decomposed. (a) Bias bottoms out at the truth, under a variance floor \approx 1029\times larger. (b) On-policy argmin is seed noise; scoring every candidate on one shared path set recovers a bowl at the truth. (c) Heavy tail: 0.1\% of paths carry 54\% of the loss.
Remark 6.1 (A loss value is not an error estimate).
Suppose training stops with the loss at . What do you now know about ? For Value Matching, you know the floor is , so everything above it is signal — until discretisation buries the floor, which it will. For the other two, you know almost nothing unless you already know the floor, and the floor is or a conditional variance, neither of which you have. Figure 6.4 is the direct test: scatter each loss against true error. Near the optimum, AM does not even rank candidates.
Figure 6.4. Loss versus true relative control error, each candidate on its own rollouts. Least action Spearman +0.84. Adjoint Matching -0.15. Value Matching +0.87.
Doob’s Lagrangian: Least Action Over a Restricted Family
Every other method in this lecture parameterises the value (or the control ) and then has to simulate to evaluate its loss. Doob’s Lagrangian parameterises something else entirely — the marginal path, the density of the process at each time — and pins the endpoints by construction.
standard (AM, VM)parameterise Phi_thetamust simulate thecontrolled SDEcost: rollouts, and aloss variance to fightDoob's Lagrangianparameterise rho_tGaussian (or mixture):every E is a quadraturecost: rho_t is onlywhat the family can say
The logic is: for any path of marginals there is a drift that realises it, given by the continuity equation. Choose from a family where that drift is available in closed form, and the action becomes an ordinary integral. Minimise it over the family. No process is ever simulated.
Proposition 6.1 (Closed-Form Drift of a Gaussian Path).
Let be a path of densities solving the Fokker–Planck equation of . The probability-flow velocity satisfies the continuity equation , so the drift that realises is . For a Gaussian both pieces are elementary:
The control that realises the path is . Given , this is exact — there is no sampling error. The only question is whether the you chose is the right one.
With the drift in closed form the objective is an ordinary integral
and both expectations are Gaussian integrals, which Gauss–Hermite quadrature evaluates to machine precision. Parameterise by splines, pin the initial condition, and minimise over the interior knots. No SDE is integrated, no path is sampled, no importance weight is computed, and there is no variance to fight.
Figure 6.5. A fitted Gaussian path family. Left: mean \mu_t with width s_t, pinned at the start. Middle: every marginal is unimodal. Right: the induced drift is affine in x at each t (a Gaussian forces that); the optimal drift is not.
The gap is unimodality, not curvature
On the double well of Figure 6.1 a single-Gaussian family lands about above the true optimal action. The usual explanation is that a Gaussian tube cannot bend. That explanation is wrong here, and the right answer is sharper.
The mean path is a cubic spline. A spline bends. Whatever shape the optimal mean path has, this family can follow it. The deficiency is not in the mean. It is in the shape of the distribution at each fixed time. Under the optimal control some paths have crossed the barrier by time and some have not, and the two groups sit in different wells. The true controlled marginal is therefore a two-humped density through the middle of the transition. A Gaussian has one hump, always.
Figure 6.6. True optimally controlled marginal \rho_t^\star (filled) against the best matching Gaussian (dashed). At t=0.5 one mode; at t=1.0 and t=1.5 two. A single Gaussian cannot be bimodal by definition.
If the diagnosis is right, the cure is not more knots, a better optimiser, or a longer horizon — all of those leave the family unimodal. The cure is to let have more than one hump. For a mixture the same closed form survives, because the marginal-preserving velocity is the responsibility-weighted average of the component velocities. The method stays simulation-free, and the gap tracks the number of humps: at , then , , at .
Figure 6.7. Left: action gap versus mixture size K. Right: at the mid-horizon, K=1 cannot produce the second hump; K=3 can.
A two-dimensional curvature dial tests the usual explanation directly. At the channel is straight; at it bows. If curvature were the mechanism, the gap should be near zero at and grow sharply. Most of the gap is already present at (), rising only to at . Curvature is real and secondary — about of the effect. Unimodality is the rest.
Figure 6.8. A 2D well with a curvature dial. The DL mean path follows the channel (a spline can bend). The action gap is already 12\% on the straight channel.
Remark 6.2 (What the method cannot see).
The minimiser inside a poor family is the cheapest admissible path, not the nearest one. The action charges , so when the family cannot represent the true marginal, the optimiser does not pick the family member closest to — it picks the one that is cheapest to steer. Nothing inside the method notices. There are no rollouts, so no weights, no ESS, no residual. The optimisation converges cleanly to the wrong answer, and the convergence looks exactly like the convergence to a right answer. An action gap and a control error are not the same measurement: at the action can be above optimal while the induced control is wrong on the true reactive tube.
A neighbouring result, not a critique: Karczewski, Heinonen and Garg (arXiv:2505.17517) prove that restricting to a Gaussian-marginal family forces induced paths to be straight in the relevant metric, in the different setting of diffusion-model latent geometry. Same structural cause, different problem.
Adjoint Matching: The Lean Costate
Start from the same objective and differentiate it through the SDE. That is ordinary adjoint sensitivity analysis, and it produces a backward ODE along each sampled trajectory. Adjoint Matching’s contribution is what it then throws away.
minimise J[u] = E[ int 1/2 |u|^2 + g(X_T) ]differentiate through the SDEfull adjoint depends on the trained udrop that term: the lean adjointregress: min E int || u + sigma^T a~ ||^2minimiser u(t,x) = -sigma^T E[ a~(t) | X_t = x ]
Dropping the term is not an approximation for convenience. The discarded piece is exactly what makes the naive pathwise gradient biased for the value we want once the sampling distribution depends on the control. Removing it is what makes the fixed point of the regression be . The published derivation shows the lean adjoint arises as the correct adjoint for the reciprocal (endpoint-conditioned) formulation.
Theorem 6.1 (Lean Adjoint Identity).
Let solve the lean backward ODE along a trajectory of the base drift ,
Then the optimal control is the conditional expectation of this costate, not a pathwise identity:
The estimator is unbiased. Every practical difficulty follows from the gap between a random variable and its conditional mean.
Proof
In the linear-quadratic case , , constant , the HJB collapses to a scalar Riccati equation , , with and . The lean adjoint integrates in closed form, with . Taking the conditional expectation under the optimally controlled process, whose drift is , gives , and the claim becomes the algebraic identity
The left side comes from integrating the Riccati equation, the right from the adjoint construction; they agree because Theorem 6.1 holds. In the general (nonlinear) case the same identity is the statement that the lean adjoint is the correct adjoint for the reciprocal formulation; the LQ check is the case in which every term is known.
◻
For the lean adjoint is scalar and integrates exactly:
Read the sign carefully. Inside a well , so the exponent is negative and credit decays as you integrate backward. On the barrier and credit grows. For one has , negative exactly on — the barrier region.
Figure 6.9. Left: -\sigma\tilde a(0) on individual paths; the mean matches u^\star(0,-1), the spread does not. Middle: backward credit along 60 paths, decaying inside wells. Right: V'' is negative on the barrier, which is where credit grows.
Definition 6.2 (Credit Horizon).
For each path, the credit horizon is the lag at which first drops below of as we integrate backward. Beyond that lag the terminal cost has, numerically, no influence on the regression target. The control at those early times is being trained by round-off. This is a property of along the sampled path, not of the optimiser, the network, or the learning rate.
On the double well, the credit horizon is finite on about two thirds of paths (median lag out of ); on the rest, credit grows backward because those paths sat where . The top fraction of a percent of paths can carry essentially all of .
Figure 6.10. Left: distribution of credit horizons; a third of paths never decay. Right: concentration of \E[\tilde a(0)^2] on the worst paths.
The simulation-free variant, and when it expires
The Adjoint Sampling line of work removes rollouts by a clever move: keep a buffer of terminal states , and whenever you need an intermediate point, re-noise backward from along the base process, sampling the bridge . Because is defined by the base drift alone, the regression target at that re-noised point is still correct.
The precondition is written into the second line: the base bridge must be available in closed form. For Brownian motion or an Ornstein–Uhlenbeck process, it is Gaussian and elementary. For a physical Langevin system in a multi-well potential it is neither. The OU midpoint bridge is Gaussian to total variation . The double-well bridge is already visibly non-Gaussian at and trimodal at larger .
Figure 6.11. Midpoint bridges. Left: OU, TV =0 against a Gaussian. Middle: double well at T=2, TV \approx 0.07. Right: double well at T=4, trimodal, TV \approx 0.35. The closed-form-bridge trick expires with the Gaussianity of the base bridge.
Remark 6.3 (What Adjoint Matching cannot take as a terminal cost).
Theorem 6.1 requires at a fixed time with a differentiable. The problem this course is actually about — reach before returning to — has a terminal cost that is an indicator evaluated at a random hitting time. There is no gradient at and no fixed to impose it at. A state-dependent likewise adds terms the lean form does not have, and the fixed point of the regression is then no longer .
Value Matching: The Residual That Vanishes
Doob’s Lagrangian has a path-family bias. Adjoint Matching has a conditional variance. Value Matching is built so that the residual vanishes pathwise at the true value function, which makes its floor exactly .
Two things have to be fixed before any of this works on a committor.
The Doob drift is singular on . The exact control is , and on , so there. Definition 6.1 softens to , which is bounded away from and . Softening is not a vanishing tolerance: has different boundary values, a different optimal control, and a different reactive ensemble.
The horizon is a random hitting time. is when the path first reaches , and it has no upper bound. Cap it: , and the loss carries a separate branch for trajectories that ran out of time. Capping is a coverage cost, not a bias: the committor error stays comparable across a wide range of caps, down to hit rates well below .
Figure 6.12. Left: q versus q_\xi. Middle: softening reshapes the control in the interior, not only at \partial A. Right: |u^\star| on \partial A tracks \sigma q'(x_A)/\xi.
Definition 6.3 (Value Matching).
For and a locally Lipschitz drift , sample
The VM residual along , with a coefficient on that we are about to settle, is
The loss is . Trajectories may be generated by any reasonable — that freedom is the point.
The paper’s printed definition (arXiv:2604.13213, the display for ) carries . The paper’s own corollary proof starts from . At these are the same number, which is why the discrepancy is invisible in released implementations. At they are different losses, and only one of them is right.
Theorem 6.2 (The Residual Vanishes Pathwise iff c=1).
Let be the true stationary value of the hitting-time problem, so and solves the HJB off , with on . Along any trajectory of Definition 6.3, the residual left at is
This is identically zero if and only if. In particular, at the printed definition and the proof coincide, and implementations that set are unaffected.
Proof
Apply Itô’s formula to the stationary field :
ô
The boundary terms in Definition 6.3 cancel exactly: on a hit, and there; on a time-out, and . What survives is
The stationary HJB is (substitute into ). Substituting it collapses the bracket to .
◻
Figure 6.13 is the prediction with a number attached. At both readings refine as in the rms residual (so the squared loss is ). At , the printed coefficient leaves a residual that does not refine; still does.
Figure 6.13. RMS residual at the true \Phi versus \Delta t. At \kappa=1 the two readings coincide and both follow \sqrt{\Delta t}. At \kappa=2, only c=1 (the proof) refines; c=1/\kappa (the printed definition) sits on a plateau.
Theorem 6.3 (First-Order Optimality of Capped VM).
If is a first-order critical point of in a suitable Hölder space with polynomial growth, then and . Nested Feynman–Kac with a stop-gradient on the outer copy of is also FO-optimal; the naive squared difference is not — the true committor is not even a critical point. Two losses that look almost identical can have opposite optimality properties depending on stop-gradient placement.
Proof idea
The directional derivative of along a perturbation rewrites, via Itô and Girsanov, as , where is the HJB residual functional of . A Dynkin representation writes itself as the same linear form applied to a special solving a linear PDE driven by that residual. Choosing collapses the directional derivative to . FO criticality forces , which is the HJB, hence .
Detaching one gradient is policy iteration
appears twice in the residual: once as the vector the increment is projected onto, and once inside the term, which is where the quadratic of the HJB comes from. If the inner copy is detached — , stop_gradient — then the residual is affine in the parameters of a linear model, , so the loss is a quadratic form and its minimiser is one least-squares solve away. Update , resample, repeat. That loop is Howard policy iteration: detaching the quadratic term is the linearisation that turns one Bellman step into a linear solve. The neural version is the same iteration with a nonlinear and a gradient step in place of the exact solve.
Figure 6.14. Detached VM as repeated least squares. Left: \hat q_\xi after a few lstsq solves. Middle: committor error falls two orders of magnitude. Right: the loss value barely moves, because once the model is roughly right the residual is Euler–Maruyama error.
Off-policy : legal for hitting times, not for time-dependent
The drift and the noise scale are free parameters of the estimator, not of the problem. The strongest version of the claim is that one can train from plain, uncontrolled dynamics — , a sampler that knows nothing about the answer — and land on the same .
Proposition 6.2 (The kappa Freedom Needs Stationarity).
Redo the Itô computation of Theorem 6.2 with a time-dependent. The boundary terms no longer clean up: what survives at the true value function is
which is zero for every only when . Consequently is admissible for hitting-time problems, whose value function is stationary, and not for fixed-horizon problems, whose value function depends on . Off-policy sampling () remains available in both settings; it is the noise-scale freedom that stationarity buys.
On the committor problem, training from lands on the same answer with no reweighting; is indistinguishable and costs extra error. Capping at does not bias the committor: error stays within a small factor across a wide range of caps, even when most trajectories miss . What a short cap costs is coverage, not correctness.
Figure 6.15. Left: off-policy training from v=b matches on-policy across \kappa\in[0.5,2]; \kappa=4 is worse. Right: horizon cap T changes the hit rate (dashed) but not the committor error (solid) by much.
Remark 6.4 (The known floor is still not an error bar).
Value Matching’s floor is at the exact and only there. At finite that floor is buried under . At the best representable the residual stops refining with , because representation error enters as a step-independent term. Figure 6.14 already shows a run whose committor error fell by two orders of magnitude while the loss value moved by a small fraction and ended at the score of the true at the same step size.
Related Losses
Value Matching does not sit alone. A short map of siblings, cousins, and cautionary tales; details in the REACT appendix on related losses and in Nüsken–Richter (arXiv:2005.05409).
Feynman–Kac / Strahan-type losses. A natural probabilistic loss for the (unrescaled) committor is
True nested conditional: FO-optimal (critical points committor), but not scalable — many trajectories per start to estimate the inner conditional expectation.
Stopgrad outer with in the terminal: still FO-optimal.
No stopgrad squared difference: not FO-optimal. The true committor is not even a critical point.
That is the cautionary tale already flagged in Theorem 6.3. Two losses that look almost identical can have opposite optimality properties depending on stop-gradient placement. VM is designed so the residual geometry has the good FO property and scales (one path contributes without nested expectations).
BSDE / moment / log-variance. Deep BSDE methods and related path-integral losses minimise discrepancies between a candidate value and a stochastic representation along controlled or uncontrolled paths. Finite-horizon VM is closely related to the BSDE loss of Nüsken–Richter, but comes with FO guarantees. Moment and log-variance losses are siblings in the same family.
PIPS / PICE. Holdijk, Hooft, Jørgensen, et al., NeurIPS 2023 (arXiv:2207.02149), train a control by rolling out the controlled molecular SDE and differentiating a path-integral cost — the simulation-based cousin of Doob’s Lagrangian. On-policy, memory-heavy, no FO theorem of the VM type. Module 7 puts it next to classical TPS shooting and Variational-Doob on the method map.
REINFORCE / score-function. Differentiate the SOC cost using likelihood-ratio gradients without backprop through the SDE. Variance is typically high. VM is the residual-matching branch; pathwise reparameterisation (backprop through the SDE) is the other.
And the FKE row, because it is the comparison that makes VM’s design visible:
Loss family
Scalable
FO true /
Off-policy natural
Nested FKE
no
yes
depends
Stopgrad FKE
yes
yes
limited
Naive squared FKE
yes
no
limited
PIPS / pathwise backprop
yes (memory)
unproven
no
VM
yes
yes
yes
BSDE (generic)
yes
often unproven
varies
Doob’s Lagrangian
yes (quadrature)
inside the family
n/a
Adjoint Matching
yes (rollouts)
in conditional expectation
no
One Problem, Three Algorithms
Hold the system, the representation, and the budget fixed, and count the only currency a molecular simulation actually spends: evaluations of . Score the control in , the occupancy of the optimal process — a uniform grid norm grades a rollout method on regions no sample ever visits.
Doob’s Lagrangian cannot share a -basis: it does not parameterise at all. Its knob is the size of the path family. Adjoint Matching and Value Matching share a basis and a solver; every difference is the loss.
Figure 6.16. Error against force-evaluation budget. Left: three seeds of VM and AM, and DL at K=1,2,3. Right: the two rollout arms with min–max bands; the ranges overlap. Dotted: the shared representation floor.
Three errors, three different origins, each measured rather than assumed:
method
mechanism
the measurement that names it
Doob’s Lagrangian
path-family bias
the excess falls monotonically with and with nothing else
Adjoint Matching
conditional variance
the AM loss splits into a bias that bottoms out at the truth under a variance floor orders of magnitude larger
Value Matching
discretisation, plus the representation floor leaking in
the residual at the exact refines as ; at the best representable it plateaus
Figure 6.17. Left: error decomposed into representation floor, method, and seed range. Right: each mechanism responds to its own knob — K for DL, \Delta t for VM. AM's variance/bias ratio does not move with those knobs.
Remark 6.5 (Seeds, pairing, and a negative).
If two rollout methods share a random-number stream, their first trajectories from are bit-identical and the honest statistic is paired. Medians can differ by a factor of two while seed ranges overlap and the sign of the comparison flips on one seed of three. Three seeds do not separate AM from VM at a fixed budget. A single-number comparison of noisy control learners is under-reporting.
What None of the Three Has
All three losses are minimised at the same . A minimiser is not an error bar.
Value Matching comes closest, because it alone knows what its minimum value is — zero. Knowing the floor is not the same as knowing the distance to it. Far from the optimum, all three losses rank candidates well, AM included. Near the optimum — exactly where one would want a stopping criterion — AM’s ranking fails, because the variance dominates the signal. Ranking is not measuring, and the ranking that survives is the one you need least.
What none of the learned controls reports is the distance to . That sentence is the one to carry into Module 7.
Figure 6.18. Loss versus true occupancy-weighted control error, now over a wide error range. Far from the optimum all three rank; Spearman is not a substitute for an error bar.same object: none reports ||u_hat - u*||Doob Lagrangianrestricts themarginal pathno estimator,a familyfloor =family biasAdjoint Matchingcondition on state,average a costateno family,a variancefloor =cond. varianceValue Matchingpathwise residual,any samplerneither restriction;pay in dt, xifloor = 0buried under dt
These are not three attempts at the same algorithm with different amounts of polish. Each one removes a difficulty the others carry and pays for it somewhere else: Doob’s Lagrangian deletes the estimator and keeps a family; Adjoint Matching deletes the family and inherits a variance; Value Matching deletes both and pays in trajectories, in a softening that redefines the problem, and in a discretisation that hides its own exact floor.
The accompanying calculations are in notebooks/soc/09_one_problem_three_losses.ipynb through notebooks/soc/13_bakeoff_and_taxonomy.ipynb.