DnD Filter: Differentiable State Estimation for Dynamic Systems using Diffusion Models

Ziyu Wan, Lin ZhaoIROS 2025

Abstract

State estimation in dynamic systems often relies on Kalman Filters, which are limited by assumptions of Gaussian noise and linear updates. We present the DnD Filter (Differentiable Diffusion Filter), a novel framework that replaces traditional update rules with a learnable diffusion model. By leveraging the generative power of denoising diffusion probabilistic models (DDPMs), the DnD Filter can approximate complex, multi-modal posterior distributions. Our approach achieves a 25% improvement in accuracy over state-of-the-art differentiable filters on real-world visual odometry tasks while maintaining real-time inference speeds.

Introduction

State estimation—the process of inferring a system's internal state from noisy observations—is a cornerstone of robotics and control. Traditionally, the Kalman Filter (KF) has been the standard solution. However, KFs assume that noise is Gaussian and that state updates are linear combinations of predictions and observations. In real-world scenarios, such as visual navigation, noise is frequently non-Gaussian and systems exhibit high nonlinearity.

While recent Differentiable Filters (DFs) integrate neural networks into the filtering process, many still adhere to the "Kalman gain" structure, limiting their capacity to handle multi-modal uncertainties. The DnD Filter addresses these limitations by learning a nonlinear, non-Gaussian update rule directly from data using diffusion models.

Methodology

The DnD Filter maintains the recursive structure of a Bayesian filter, consisting of a prediction step and an update step, but implements them using deep learning components.

The DnD Filter pipeline, integrating process and sensor models through a diffusion-based update step to estimate the system state $x_t$.
  1. Prediction Step: A neural network (e.g., an MLP) predicts the subsequent state $\hat{x}_t$ based on the previous state $x_{t-1}$.
  2. Sensor Model: High-dimensional observations $o_t$ (such as camera images) are processed by a feature extractor to generate a feature vector $f_t$.
  3. Fusion and Diffusion Update: The predicted state and sensor features are fused into a condition $c_t$. This condition guides a Denoising Diffusion Probabilistic Model (DDPM). Starting from pure noise, the model iteratively "denoises" the state over $N$ steps to produce the final estimate $x_t$.

The Diffusion Update Mechanism

The core innovation is the use of diffusion as a sophisticated, nonlinear refiner. Unlike a linear Kalman gain, the diffusion process can capture multi-modal distributions, allowing the filter to represent ambiguity (e.g., being unsure between two distinct locations) more effectively than a single Gaussian average.

Detailed view of the iterative diffusion update step, showing the transition from noise to a refined state estimate and the underlying mathematical formulation.

Efficient Stagewise Training

Training diffusion models within a recurrent loop is computationally intensive. To mitigate this, we employ a 3-stage training strategy inspired by teacher forcing. By approximating predicted states with ground truth or simple offsets during early training phases, we enable parallel processing and achieve a 20x speedup in training compared to standard end-to-end methods.

Experimental Evaluation

The DnD Filter was evaluated on two distinct benchmarks:

  • Vision-based Disk Tracking: A simulated 2D environment requiring the tracking of a target disk among 100 distractors, testing robustness to extreme occlusion.
  • KITTI Visual Odometry: A classic real-world robotics dataset consisting of car-mounted camera sequences for estimating vehicle trajectories.

Key Results

  • Superior Accuracy: On the KITTI dataset, the DnD Filter reduced translational and rotational errors by 23% and 28%, respectively, compared to leading differentiable filters.
  • Performance: The filter outperformed several "smoothers" that utilize future data, despite being a causal filter that only processes past and present information.
  • Real-time Efficiency: The model maintains an inference frequency of 40–55 Hz on an RTX 4080, well above the 10 Hz sampling rate of the KITTI dataset, making it suitable for real-world deployment.
  • Ablation Studies: Increasing the number of diffusion steps (from 5 to 10) consistently improved accuracy, validating the effectiveness of the iterative refinement process.

Conclusion and Future Work

The DnD Filter demonstrates that diffusion models can significantly enhance state estimation by providing a flexible, learnable alternative to traditional linear updates. Future work will focus on reducing the model size for edge deployment, integrating additional sensor modalities like LiDAR and IMUs, and incorporating loop closure mechanisms for long-term navigation.

Summary updated

BibTeX
@inproceedings{wan2025dnd,
  author = {Ziyu Wan and Lin Zhao},
  title = {{DnD Filter: Differentiable State Estimation for Dynamic Systems using Diffusion Models}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2025},
}
Figure