PyDPF: A Python Package for Differentiable Particle Filtering

📅 2025-10-29
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Traditional particle filters for state space models (SSMs) are non-differentiable, hindering end-to-end joint optimization of latent states and unknown parameters. To address this, we propose and implement a unified, differentiable particle filtering (DPF) framework in PyTorch. Our method ensures full gradient flow through the filtering pipeline by reformulating resampling operations—including SoftResample and differentiable multinomial resampling—while providing a standardized API that integrates multiple state-of-the-art DPF algorithms for flexible configuration and fair benchmarking. Experimental reproduction across standard SSM benchmarks demonstrates significant improvements in parameter estimation accuracy and training stability. The framework serves as an efficient, open-source, plug-and-play differentiable inference tool for modeling complex dynamical systems.

Technology Category

Application Category

📝 Abstract
State-space models (SSMs) are a widely used tool in time series analysis. In the complex systems that arise from real-world data, it is common to employ particle filtering (PF), an efficient Monte Carlo method for estimating the hidden state corresponding to a sequence of observations. Applying particle filtering requires specifying both the parametric form and the parameters of the system, which are often unknown and must be estimated. Gradient-based optimisation techniques cannot be applied directly to standard particle filters, as the filters themselves are not differentiable. However, several recently proposed methods modify the resampling step to make particle filtering differentiable. In this paper, we present an implementation of several such differentiable particle filters (DPFs) with a unified API built on the popular PyTorch framework. Our implementation makes these algorithms easily accessible to a broader research community and facilitates straightforward comparison between them. We validate our framework by reproducing experiments from several existing studies and demonstrate how DPFs can be applied to address several common challenges with state space modelling.
Problem

Research questions and friction points this paper is trying to address.

Differentiable particle filters enable gradient-based parameter estimation
Implementing unified API for multiple differentiable particle filtering algorithms
Facilitating accessibility and comparison of state-space model optimization methods
Innovation

Methods, ideas, or system contributions that make the work stand out.

Differentiable particle filters enable gradient-based optimization
Unified PyTorch API for multiple differentiable particle filters
Implementation facilitates algorithm comparison and broader accessibility
🔎 Similar Papers
No similar papers found.
J
John-Joseph Brady
King’s College London
B
Benjamin Cox
University of Edinburgh
Y
Yunpeng Li
King’s College London
Víctor Elvira
Víctor Elvira
Professor in Statistics and Data Science, University of Edinburgh
Bayesian inferencecomputational statisticsMonte Carlo methodsstatistical signal processing