Online Bayesian Inference via Sequential Monte Carlo

47 concepts40 papers1 proposal

Imagine trying to track a moving target when your only tool requires you to re-analyze every single step the target has taken since the beginning of time. This is the fundamental limitation of traditional batch Bayesian inference. Algorithms like Markov Chain Monte Carlo (MCMC) or global Gibbs sampling are highly accurate, but they require access to the entire dataset at once. When data arrives as an endless, real-time stream—such as streaming text tokens, financial ticks, or neural spikes—re-running these batch algorithms from scratch at every time step becomes computationally impossible.

To solve this, researchers turn to Sequential Monte Carlo (SMC), often referred to as particle filtering. SMC provides a framework for updating a model's beliefs incrementally, processing data points one by one while keeping the computational cost per update bounded.

The Core Intuition: Representing Distributions as Swarms

The mathematical core of Bayesian inference is the posterior distribution—our updated belief about latent (hidden) variables after seeing the data. In complex or non-parametric models, this distribution cannot be calculated analytically.

SMC bypasses this tractability issue by representing the continuous posterior distribution as a swarm of discrete, weighted hypotheses called particles. Each particle is a concrete snapshot of what the hidden state of the world might look like.

Continuous Posterior Distribution      --->      SMC Particle Approximation
         _.._                                       |  |     |
       .'    `.                                     |  |  |  |
     .'        `.                                   |  |  |  |  |
____/____________\____                         _____|__|__|__|__|_____
                                                     Hypotheses (Weights)

Why does this representation work so well for streaming data? Because it turns a massive global optimization problem into a simple recursive update step:

  1. Propose: When a new data point arrives, propagate each particle forward based on the model's transition dynamics.
  2. Weight: Evaluate how well each particle's hypothesis predicts the new observation. Particles that predict the new data accurately receive a higher weight; those that fail to predict it are downweighted.
  3. Resample: Periodically eliminate particles with near-zero weight and duplicate particles with high weight, focusing computational resources on the most promising hypotheses.

This recursive cycle allows the system to adapt instantly. For example, Daichi Mochihashi et al. demonstrate this mechanism in Context as Filtering, where particles track shifts in linguistic context. As new words stream in, particles representing the correct topic gain weight, allowing the language model to dynamically adjust its effective history window on the fly.

Scaling to Infinite and Non-Parametric Spaces

The true power of the particle representation becomes evident when dealing with non-parametric Bayesian models, where the complexity or number of parameters grows alongside the data.

Consider the challenge of online clustering, where data points arrive sequentially and must be grouped into categories without knowing the total number of categories in advance. In AClass: A simple, online, parallelizable algorithm for probabilistic classification, Vikash Mansinghka et al. use SMC to maintain multiple concurrent hypotheses about cluster structures governed by a Chinese Restaurant Process. Instead of computing an intractable global mixture, each particle tracks a specific assignment of data points to clusters, updating instantly as new observations arrive.

Similarly, Jan Gasthaus et al. apply this to neural data in Dependent Dirichlet Process Spike Sorting. Neurons can drift physically and electrically over time, meaning their signatures change. By utilizing SMC, the authors' model tracks these drifting parameters in real-time, automatically handling the appearance of new neural clusters and the disappearance of old ones without needing to reprocess historical recordings.

SMC also tames the computational complexity of non-parametric models like Gaussian Processes (GPs), which typically suffer from a cubic computational bottleneck ($O(N^3)$) relative to the number of data points $N$. In Sequential Inference for Deep Gaussian Process, Yali Wang pairs SMC with a fixed-size active set of historical points. By updating the particles only against this compact active set at each step, the algorithm achieves a linear scaling factor, making deep non-parametric models viable for time-sensitive streaming applications.

Defeating the Degeneracy Trap

While the basic SMC algorithm is elegant, it suffers from a fatal flaw known as particle degeneracy. Over several time steps, the variance of the particle weights inevitably increases. A few particles accumulate all the weight, while the rest drop to zero. If left unchecked, your swarm collapses into a single particle, destroying the model's ability to represent uncertainty.

To make online inference robust, researchers employ two primary strategies: rejuvenation and marginalization.

Rejuvenation

When particle diversity drops below a certain threshold, the filter can be "shaken up" to restore variety. In Using Rejuvenation to Improve Particle Filtering for Bayesian Word Segmentation, Benjamin Börschinger et al. tackle the problem of discovering word boundaries in continuous text streams. To prevent their particle filter from getting stuck in early, suboptimal segmentation hypotheses, they introduce a rejuvenation step. This step periodically applies localized MCMC moves to the existing particles, allowing them to explore alternative historical segmentations and maintain a healthy, diverse representation of the posterior.

Marginalization

Another way to prevent filter collapse is to reduce the dimensionality of what the particles actually have to sample. If certain latent variables can be integrated out analytically, the particles only need to track the remaining variables.

Parfait Munezero et al. leverage this in Dynamic Mixture of Experts Models for Online Prediction. Instead of forcing particles to sample discrete component indicators for every single expert in a high-dimensional mixture model, the authors design a marginal particle filter. By analytically integrating out these indicators, the particles focus entirely on the core continuous parameters, drastically reducing the state-space variance and ensuring stable online tracking.

Key Foundational Work

Probabilistic Temporal Reasoning with Endogenous Change (1995) — contributed 1 concept elements to this direction.
Call-Based Fraud Detection in Mobile Communication Networks Using a Hierarchical Regime-Switching Model (1998) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_sequential_monte_carlo_inference_f7aef1d8,
  title = {sequential Monte Carlo inference},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/sequential-monte-carlo-inference/rdr_f7aef1d809d44a0d92f184487b936d8e},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-21},
}

This exact version (version 1, frozen text):

@misc{lacuna_sequential_monte_carlo_inference_f7aef1d8_v1,
  title = {sequential Monte Carlo inference},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/sequential-monte-carlo-inference/rdr_f7aef1d809d44a0d92f184487b936d8e/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-21},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake