NormFlowSDE: Normalizing Flows for Amortized Bayesian State Estimation
Organizations: Chair of Mechatronics, University of Augsburg, Germany
Abstract
Bayesian state estimators, such as Kalman filters, estimate states from noisy observations based on dynamical models. However, obtaining accurate models can be challenging when the system involves effects that are difficult to model faithfully, such as friction, impacts, and deformation in contact-rich manipulation. Uncertainty in system parameters, inputs, and disturbances, together with simplified noise models, can further introduce simulation-to-reality mismatch and degrade estimation accuracy. These limitations motivate learning a distribution over state trajectories conditioned on observations and controls without explicitly specifying the underlying physical models. We introduce NormFlowSDE, an amortized Bayesian state estimator that learns a distribution over state trajectories by combining neural stochastic differential equations with conditional normalizing flows. Its key design choice is to utilize the capability of normalizing flows to learn stochastic behavior of variables, while leveraging the continuous-time dynamics of SDEs to model the evolution of states over time. Once trained, the model draws state paths for new measurement sequences without per-sequence optimization. In addition, we connect NormFlowSDE to stochastic continuous-time dynamics by proving weak convergence of a mean-centered, drift-corrected inference scheme to an Itô diffusion under stated assumptions. Finally, we benchmark NormFlowSDE against direct estimators and learned particle filters based on normalizing flows on partially observed dynamical systems, including simulated systems and real-world robot datasets. The results show that NormFlowSDE attains the lowest estimation error with calibrated uncertainty intervals on both robot datasets and filters four times faster than the fastest particle filter on every dataset.
Figures & tables
| Pendulum | Lorenz–96 | ALOHA insertion | REASSEMBLE | |
| Source | simulated | simulated | sim. demonstrations | real robot |
| State dimension | 2 | 12 | 14 | 7 |
| Observed coordinates | 2 | 6 | 14 | 7 |
| Control dimension | 1 | – | 14 | 9 |
| Observation noise | mixture, | mixture, | mixture, | mixture, |
| Time step | 0.05 | 0.02 | 0.02 | 1/30 |
| Dataset | Route | Method | RMSE | CRPS | Cov. 90% | Width | Latency (ms) |
|---|---|---|---|---|---|---|---|
| Pendulum | direct | NormFlowSDE | 0.0736 0.0029 | 0.0387 0.0012 | 0.920 0.002 | 0.2321 0.0061 | 2.0 |
| Latent NSF | 0.1534 0.0325 | 0.0666 0.0100 | 0.889 0.004 | 0.3224 0.0242 | 1.7 | ||
| Latent SDE | 0.1063 0.0024 | 0.0531 0.0021 | 0.933 0.012 | 0.3388 0.0069 | 2.0 | ||
| SigKer SDE | 0.1815 0.0173 | 0.0993 0.0107 | 0.174 0.080 | 0.1068 0.0321 | 2.0 | ||
| PF | NF-DPF | 0.0792 0.0053 | 0.0392 0.0021 | 0.913 0.004 | 0.2500 0.0192 | 8.5 | |
| NSF-PF | 0.0650 0.0004 | 0.0333 0.0001 | 0.858 0.006 | 0.1767 0.0032 | 8.6 |
| Dataset | Route | Method | RMSE | CRPS | Cov. 90% | Width | Latency (ms) |
|---|---|---|---|---|---|---|---|
| ALOHA | direct | NormFlowSDE | 0.0523 0.0001 | 0.0291 0.0001 | 0.911 0.008 | 0.1787 0.0066 | 9.7 |
| Latent NSF | 0.0559 0.0018 | 0.0308 0.0011 | 0.878 0.021 | 0.1709 0.0133 | 5.8 | ||
| Latent SDE | 0.0597 0.0006 | 0.0332 0.0004 | 0.884 0.022 | 0.1856 0.0133 | 8.7 | ||
| SigKer SDE | 0.0648 0.0015 | 0.0426 0.0039 | 0.250 0.158 | 0.0372 0.0249 | 9.1 | ||
| PF | NF-DPF | 0.0969 0.0044 | 0.0565 0.0026 | 0.751 0.009 | 0.2198 0.0046 | 50.2 | |
| NSF-PF | 0.0828 0.0006 | 0.0484 0.0003 | 0.830 0.001 | 0.2321 0.0004 | 38.2 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Pendulum | Lorenz–96 | ALOHA | REASSEMBLE | |
|---|---|---|---|---|
| Window feature / encoder width | 16 / 16 | 128 / 128 | 64 / 64 | 64 / 64 |
| Feature network width / depth | 53 / 2 | 266 / 3 | 153 / 3 | 150 / 3 |
| Coupling layers / coupling hidden width | 2 / 16 | 2 / 64 | 2 / 64 | 2 / 64 |
| Log-scale bound (stage 1 / 2) | 1 / 1 | 1.5 / 1.5 | 1 / 1 | 1 / 2 |
| Pendulum | Lorenz–96 | ALOHA | REASSEMBLE | |
| Updates | 4400 | 14500 | 5000 | 7000 |
| Trajectories per update | 16 | 64 | 1 | 4 |
| Learning rate | ||||
| Segment length (states) | 11 | 5 | 5 | 5 |
| (normalized units) | 1 | 1 | 1 | |
| 1 | 0.1 | 1 | 1 |
| Parameters ( ) | Pendulum | Lorenz–96 | ALOHA | REASSEMBLE |
|---|---|---|---|---|
| NormFlowSDE (stage 2) | 9.9 | 365.4 | 129.6 | 120.0 |
| NF-DPF | 9.6 | 366.3 | 128.9 | 120.0 |
| NSF-PF | 9.9 | 365.1 | 129.6 | 119.8 |
| FlowSDE-PF | 9.9 | 365.7 | 129.1 | 120.4 |
| NormFlowSDE-PF | 9.8 | 364.7 | 129.4 | 119.8 |
| Latent NSF | 9.7 | 364.5 | 130.0 | 120.2 |
| Method | Hyperparameter | Pendulum | Lorenz–96 | ALOHA | REASSEMBLE |
| All four | Transition hidden layers | 2 | 3 | 3 | 3 |
| Measurement flow: coupling layers | 2 | 4 | 4 | 4 | |
| Measurement flow: hidden width / layers | 16 / 2 | 64 / 2 | 64 / 2 | 64 / 2 | |
| NF-DPF | Hidden width | 32 | 155 | 70 | 77 |
| Coupling layers | 2 | 2 | 2 | 2 | |
| Stage 1: updates | 4400 | 12500 | 3000 | 5000 |
| Method | Hyperparameter | Pendulum | Lorenz–96 | ALOHA | REASSEMBLE |
|---|---|---|---|---|---|
| All three | Optimizer updates | 8400 | 18500 | 9000 | 11000 |
| Batch size (windows) | 16 | 16 | 16 | 16 | |
| Encoder width | 16 | 128 | 64 | 64 | |
| Hidden layers | 2 | 3 | 3 | 3 | |
| Latent NSF | Learning rate | ||||
| KL weight | 1 | 0 | 0 | 1 |
| Filter | Setting | Pendulum | Lorenz–96 |
|---|---|---|---|
| All three | Dynamics | Euler, 8 substeps | Runge–Kutta 4 |
| Process noise | , | additive, std. 0.001 per step | |
| Process-noise grid | |||
| Posterior draws | 128 | 200 | |
| EKF | Linearization | exact Jacobian | exact Jacobian |
| UKF | Sigma points | , equal weights | , equal weights |
Bayesian Filtering
Bayesian filtering recursively estimates hidden states and their uncertainty from noisy, sequential observations in changing systems.
See all 64 papers