Examples

Here we provide two examples that reproduce some of the results from 1, and three examples that reproduce some of the results from 2. These examples can also be accessed with Jupiter notebook from our GitHub repository .

Moving beyond generalization to accurate interpretation of flexible models

The first example generates synthetic data from a double-well potential and uses this data to fit the model potential. It reproduces Figure 3 in the main text 1. The second example demonstrates our feature consistency method for model selection in the case of stationary dynamics. It reproduces Figure 5 in the main text 1.

Learning non-stationary Langevin dynamics from stochastic observations of latent trajectories

The first example generates synthetic data from the ramping dynamics, and optimizes the model potential on this data. Also the importance of various non-stationary components for accurate model inference is demonstrated. It reproduces Figures 2,3 in the main text 2. The second example generates two synthetic datasets from ramping and stepping dynamics, and uses this data to infer the model potentials. It also infers the model potential, the initial distribution of the latent states, and the noise magnitude from data generated from the ramping dynamics. It reproduces Figure 4 in the main text 2. The third example demonstrates feature consistency analysis for model selection for the case of non-stationary data. It reproduces Figure 5a-c in the main text 2.

References

1(1,2,3)

Genkin, M., Engel, T.A. Moving beyond generalization to accurate interpretation of flexible models. Nat Mach Intell 2, 674–683 (2020).

2(1,2,3,4)

Genkin, M., Hughes, O. and Engel, T.A. Learning non-stationary Langevin dynamics from stochastic observations of latent trajectories. Nat Commun 12, 5986 (2021).