TL;DR
dynestyx is a new probabilistic programming library built on NumPyro that brings first-class support for State-Space Models (SSMs) to the modern Bayesian workflow. By strictly separating model specification from inference algorithms, it allows researchers to easily combine discrete or continuous-time dynamical models with state-of-the-art filtering and parameter estimation methods.
What Problem Does This Paper Address?
State-space models (SSMs) are the mathematical gold standard for modeling systems that change over time, with widespread applications ranging from signal processing and neuroscience to machine learning. However, performing full Bayesian inference on SSMs—simultaneously estimating both the hidden, evolving states and the static parameters governing the system—is notoriously difficult.
Historically, state-of-the-art inference algorithms have been locked away in bespoke, single-use codebases. Modern Probabilistic Programming Languages (PPLs) have largely struggled to integrate these structure-exploiting methods cleanly. This creates a massive friction point for practitioners, forcing them to choose between the flexibility of a general PPL and the efficiency of specialized dynamical systems software.
Methods
The authors introduce dynestyx, an extension of the JAX-backed PPL NumPyro. The core philosophy of dynestyx is the separation of concerns.
Instead of baking the inference method into the model code, a user defines the idealized data-generating process (the initial conditions, the state evolution equations, and the observation model) using clean, declarative Python code.
At inference time, dynestyx leverages JAX effect handlers to dynamically interpret the model. This allows users to compositionally layer three distinct components:
- A Discretizer: For continuous-time systems defined by Stochastic Differential Equations (SDEs), such as Euler-Maruyama discretization.
- A Filter/Marginal Likelihood Estimator: Options include Kalman Filters (KF), Extended Kalman Filters (EKF), Unscented Kalman Filters (UKF), Ensemble Kalman Filters (EnKF), and Particle Filters (PF).
- A Parameter Inference Routine: Standard NumPyro algorithms like Hamiltonian Monte Carlo (HMC/NUTS), Variational Inference (VI), or Stochastic Gradient MCMC.
dynestyx achieves this by integrating existing high-performance state-estimation libraries like dynamax, cd-dynamax, and cuthbert directly into the NumPyro ecosystem.
Datasets
Not discussed in the paper. As a software architecture and framework announcement, the paper focuses on the library's design and capabilities rather than empirical benchmarking on specific datasets.
Key Insights and Ideas
- Orthogonalization of the Design Space: By decoupling the model from the algorithm,
dynestyxtransforms a fragmented landscape of isolated methods into a clean, combinatoric matrix. A single model function can be paired with entirely different filters and samplers with just a few lines of configuration code. - Unlocking "Missing" Algorithms: Because of this modular architecture,
dynestyxautomatically unlocks combinations of filters and parameter inference methods that have never actually been explicitly published or implemented in literature before. For example, combining Continuous-Discrete Ensemble Kalman Filters (CD EnKF) with gradient-informed MCMC is now possible out-of-the-box. - Natively Hierarchical: The library supports mixed-effect dynamical systems via a simple
plateprimitive, making it easy to model populations where individuals share global parameters but possess unique individual dynamics.
Key Results
The primary result of the paper is the structural mapping of the SSM inference landscape. The authors demonstrate that dynestyx successfully unifies dozens of disparate methodologies under one syntax.
The table below highlights how dynestyx maps combinations of marginal likelihood estimators and Bayesian inference methods to existing literature, with the + signs indicating entirely new algorithmic combinations made available by the library:
Limitations and Future Work
While the unified representation serves as an excellent testbed for discovering algorithmic "rules of thumb" and diagnosing model mis-specifications, the authors do not deeply explore the performance trade-offs or scalability limits of these combinations in this introductory paper. Because dynestyx relies on JAX and NumPyro, its performance and limitations (such as memory constraints during particle filtering or the bias introduced by ensemble methods) are inherently tied to those underlying frameworks. Future work will likely focus on establishing empirical benchmarks to guide users through this newly opened design space.
Summary updated