Dynestyx: A Probabilistic Programming Library for Dynamical Systems

Daniel Waxman, Dmitry Batenkov, John Feser, Andy Zane, Eli Bingham, Youssef Marzouk, Matthew E. LevinearXiv 2026 · arXiv

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:

  1. A Discretizer: For continuous-time systems defined by Stochastic Differential Equations (SDEs), such as Euler-Maruyama discretization.
  2. 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).
  3. 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, dynestyx transforms 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, dynestyx automatically 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 plate primitive, 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:

Table 1: Mapping combinations of ML estimators and Bayesian inference methods to existing literature. Entries with "+" denote novel combinations available in dynestyx.

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

Abstract

State-space models (SSMs) are the standard formalism for Bayesian treatment of dynamical systems, with natural applications in statistics, signal processing, and machine learning. Despite their importance in both theory and application, dynamical systems have proven difficult to incorporate in modern probabilistic programming languages (PPLs), making state-of-the-art methods less accessible to practitioners and introducing friction in following the "Bayesian workflow." We introduce dynestyx, a probabilistic programming library with first-class support for SSMs, including state-of-the-art methods in the estimation of both states and parameters. Through a single, unified interface, users may specify arbitrary priors for discrete-time or continuous-time dynamical systems, perform inference over mixed-effect data, and make state and parameter estimates with principled uncertainty quantification.
BibTeX
@misc{waxman2026dynestyx,
  author = {Daniel Waxman and Dmitry Batenkov and John Feser and Andy Zane and Eli Bingham and Youssef Marzouk and Matthew E. Levine},
  title = {{Dynestyx: A Probabilistic Programming Library for Dynamical Systems}},
  year = {2026},
  eprint = {2606.16985},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.16985},
}

Loading related content...

Figure