Skip to main content
QUICK REVIEW

[Paper Review] Differentiable Particle Filtering without Modifying the Forward Pass

Adam Ścibior, Frank Wood|arXiv (Cornell University)|Jun 18, 2021
Model Reduction and Neural NetworksPhysics and Astronomy8 citations
TL;DR

This paper introduces a simple, efficient method to make standard particle filters differentiable using automatic differentiation (AD) without altering their forward pass behavior. By applying a stop-gradient operator to particle weights before resampling, the method enables AD to produce consistent, low-variance estimators for gradients of log-marginal likelihood and posterior expectations—previously only achievable via manual derivation or complex continuous relaxations.

ABSTRACT

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.

Motivation & Objective

  • To enable automatic differentiation of standard particle filters despite their discrete resampling steps.
  • To produce consistent, low-variance gradient estimators for log-marginal likelihood and posterior expectations using AD.
  • To provide a simple, computationally cheap alternative to complex continuous relaxations of resampling.
  • To extend the method to higher-order derivatives and marginal particle filters with reduced variance.
  • To demonstrate that the same correction enables unbiased and interpretable gradient estimators for expectations under the posterior.

Proposed method

  • Introduces a stop-gradient operator on particle weights before resampling, preventing gradient flow into the resampling distribution.
  • Applies the stop-gradient to the unnormalized weights before resampling, ensuring the forward pass remains unchanged.
  • Uses automatic differentiation on the corrected log-estimated marginal likelihood to recover the score function estimator from Poyiadjis et al. (2011).
  • Extends the method to higher-order derivatives via repeated automatic differentiation, maintaining consistency.
  • Applies the same correction to marginal particle filters, recovering lower-variance estimators.
  • Uses a formal calculus of stop-gradient expressions to derive and verify gradient estimators under AD.

Experimental results

Research questions

  • RQ1Can standard particle filters be made differentiable using automatic differentiation without modifying their forward pass?
  • RQ2Does applying stop-gradient to particle weights yield consistent and low-variance gradient estimators for log-marginal likelihood?
  • RQ3Can the same correction produce reliable gradient estimators for expectations under the posterior?
  • RQ4Does the method extend to higher-order derivatives via repeated AD?
  • RQ5Can it be applied to marginal particle filters to reduce variance?

Key findings

  • The method produces the same score function estimator as Poyiadjis et al. (2011) via automatic differentiation, without manual derivation.
  • The forward pass of the particle filter remains unchanged, preserving original estimators.
  • The gradient estimator for posterior expectations is unbiased if the forward pass estimator is unbiased.
  • The method achieves lower variance than standard REINFORCE-style estimators in experiments.
  • The approach extends naturally to higher-order derivatives using repeated AD.
  • The method outperforms complex continuous relaxations in simplicity and efficiency while maintaining consistency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.