Differentiable Systematic Resampling for Variational Sequential Monte Carlo

Fredrik Cumlin, Saikat ChatterjeeNeurIPS 2026

TL;DR

Particle filters are fantastic at tracking hidden states in noisy, complex systems, but their "survival-of-the-fittest" resampling step is discrete—creating a brick wall for backpropagation when trying to learn unknown dynamics with neural networks. The authors introduce Differentiable Systematic Resampling (DSR), a smooth, temperature-controlled relaxation of the gold-standard systematic resampling algorithm. It preserves the clean structure of traditional resampling, avoids the slow iterative loops of optimal-transport alternatives, trains over twice as fast, and learns noticeably better dynamics—especially when sensors are drowning in noise.

What Problem Does This Paper Address?

Imagine tracking a drone in a storm. You don't see its exact state, only noisy sensor readings. Particle filters (or Sequential Monte Carlo) handle this by unleashing a cloud of guesses ("particles"), advancing them using physics, and weighting them by how well they match incoming data. Inevitably, most guesses drift into nonsense, leaving one or two particles carrying almost all the weight. Resampling fixes this by killing off bad guesses and cloning the good ones.

What if you don't know the physics of the storm and want neural networks to learn the system dynamics directly from data? This framework—Variational Sequential Monte Carlo (VSMC)—requires differentiating through the entire filter. While moving and weighting particles is smooth, resampling makes hard, discrete choices about which particles survive, blocking gradients.

Existing workarounds force compromises: Soft multinomial resampling builds on a high-variance baseline, while Entropy-Regularized Optimal Transport (EROT) requires expensive iterative Sinkhorn solvers that blur particle assignments into diffuse clouds and slow training to a crawl. Meanwhile, at test time, almost everyone uses systematic resampling because it is fast, simple, and low-variance. Until now, nobody had directly relaxed systematic resampling itself.

Methods

Think of standard systematic resampling like laying a ruler with evenly spaced ticks against a stacked bar chart of particle weights—their Cumulative Distribution Function (CDF). Wherever a tick lands, that particle gets cloned. Mathematically, checking if a tick falls inside a particle's weight interval uses a rigid step function, which has zero gradient almost everywhere.

Differentiable Systematic Resampling (DSR) keeps the single random offset of the ruler untouched and simply softens the step-function boundaries into smooth sigmoids controlled by a temperature parameter $\tau$.

  • Instead of cloning a single parent, each new particle becomes a weighted blend of ancestors, forming a smooth, banded transport matrix that lets gradients flow effortlessly.
  • As $\tau \to 0^+$, DSR recovers exact systematic resampling, with the authors proving that the approximation bias vanishes exponentially fast in $1/\tau$.
Figure 1: Transportation maps for systematic resampling (left), DSR (middle), and EROT (right), for a sequential importance resampling PF of the Lorenz-63 system. The transportation maps are calculated at step 150 using N = 25 particles, and DSR and EROT use the training relaxation parameters.

Because DSR blends particles that sit next to each other in the CDF, you don't want two particles on opposite sides of physical space sitting adjacent in the lineup. To prevent blending distant states, DSR first orders particles along a Morton space-filling curve, ensuring that neighbors in the CDF are also neighbors in 3D (or $d$-D) space.

Datasets

No new datasets are introduced; the authors test DSR across three progressively tougher benchmarks:

  1. 4D Linear Gaussian State-Space Model (Synthetic): A damped rotation system where exact Kalman filter posteriors exist as an analytical ground-truth oracle.
  2. Stochastic Lorenz-63 (Synthetic): The classic 3D chaotic butterfly attractor, observed through a nonlinear 2D camera projection onto an $8 \times 8$ pixel grid at two signal-to-measurement-noise ratios (SMNR of 10 dB and a harsh 0 dB).
  3. CharacterTrajectories (Real-World): From the UEA archive—200 Hz WACOM tablet recordings of handwritten letters (x/y velocities and pen force), modeled using a 9D latent state.
Figure 2: Lorenz-63 system with nonlinear camera measurement model. (a) Sample state trajectory of Lorenz-63. Colored points indicate three observation times that are shown in the right- most figure. (b) Camera projection geometry: the 3D state xt = (x1, x2, x3) projects onto an 8×8 pixel grid via a depth-dependent Gaussian point spread function (Eq. 10). The first two coordinates determine the 2D position, while the third coordinate (depth) controls the spread of the Gaussian. (c) Three sample camera observations at SMNR = 0 dB.

Key Insights and Ideas

  • Sharper training posteriors don't always mean better learning: On the linear Gaussian task, standard non-differentiable ("Hard") resampling actually tracked the true Kalman filter posterior more closely during training than DSR did. Yet DSR learned the true underlying transition matrix much more accurately ($\|A - \hat{A}\|_F$ of $0.019$ vs. $0.035$). Why? Smooth gradient flow matters more for parameter optimization than exact discrete tracking during training.
  • Dramatically calmer gradients: On Lorenz-63, DSR's proposal network gradient norms hovered steadily around $4.5 \times 10^3$, roughly $3\times$ lower and far less erratic than Hard resampling and EROT (which spiked into $10^4$–$10^5$). This stability allows DSR to scale cleanly up to $N=200$ particles, where Hard/Soft baselines collapse and EROT runs out of GPU memory.
Figure 3: Norm of the proposal network’s gradient before clipping during training on Lorenz-63 (SMNR = 10 dB). Solid: per-epoch mean over batches, averaged over the 10 runs; shaded: ±1 std over runs.
  • Spatial sorting matters: Sorting particles along a Morton curve before building the CDF cuts the L2 distance to exact systematic resampling by up to 35% (at $N=200, \tau=0.01$) by keeping soft mixtures local.

Key Results

  • Accuracy under heavy noise: On Lorenz-63 at 10 dB SMNR, DSR leads across state estimation ($-29.94$ dB NMSE) and dynamics learning metrics. At a punishing 0 dB SMNR, DSR crushes the competition, achieving $-18.28$ dB NMSE—a massive 5.7 dB improvement over runner-up EROT ($-12.57$ dB).
  • Real-world handwriting: On CharacterTrajectories at 0 dB SMNR, DSR reaches $-8.59$ dB NMSE, beating EROT ($-7.77$ dB), which translates to a 17% reduction in mean squared error.
  • Speed: Because DSR evaluates sigmoids in a single batched matrix pass rather than running Sinkhorn loops, it adds just 2.4% wall-clock overhead over standard discrete resampling ($2.55$ hours vs. $2.49$ hours on Lorenz-63), training more than $2\times$ faster than EROT ($5.96$ hours).

Limitations and Future Work

Like optimal-transport resampling, DSR outputs convex combinations (weighted averages) of ancestor particles at finite temperatures. If a posterior distribution splits into two distinct modes—say, a drone could be either left or right of a tree—averaging particles across modes can drop a new particle right inside the tree. Morton sorting largely mitigates this (keeping inter-modal mixing around $0.28$ up to 10 dimensions in toy tests, whereas EROT puts most mass between modes for $d \ge 3$), but handling strongly multimodal posteriors in differentiable particle filters remains an open avenue for future work. Additionally, DSR does not preserve exact expected replication counts at finite temperatures, making the training objective a biased surrogate rather than a strict variational lower bound.

Summary updated

Abstract

Particle filters are a standard tool for nonlinear state estimation, but their resampling step is discrete, preventing gradient-based learning in variational sequential Monte Carlo. We introduce Differentiable Systematic Resampling (DSR), a temperature-controlled relaxation of systematic resampling, that preserves the CDF-ordered, banded structure of systematic resampling while enabling full gradient flow. DSR converges to exact systematic resampling as the temperature vanishes, and we prove a pointwise exponential convergence rate for the induced bias. Compared to optimal-transport-based differentiable resampling, DSR avoids iterative solvers and has substantially lower computational overhead. Experiments on stochastic dynamical systems and real-world handwriting data show that DSR achieves comparable or superior filtering and dynamics learning performance.
BibTeX
@inproceedings{cumlin2026differentiable,
  author = {Fredrik Cumlin and Saikat Chatterjee},
  title = {{Differentiable Systematic Resampling for Variational Sequential Monte Carlo}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=0Mo3B5JStu},
}
Figure