Skip to content

Expose deterministic and Gaussian ODE flow transitions - #442

Open
mattlevine22 wants to merge 8 commits into
mainfrom
codex/ukf-ode-flow
Open

mattlevine22 wants to merge 8 commits into
mainfrom
codex/ukf-ode-flow

Conversation

@mattlevine22

@mattlevine22 mattlevine22 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

The purpose of this PR is to simplify/generalize the state evolution classes coming from ODEFlow discretization, with the aim of resolving #441. However, I now see that the other barrier there lies in supporting time-varying transitions from t_now -> t_next, which is a separate undertaking. Despite no new features from this PR, I do think it is worthwhile, as it sets us on a better footing for treating ODEFlow discretization as simply GaussianStateEvolutions or DeterminsticStateEvolutions---less checks later on.

ODE flow transitions

Discretizer(ODEFlowConfig(...)) now exposes the distribution of an ODE transition through its state-evolution class.

jitter_scale State evolution Conditional distribution
Zero DeterministicStateEvolution A Delta at the ODE endpoint
Positive GaussianStateEvolution Independent Normals with mean equal to the ODE endpoint and covariance jitter_scale**2 * I

Both classes share the private _ODEFlowStateEvolution base and compute .F with the configured ODE solver. Default handler selection now recognizes a jittered flow through the existing Gaussian type check.

Discrete filter behavior

  • Cuthbert EnKF accepts both transition types. Cuthbert EKF requires a differentiable transition log density. It raises ValueError for any DeterministicStateEvolution and suggests EnKF for Gaussian observations. For an ODE flow, the error also explains that setting jitter_scale > 0 enables EKF.
  • cd_dynamax EKF and UKF now raise NotImplementedError for either ODE flow. Dynestyx’s shared discrete EKF/UKF adapter calls nonlinear transitions as F(x, u, 0, 0) and nonlinear observations as h(x, u, 0). Both filters and smoothers use this adapter. An ODE flow needs the elapsed time between observations even when its drift is autonomous. See Warn when discrete CD-Dynamax EKF/UKF ignores time-varying callables #231 for the existing warning about placeholder times.

The goal of #441 is to run a discrete UKF on an ODE flow. Dynestyx currently routes UKFConfig only to cd_dynamax. Cuthbert provides unscented quadrature, but using it through UKFConfig requires a Dynestyx integration. The UKF reproducer in #441 remains open.

Verification

Two assertions in existing discretizer tests check the transition class at zero and positive jitter. All 24 tests in tests/test_discretizer_methods.py passed locally.

@mattlevine22

Copy link
Copy Markdown
Collaborator Author

bleh AI

@mattlevine22 mattlevine22 changed the title Support discrete Gaussian filtering and smoothing of ODE flows Support ODEFlow discretization in discrete UKF and EKF Nov 18, 2026
@mattlevine22 mattlevine22 reopened this Nov 18, 2026
@mattlevine22 mattlevine22 changed the title Support ODEFlow discretization in discrete UKF and EKF Expose deterministic and Gaussian ODE flow transitions Nov 18, 2026

@DanWaxman DanWaxman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks overall reasonable... Could you also update the developer API change accordingly?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants