1. What this solves
Two systems can have the same stationary histogram while one circulates around its density contours. Timed trajectories let UIDD estimate the circulation as well as the landscape. Its outputs are a dimensionless potential, diffusion, reversible and irreversible drifts, and an entropy production rate (EPR) for a specified time reversal.
2. When to use
Use consecutive observations with known short, positive lags. Model a time-homogeneous Markov Itô diffusion on finite-dimensional Euclidean coordinates with a smooth, unique normalizable stationary density. The reference assumes nonsingular noise, natural boundaries and ordinary reversal of the recorded path. Training paths may begin out of equilibrium. Estimating a global stationary average requires credible steady-state coverage, either observed or simulated after equilibration.
Check whether trajectories from different starting regions approach the same late-time histogram, and compare the histogram across later time windows. Check confinement in the fitted model as well. For example, a V that grows at least quadratically outside a bounded region makes exp(−V) integrable on Euclidean space. Confinement of the model and agreement of finite histograms support different parts of the assumption. If the invariant law remains uncertain, record the density prerequisite as unknown, report supported finite-time predictions and leave stationary density and entropy production unresolved.
3. When not to use (and what to use instead)
| Situation | Use instead |
|---|---|
| Drift changes under an imposed protocol, or unconfined motion has no invariant density | Model the protocol or the transient drift directly. |
| The requirement is to find extra coordinates that close a measured observable | Fit Stochastic OnsagerNet with microscopic trajectories and validate the augmented Markov state. |
| A hard reflecting wall determines confinement | Impose no flux at the wall and use a boundary-aware transition model there. A smooth confining potential on an open domain fits the reference assumptions. |
| Only independent stationary snapshots are available | Estimate the density from samples. Obtain timed pairs to resolve current or entropy production. |
| Odd variables such as momentum require a parity flip under physical time reversal, or the noise is singular | Specify the physical reversal and use an appropriate path-space formulation for those coordinates and noise directions. |
4. Algorithm
- Choose smooth trainable functions V, σ and d−1 scalar band functions b on the d-dimensional state. Ensure exp(−V) is integrable. A squared nonlinear feature lift with a positive quadratic floor is one choice. Use a full-rank noise factor, e.g. a lower triangular matrix with positive diagonal. In dimensionless unit-temperature variables set M = σσᵀ/2. Set W[i,i+1] = b[i], W[i+1,i] = −b[i], all other entries zero.
- Compute each row divergence (div K)[i] = Σⱼ ∂K[i,j]/∂x[j]. Then f_rev = −M∇V + div M, f_irr = −W∇V + div W and f = f_rev + f_irr. The forward SDE is dX = f dt + σ dB. The drift of the stationary reversed path is f_rev − f_irr. Use Eqs. (1–3) of the paper. For constant M or W the corresponding divergence vanishes.
- Split by independent trajectory. Fit the three functions jointly by minimizing the mean Euler–Maruyama Gaussian negative log density. For a pair (x,y,τ), evaluate all heads at x, form r = y−x−τf and C = τσσᵀ. The loss per pair is [d log(2π) + log det C + rᵀC⁻¹r]/2. Factor C for the solve. Use a shorter observation lag to test discretization bias.
- For inference set ρ = exp(−V)/Z. Energy differences do not require Z. The stationary current is ρ f_irr. The local total EPR is q(x) = f_irrᵀM⁻¹f_irr. The global EPR is E_ρ[q] (Eq. 5). Use
stationary_epr(states, dynamics)on equally weighted, well-mixed stationary samples, account for autocorrelation and report uncertainty in inverse time units. Under the stated reversal and ellipticity this average vanishes for a reversible stationary process. - For the linear benchmark V = xᵀSx/2 with constant M,W and S positive definite, the stationary covariance is S⁻¹ and the exact global EPR is −tr(M⁻¹WSW) (Eq. 7). Use this to test orientation, noise normalization and stationary averaging. Published paper · Open equations and algorithm
5. Parameters
| Parameter | Choice |
|---|---|
| Potential gauge and scale | In these units the noise fixes the energy scale. Set V at a reference state to zero for comparisons. State any physical temperature conversion. |
| Noise amplitude | A triangular full-rank factor permits correlated increments. Monitor its smallest singular value and sensitivity of q to its conditioning. |
| Band functions | Fit smooth functions of the whole state. Each fills one fixed oriented pair of matrix entries. |
| Timestep and derivatives | Keep the actual lag on each pair. Use autodiff in a training framework. The CPU reference uses centered spatial differences with relative step 10⁻⁵ for general functions. |
| Stationary samples | Check equilibration, coverage, effective sample size and sensitivity to timestep and initialization. |
7. Verification
Step 1. Export the five operations specified in checks/cases.json from port_adapter.py in your working directory. Run python3 /path/to/uidd/checks/check_port.py and show the output. The two-dimensional variable_drift case supplies analytic state-dependent fields and asks the port to compute the full drift, including both row divergences. An independent analytic result checks this fixture. Other fixtures exercise a three-dimensional skew band, correlated diffusion and normalized likelihood. The fixed loss case checks gradients with respect to the potential stiffness and the noise scale, including the scale's contribution through the mobility divergence. The property checks rotate the Brownian basis and reverse the irreversible drift.
Step 2. Compare held-out increments and stationary histograms, check the forward and reversed currents, and vary the observation lag. Estimate a confidence interval over independent paths or sufficiently long blocks. Test a reversible control. For constant M,W the divergence-sign error is invisible.
Figure 2’s exact linear EPR at λ=1 is 47.0598338 in the authors’ notebook. Integrating the local EPR against the exact Gaussian second moments using the rounded true matrices gives 47.0598274. All five λ settings agree within 10⁻⁵ absolute. This checks Eq. (7) and the EPR normalization. The learned EPR of 48.88 at λ=1 was not reproduced. Authors’ Figure 2 notebook
The separate small fit uses symmetric synthetic innovations chosen to match the Euler–Maruyama likelihood’s first two conditional moments exactly. The correct coefficients are in its model class. It checks coefficient recovery and stationary EPR on this controlled problem. The Lyapunov equation for the inverse of the fitted precision is a structural identity of the linear UIDD model.
8. Failure signatures
| Symptom | Check |
|---|---|
| Correct analytic drift for constant coefficients but stationary current at equilibrium with variable mobility | Check the row derivative index and both divergence signs. |
| Apparent stationary density changes when an arbitrary energy offset is added | Normalize the density or compare potential differences. |
| Correct variance but reversed circulating motion | Check the upper skew-band sign and the forward-time convention. EPR alone is insensitive to reversal. |
| EPR unstable across runs | Check poorly sampled states, conditioning, equilibration, hidden coordinates and lag sensitivity. |
9. Files and commands
Run python3 examples/fit_linear.py from this directory. reference/uidd.py provides general state-dependent function callbacks and the likelihood, reference/linear.py the small fitted model, and reference/fit.py the optimizer.
Run python3 checks/make_cases.py to emit the fixtures. Run python3 verify/check_cases.py, python3 verify/check_stationary.py and python3 verify/check_figure2.py for the broken-port controls, independent fit and source result.
10. Sources
A. Zhu, B. W. Soh, G. A. Pavliotis and Q. Li, Identifiable learning of dissipative dynamics, Nature Communications 17, 9460 (2026). See Eqs. (1–7), Theorem 1, the algorithm in Methods and the linear benchmark. The reference uses the published name UIDD. Paper · Authors’ implementation and benchmark outputs