NeuralFlow: modeling neural activity with continuous latent Langevin dynamics

NeuralFlow is a Python package for modeling neural spiking activity with continuous latent Langevin dynamics. The driving force is optimized from data by gradient-descent algorithm directly in the space of continuous functions. Non-stationary data distribution can be modelled by inferring initial distribution of the latent states and noise magnitude from data using absorbing or reflecting boundary conditions. The modeling results can be interpreted within the dynamical system theory.

We also a model selection tool for choosing the correct model from a sequence produced by gradient descent. Our method is based on direct feature comparison of models fitted on different data samples and aims for finding consistent models with the correct interpretation. In the associated article we demonstrate that our feature consistency analysis outperforms conventional validation-based model selection methods when the goal is finding the model with the correct interpretation. For mode information, see Genkin and Engel (2020) 1, Genkin, Hughes and Engel (2021) 2.

References

1

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

2

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