Papers
Topics
Authors
Recent
Search
2000 character limit reached

Dynestyx: Unified SSM Inference Library

Updated 4 July 2026
  • Dynestyx is a probabilistic programming library for state-space models, offering streamlined model specification, state and parameter inference, and uncertainty quantification.
  • It supports both discrete-time and continuous-time models, seamlessly integrating various filtering, smoothing, and Bayesian inference methods for dynamical systems.
  • The library separates model definition from numerical inference, enabling rapid experimentation and method comparison while maintaining principled uncertainty estimates.

Dynestyx is a probabilistic programming library for dynamical systems, built as an extension of NumPyro, with first-class support for state-space models (SSMs) in a modern probabilistic programming workflow (Waxman et al., 15 Jun 2026). Its stated purpose is to make SSMs easier to specify, fit, and compare while retaining specialized inference methods that exploit dynamical structure. The library is organized around a single, unified interface through which 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.

1. Problem setting and design objective

State-space models are presented as the standard formalism for Bayesian treatment of dynamical systems, with applications in statistics, signal processing, machine learning, and neuroscience. Dynestyx is motivated by the observation that the best inference methods for dynamical systems are often trapped in bespoke codebases, which makes them harder to use, harder to combine with general probabilistic programming workflows, and less accessible for practitioners (Waxman et al., 15 Jun 2026).

Dynestyx is designed to address this by providing a uniform interface for dynamical models, support for both state inference and parameter inference, compatibility with a wide range of filters, smoothers, and Bayesian inference algorithms, and a workflow aligned with the probabilistic programming principle of separation of concerns. In that workflow, the model specifies the data-generating process, while inference choices are made later, at runtime.

The central design claim is that dynamical-system inference should behave like ordinary probabilistic programming language modeling, but with first-class support for time evolution and state-space structure. This suggests a deliberate attempt to orthogonalize model specification, likelihood approximation, and posterior computation rather than embedding a fixed algorithmic choice into the model definition.

2. State-space formalism

Dynestyx is built around the standard state-space model formalism. The latent state is denoted xtRdxx_t \in \mathbb{R}^{d_x} with uncertain initial condition p(x0)p(x_0). The framework allows both discrete-time and continuous-time latent dynamics (Waxman et al., 15 Jun 2026).

For discrete-time systems, the latent evolution is written as

xt+1p(xt+1xt,ut,t).x_{t+1} \sim p(x_{t+1} \mid x_t, u_t, t).

For continuous-time systems, the latent dynamics are written as

dxt=f(xt,ut,t)dt+L(xt,ut,t)dβt,\mathrm{d}x_t = f(x_t, u_t, t)\,\mathrm{d}t + L(x_t, u_t, t)\,\mathrm{d}\beta_t,

where f(x,u,t)f(x,u,t) is the drift, L(x,u,t)dβtL(x,u,t)\mathrm{d}\beta_t is the diffusion term, βt\beta_t is Brownian motion, and utu_t is an optional exogenous control input.

The observation model is

ytp(ytxt,ut,t).y_t \sim p(y_t \mid x_t, u_t, t).

Observations are discrete-time even when the latent dynamics are continuous-time.

The dynamics may depend on parameters θRdθ\theta \in \mathbb{R}^{d_\theta}, and the observation model may depend on parameters p(x0)p(x_0)0. The resulting inference problem concerns the joint unknowns

p(x0)p(x_0)1

The paper explicitly supports both discrete-time SSMs and continuous-time or continuous-discrete SSMs. When discussing the literature table, it refers to the latter as continuous-discrete SSMs. A plausible implication is that the library is intended not merely for a single dynamical regime but for a common abstraction spanning both transition-kernel and stochastic-differential formulations.

3. Inference targets and computational pipeline

Dynestyx supports two central inference tasks for SSMs: state inference and parameter inference. For latent states, it supports filtering,

p(x0)p(x_0)2

and smoothing,

p(x0)p(x_0)3

These are described as uncertainty-aware estimates of hidden trajectories (Waxman et al., 15 Jun 2026).

For parameter inference or system identification, the library targets inference over p(x0)p(x_0)4 and p(x0)p(x_0)5 using the marginal likelihood

p(x0)p(x_0)6

or more precisely an approximation

p(x0)p(x_0)7

That estimate enters the log posterior as

p(x0)p(x_0)8

This is characterized as the standard two-step Bayesian system identification pattern: first compute a likelihood estimate via a filter or related estimator, then run general Bayesian inference over parameters using that estimate. The computational workflow is summarized as: specify prior and dynamical model; choose an approximate likelihood estimator p(x0)p(x_0)9; use a general Bayesian algorithm to infer

xt+1p(xt+1xt,ut,t).x_{t+1} \sim p(x_{t+1} \mid x_t, u_t, t).0

and then recover state posteriors and predictive distributions.

The paper identifies the main contribution as unifying model specification and inference: the user specifies the model once and then pairs it with different inference methods. It emphasizes that model specification is separated from likelihood approximation or filtering and from parameter inference. This suggests that systematic method comparison and rapid experimentation are treated as primary workflow objectives rather than incidental conveniences.

4. Programming interface and effect-handler semantics

The programming interface is a Python API built on NumPyro and JAX, centered on DynamicalModel, DiscreteTimeStateEvolution, ContinuousTimeStateEvolution, dsx.sample(...), and effect-handler-based interpretations such as Filter, Simulator, and Discretizer (Waxman et al., 15 Jun 2026).

A stylized model structure in the paper defines priors using ordinary NumPyro code, packages the latent dynamics and observation process into a DynamicalModel, and calls dsx.sample(...) to represent a dynamical latent trajectory. The model itself does not commit to a specific inference algorithm or numerical discretization. This is described as an explicit design choice: the model describes the idealized generative process, while numerical approximations are introduced only when inference runs.

A representative workflow layers effect handlers so that Discretizer() handles numerical discretization of continuous-time dynamics, for example Euler–Maruyama; Filter(...) interprets dsx.sample as a filtering operation and computes an approximate marginal likelihood; and Simulator() interprets the model to generate predictive samples. Standard NumPyro inference algorithms such as HMC can then operate on the resulting target distribution.

The paper identifies the use of effect handlers as distinctive. In practical terms, the same model can be interpreted as a filter, simulator, or discretized dynamical process without rewriting the model itself. This suggests that Dynestyx uses the effect-handler mechanism to bridge structured dynamical inference and general Bayesian inference engines rather than introducing a separate modeling language for dynamical systems.

5. Implemented model classes and inference ecosystem

Dynestyx explicitly supports both discrete-time and continuous-time state-space models. The state estimation methods are integrated through dynamax, cd-dynamax, and cuthbert, and cover Kalman filtering and RTS smoothing, extended Kalman filtering and RTS smoothing, unscented Kalman filtering, ensemble Kalman filtering, and particle filtering or smoothing, including differentiable particle methods (Waxman et al., 15 Jun 2026).

Because interpreted Dynestyx models are ordinary NumPyro or JAX models, they can be combined with variational inference, HMC or NUTS, stochastic gradient MCMC, MALA and other gradient-informed MCMC methods, and generic Metropolis-Hastings-type algorithms. The paper highlights that some combinations appear to be newly implemented, especially certain pairings of likelihood estimators with gradient-informed or advanced Bayesian methods.

The literature map described in the paper organizes combinations of likelihood estimators—KF, EKF, UKF, EnKF, PF, HMM, and continuous-discrete variants—with Bayesian parameter inference methods including variational Bayes, gradient-informed MCMC, SG-MCMC, and generic MH. Examples listed as available in Dynestyx but not explicitly present in prior literature include EKF with variational Bayes, EnKF with gradient-informed MCMC, continuous-discrete EKF with variational Bayes, and various other cross-combinations.

The practical significance assigned to this design is the availability of a large design space of inference pipelines by construction. A plausible implication is that the library treats method composition itself as a first-class research object, allowing cross-product combinations of model type, likelihood estimator, and posterior inference method within a common abstraction.

6. Mixed-effect dynamical systems and uncertainty quantification

Dynestyx implements mixed-effect dynamical systems via a plate primitive. This allows representation of models with population-level shared parameters, group-specific or subject-specific latent variation, and repeated datasets or units in the same model (Waxman et al., 15 Jun 2026). The paper cites mixed-effect dynamical systems in the style of Wang et al. (2014) and Picchini et al. (2010).

The stated importance of mixed-effects is that many applications require inference of a population model while accounting for heterogeneity across subjects, trials, cells, or experimental units. Dynestyx’s key point is that these mixed-effect models remain compatible with the same inference stack: any supported likelihood estimator and any supported parameter inference method.

The library also emphasizes principled uncertainty quantification at multiple levels: uncertainty in latent states xt+1p(xt+1xt,ut,t).x_{t+1} \sim p(x_{t+1} \mid x_t, u_t, t).1, uncertainty in dynamics parameters xt+1p(xt+1xt,ut,t).x_{t+1} \sim p(x_{t+1} \mid x_t, u_t, t).2, uncertainty in observation parameters xt+1p(xt+1xt,ut,t).x_{t+1} \sim p(x_{t+1} \mid x_t, u_t, t).3, and uncertainty in predictions via posterior predictive simulation. Because the system is probabilistic-programming-based, outputs are not only point estimates but posterior distributions, filtering distributions, smoothing distributions, and posterior predictive distributions.

The paper frames this as especially important for dynamical systems, where uncertainty compounds over time and predictive uncertainty is often as important as mean trajectory estimates. This suggests that Dynestyx is intended not simply as a fitting tool for hidden trajectories but as an infrastructure for fully Bayesian dynamical analysis.

7. Position within probabilistic programming

The practical advantages identified for Dynestyx are a unified interface, separation of concerns, compatibility with NumPyro, support for both discrete and continuous-time systems, mixed-effect modeling, uncertainty-aware outputs, and access to a rich algorithmic ecosystem through JAX, NumPyro, and existing filtering libraries (Waxman et al., 15 Jun 2026). These points collectively define its position as a probabilistic programming library in which state-space models are treated as first-class citizens.

Within that framing, the library’s characteristic move is to separate the idealized generative process from the numerical and inferential machinery used to analyze it. One model specification can therefore be used with multiple inference algorithms, and the user does not need to hard-code a specific filter or discretization into the model. In the paper’s own summary, Dynestyx aims to make advanced Bayesian system identification more modular, reusable, and accessible than existing bespoke dynamical-systems codebases.

A plausible interpretation is that Dynestyx occupies an intermediate position between specialized dynamical-systems software and general-purpose probabilistic programming languages. It preserves the formal structure of state-space modeling while exposing that structure to modern Bayesian inference workflows, including state estimation, parameter inference, posterior prediction, and mixed-effect hierarchical analysis.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to dynestyx.