Dynestyx: A Probabilistic Programming Library for Dynamical Systems
Summary
Dynestyx is a new probabilistic programming library designed to provide first-class support for state-space models (SSMs) within dynamical systems. Extending the NumPyro PPL, dynestyx offers a unified interface for specifying arbitrary priors for discrete-time or continuous-time dynamical systems, performing inference over mixed-effect data, and making state and parameter estimates with principled uncertainty quantification. It addresses the historical difficulty of incorporating dynamical systems into modern PPLs by orthogonalizing model specification, marginal likelihood estimation, and parameter inference. The library integrates with existing software such as dynamax, cd-dynamax, and cuthbert, enabling a wide range of advanced state estimation algorithms like Kalman filtering, extended Kalman filtering, and particle filtering. Dynestyx models are compatible with generic JAX routines for parameter inference, including variational inference and HMC/NUTS, and introduce previously unimplemented combinations of methods.
Key takeaway
For Machine Learning Engineers or Data Scientists implementing Bayesian inference for dynamical systems, dynestyx simplifies complex workflows. You can now specify models and interchange advanced inference methods, including various Kalman and particle filters, through a unified interface. This enables rapid development and systematic comparison of algorithms, allowing you to achieve principled uncertainty quantification and explore novel method combinations for your time-series analysis.
Key insights
Dynestyx unifies state-space model specification and Bayesian inference, making advanced methods accessible in probabilistic programming.
Principles
- Separate model specification from inference methods.
- Exploit rich, recursive structure of SSMs for inference.
- Combine diverse ML estimators and parameter inference.
Method
Specify a model as a Python function defining joint priors, packaging them into a DynamicalModel, and sampling with dynestyx.sample(...). Inference then uses user-specified effect handlers for approximate marginal likelihood computation.
In practice
- Use dynestyx for Bayesian inference in dynamical systems.
- Explore various Kalman and particle filtering algorithms.
- Apply generic JAX routines for parameter estimation.
Topics
- Probabilistic Programming
- State-Space Models
- Bayesian Inference
- NumPyro
- Kalman Filtering
- Particle Filtering
Code references
Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, Data Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by stat.ML updates on arXiv.org.