Differentiable Particle Filtering without Modifying the Forward Pass
This provides a general recipe for making particle filters differentiable, addressing a bottleneck in probabilistic inference for researchers and practitioners in machine learning and signal processing.
The paper tackles the incompatibility of particle filters with automatic differentiation due to discrete resampling steps by introducing a simple correction using the stop-gradient operator, which allows computation of score function estimators and gradients of expectations under the posterior without modifying the forward pass.
Particle filters are not compatible with automatic differentiation due to the presence of discrete resampling steps. While known estimators for the score function, based on Fisher's identity, can be computed using particle filters, up to this point they required manual implementation. In this paper we show that such estimators can be computed using automatic differentiation, after introducing a simple correction to the particle weights. This correction utilizes the stop-gradient operator and does not modify the particle filter operation on the forward pass, while also being cheap and easy to compute. Surprisingly, with the same correction automatic differentiation also produces good estimators for gradients of expectations under the posterior. We can therefore regard our method as a general recipe for making particle filters differentiable. We additionally show that it produces desired estimators for second-order derivatives and how to extend it to further reduce variance at the expense of additional computation.