Search arXiv⌕ Search

arXiv · 2610.39915

Sequince: a modular sequential Monte Carlo toolkit

Abstract

Sequential Monte Carlo (SMC) methods approximate sequences of probability distributions using populations of weighted samples and are widely applicable, including in Bayesian inference and particle filtering. We present sequince, a modular Python toolkit for constructing SMC algorithms from reusable and extensible components. The toolkit provides modular steps for weighting, resampling, mutation, transformation, and control operations that are composed to implement different algorithms. It also includes prebuilt samplers for tempered SMC, persistent sampling and nested sampling via SMC. Its core components follow the Python Array API standard, supporting NumPy, JAX, PyTorch, and CuPy, enabling analyses on CPUs or GPUs. Random-number control and checkpointing support reproducible scientific workflows. This paper describes sequince v0.1.0 and its design as reusable infrastructure for methodological research and application of SMC methods.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Michael J. Williams, Christian E. A. Chapman-Bird. 2026-10-29. Sequince: a modular sequential Monte Carlo toolkit. https://arxiv.org/abs/2610.39915

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Reframing Spatial Uncertainty Visualisation with a Layered Grammar of Graphics

Communicating both estimated values and their associated uncertainties presents a particular challenge in spatial visualisation because spatial coordinates already occupy the primary visual channels, leaving relatively few channels available for encoding uncertainty alongside the estimated values. A range of visualisation techniques has been developed to address this challenge, including bivariate choropleth maps, pixel maps, and glyph maps. However, existing implementations typically treat these techniques as dedicated visualisations rather than expressing them through the composable elements of a grammar of graphics. We reframe uncertainty visualisation as an extension of the layered grammar of graphics, allowing uncertainty-specific representations to be composed, customised, and extended alongside other graphical components. We demonstrate this perspective by integrating uncertainty visualisation into the layered architecture of ggplot2, accommodating these techniques while also motivating new approaches such as the dual map for selective attention between estimated values and their associated uncertainties. We implement the framework in the R package ggincerta and demonstrate its application through three case studies.

stat.CO↗

Least squares variational inference

Variational inference consists in finding the best approximation of a target distribution within a certain family, where `best' means (typically) smallest Kullback-Leiber divergence. We show that, when the approximation family is exponential, the best approximation is the solution of a fixed-point equation. We introduce LSVI (Least-Squares Variational Inference), a Monte Carlo variant of the corresponding fixed-point recursion, where each iteration boils down to ordinary least squares regression and does not require computing gradients. We show that LSVI is equivalent to stochastic mirror descent; we use this insight to derive convergence guarantees. We introduce various ideas to improve LSVI further when the approximation family is Gaussian, leading to a $O(d^3)$ complexity in the dimension $d$ of the target in the full-covariance case, and a $O(d)$ complexity in the mean-field case. We show that LSVI outperforms state-of-the-art methods in a range of examples, while remaining gradient-free, that is, it does not require computing gradients.

stat.CO↗

Metropolized backward sampling for conditional sequential Monte Carlo

Particle Gibbs samplers with backward sampling are widely used for sampling the smoothing distribution of state-space models, but, with few particles, the new trajectory often coincides with the current one at many time steps. A known but rarely used remedy replaces the random selection of the final particle by a Metropolis--Hastings move which avoids the current particle. We show that, with backward sampling, this remedy only helps at the last time steps, because its effect on the update rates decays geometrically with the distance to the final time. We propose instead Metropolized backward sampling, which makes such a move at every step of the backward pass, forcibly switching trajectories whenever possible. Additionally, we introduce a coupled version which prevents proposing the current trajectory, maximizing the chances of an actual switch versus the current trajectory and performing perfect sampling when the state-space model has no observations, a feature not shared by backward sampling. We prove that, at every time step, both methods dominate backward sampling as they update the state more often and have smaller lag-one autocorrelations than it does. Our methods are drop-in replacements for backward sampling, and can be used to improve any particle Gibbs sampler.

stat.CO↗