From 43df629735fc330d2b0ccdbd0ee8677fc844a9e3 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Tue, 7 Jul 2026 16:42:45 +0100 Subject: [PATCH 01/19] JOSS: add first draft --- joss_paper/paper.bib | 77 +++++++++++++++++++++++ joss_paper/paper.md | 147 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 joss_paper/paper.bib create mode 100644 joss_paper/paper.md diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib new file mode 100644 index 00000000..12d49000 --- /dev/null +++ b/joss_paper/paper.bib @@ -0,0 +1,77 @@ +@book{chopin2020introduction, + title={An introduction to sequential Monte Carlo}, + author={Chopin, Nicolas and Papaspiliopoulos, Omiros and others}, + volume={4}, + year={2020}, + publisher={Springer} +} + +@article{delmoral2006smc, + title={Sequential Monte Carlo Samplers}, + author={Del Moral, Pierre and Doucet, Arnaud and Jasra, Ajay}, + journal={Journal of the Royal Statistical Society: Series B (Statistical Methodology)}, + volume={68}, + number={3}, + pages={411--436}, + year={2006} +} + +@article{karamanis2025persistent, + title={Persistent Sampling: Enhancing the Efficiency of Sequential Monte Carlo}, + author={Karamanis, Minas and Seljak, Uro{\v{s}}}, + journal={Statistics and computing}, + volume={35}, + number={5}, + pages={144}, + year={2025}, + publisher={Springer} +} + +@article{cabezas2024blackjax, + title={BlackJAX: Composable Bayesian inference in JAX}, + author={Cabezas, Alberto and Corenflos, Adrien and Lao, Junpeng and Louf, R{\'e}mi and Carnec, Antoine and Chaudhari, Kaustubh and Cohn-Gordon, Reuben and Coullon, Jeremie and Deng, Wei and Duffield, Sam and Dur{\'a}n-Mart{\'i}n, Gerardo and Elantkowski, Marcin and Foreman-Mackey, Dan and Gregori, Michele and Iguaran, Carlos and Kumar, Ravin and Lysy, Martin and Murphy, Kevin and Orduz, Juan Camilo and Patel, Karm and Wang, Xi and Zinkov, Rob}, + journal={arXiv preprint arXiv:2402.10797}, + year={2024} +} + +@article{demasi2026sharpy, + title={The Sequential Monte Carlo goes NUTS: Boosting Gravitational-Wave Inference}, + author={Demasi, Gabriele and Capurri, Giulia and Lenti, Massimo and Ricciardone, Angelo and Patricelli, Barbara and Frattale Mascioli, Adriano and Piccari, Lorenzo and Albuquerque, Saulo and Guidi, Gianluca M. and Pannarale, Francesco and Stratta, Giulia and Del Pozzo, Walter}, + journal={arXiv preprint arXiv:2601.02336}, + year={2026} +} + +@article{ashton2019bilby, + title={Bilby: A user-friendly Bayesian inference library for gravitational-wave astronomy}, + author={Ashton, Gregory and H{\"u}bner, Moritz and Lasky, Paul D. and Talbot, Colm and Ackley, Kendall and Biscoveanu, Sylvia and Chu, Qi and Divarkala, Atul and Easter, Paul J. and Goncharov, Boris and Hernandez Vivanco, Francisco and Harms, Jan and Lower, Marcus E. and Meadors, Grant D. and Melchor, Denyz and Payne, Ethan and Pitkin, Matthew D. and Powell, Jade and Sarin, Nikhil and Smith, Rory J. E. and Thrane, Eric}, + journal={Royal Society Open Science}, + volume={6}, + number={2}, + pages={181707}, + year={2019} +} + +@article{abrilpla2023pymc, + title={PyMC: A modern, and comprehensive probabilistic programming framework in Python}, + author={Abril-Pla, Oriol and Andreani, Virgile and Carroll, Colin and Dong, Larry and Fonnesbeck, Christopher J. and Kochurov, Maxim and Kumar, Ravin and Lao, Junpeng and Luhmann, Christian C. and Martin, Osvaldo A. and Osthege, Michael and Vieira, Ricardo and Wiecki, Thomas V. and Zinkov, Robert}, + journal={PeerJ Computer Science}, + volume={9}, + pages={e1516}, + year={2023} +} + +@misc{smcpy_repo, + author = {{NASA Langley Research Center}}, + title = {SMCPy: Python module for uncertainty quantification using a parallel sequential Monte Carlo sampler}, + year = {2026}, + howpublished = {\url{https://github.com/nasa/SMCPy}}, + note = {Accessed 2026-07-07} +} + +@misc{python_array_api, + author = {{Consortium for Python Data API Standards}}, + title = {Python array API standard}, + year = {2026}, + howpublished = {\url{https://data-apis.org/array-api/latest/}}, + note = {Accessed 2026-07-07} +} diff --git a/joss_paper/paper.md b/joss_paper/paper.md new file mode 100644 index 00000000..d3775ee5 --- /dev/null +++ b/joss_paper/paper.md @@ -0,0 +1,147 @@ +--- +title: 'Sequince: a modular sequential Monte Carlo toolkit for extensible sequential inference' +tags: + - Python + - Bayesian inference + - Sequential Monte Carlo +authors: + - name: Michael J. Williams + orcid: 0000-0003-2198-2974 + affiliation: 1 + - name: Christian E. A. Chapman-Bird + orcid: 0000-0002-2728-9612 + affiliation: 2 +affiliations: + - name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom + index: 1 + - name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom + index: 2 +date: 18 June 2026 +bibliography: paper.bib + +--- + +# Summary + +Sequential Monte Carlo (SMC) methods are a flexible family of algorithms for +approximating sequences of probability distributions using weighted particles, +resampling, and mutation steps [@delmoral2006smc; @chopin2020introduction]. +They are used in Bayesian computation, particle filtering, model comparison, +and other sequential inference problems. `sequince` is a Python toolkit for +constructing these methods from reusable components rather than exposing only a +small number of fixed algorithms. It is designed for users who need to adapt +SMC to new scientific problems, including domain-specific workflows in +astrophysics and other research areas. + +# Statement of need + +SMC is often most useful when it is customised. Researchers may need to combine +adaptive tempering, resampling strategies, mutation kernels, deterministic +transformations, stopping rules, or nested procedures in ways that differ from +standard textbook pipelines. In many projects this logic ends up embedded in +application-specific code, which makes it harder to compare methods, reuse +components, and move prototype algorithms into stable analysis software. + +`sequince` addresses this gap by providing a general-purpose, step-oriented SMC +implementation. Its main contribution is a software architecture for composing +SMC pipelines from interchangeable building blocks. Users can start from a +pre-built Bayesian recipe, or construct samplers manually when they need full +control over weighting, resampling, mutation, and control flow. This makes the +package suitable both for routine sequential inference and for methodological +work where new SMC variants are being developed and tested. The package is also +designed around backend-aware core abstractions so that particle states, weight +updates, and standard SMC workflows can operate on arrays from multiple Python +array libraries where possible. In particular, `sequince` aims to align these +core abstractions with the Python Array API standard [@python_array_api], while +still allowing specialised components to target particular ecosystems when +needed. + +# State of the field + +The Python ecosystem already contains several useful SMC-related tools. The +`particles` package accompanying @chopin2020introduction is valuable for +teaching and prototyping standard methods. `SMCPy` focuses on uncertainty +quantification and Bayesian calibration with parallel likelihood-tempering SMC +samplers, including fixed and adaptive tempering variants [@smcpy_repo]. +`pocomc` focuses on persistent sampling for posterior inference +[@karamanis2025persistent]. Broader Bayesian software ecosystems also expose +SMC functionality. `PyMC` includes a sequential Monte Carlo sampler within a +general probabilistic programming framework [@abrilpla2023pymc], while +`BlackJAX` provides composable inference components in the JAX ecosystem and +includes SMC methods alongside other Monte Carlo algorithms +[@cabezas2024blackjax]. Recent domain-specific frameworks such as SHARPy +target gravitational-wave inference with JAX-accelerated SMC and +gradient-based mutation kernels [@demasi2026sharpy]. + +`sequince` differs from these tools by prioritising a general, modular +architecture for building bespoke SMC workflows. In particular, it is aimed at +problems where users want to reconfigure the sequence of SMC operations, attach +custom diagnostics, couple SMC to problem-specific transformations, or embed +one SMC procedure inside another. This emphasis on composability is intended to +make the package useful both as research infrastructure and as a foundation for +application-specific downstream packages. + +# Software design + +The core object in `sequince` is a runner that executes an ordered sequence of +steps on a particle state. Each step receives the current particles, a runtime +context, and a random number generator, then returns an updated state. This +keeps the interface between SMC components small and explicit, which makes it +straightforward to implement custom weighting, resampling, mutation, proposal, +control, or transformation steps. + +The runtime context carries the current iteration, optional observations, +shared user-provided configuration, mutable metadata for communication between +steps, and recorded outputs for later inspection. This design supports both +static posterior inference and genuinely sequential settings in which new data +arrive over time. It also allows algorithm-specific state, such as temperatures +or diagnostic summaries, to be passed through the SMC pipeline without +hard-coding that logic into the runner itself. + +The core particle-state, weighting, transform, and runner abstractions are +written around the Python Array API standard where possible +[@python_array_api], allowing backend-native arrays to flow through the main +SMC loop. This support is deliberately layered: generic components aim to +preserve backend compatibility, while some specialised mutation steps and +proposal mechanisms remain library-specific because they depend on external +packages with narrower execution models. Backend-aware execution also extends to +random number generation through the `orng` interface used across the main SMC +steps, helping preserve a common runtime model across array backends. + +Callbacks are executed at the end of each iteration and provide functionality +such as logging, plotting, diagnostics, and checkpointing. Keeping these tasks +separate from the SMC steps helps users inspect or persist a run without +entangling analysis-side concerns with the core inference algorithm. Together, +the runner, step interface, context object, and callback system provide a +compact foundation for both standard workflows and more experimental SMC +designs. + +# Research impact statement + +`sequince` is being used as reusable infrastructure for problem-specific +inference workflows. Current applications include the development of customised +sampling strategies for astrophysical inference problems related to the Laser +Interferometer Space Antenna (LISA), as well as integration work with broader +Bayesian inference ecosystems such as `bilby` [@ashton2019bilby]. In these +settings, the main benefit of `sequince` is not a single fixed algorithm, but a +shared framework for expressing and testing new sequential inference ideas. This +includes companion-package development such as `sequince-flows`, which extends +the ecosystem with flow-based components needed for normalizing-flow-assisted +analyses in the style of `aspire`. + +# AI usage disclosure + +Generative AI tools were used to assist with code refactoring and rewriting +from targeted prompts. OpenAI Codex, via ChatGPT 5.3 and 5.4, and GitHub +Copilot were used during software development. The authors reviewed, edited, +and validated all AI-assisted outputs and retained responsibility for the +design and implementation decisions. + +# Acknowledgements + +M.J.W. acknowledges support from ST/X002225/1, ST/Y004876/1, and the +University of Portsmouth. Numerical computations were carried out on the SCIAMA +high-performance computing cluster, which is supported by the Institute of +Cosmology and Gravitation and the University of Portsmouth. + +# References From 1702c8ef849e8934091dc87e4028a9d68e2b2378 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Fri, 17 Jul 2026 12:02:08 +0100 Subject: [PATCH 02/19] paper tweaks --- joss_paper/paper.bib | 15 +++++++++++++++ joss_paper/paper.md | 18 +++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index 12d49000..1e66370c 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -75,3 +75,18 @@ @misc{python_array_api howpublished = {\url{https://data-apis.org/array-api/latest/}}, note = {Accessed 2026-07-07} } + +@article{Williams:2025aar, + author = "Williams, Michael J.", + title = "{Accelerated Sequential Posterior Inference via Reuse for Gravitational-Wave Analyses}", + eprint = "2511.04218", + archivePrefix = "arXiv", + primaryClass = "hep-ex", + reportNumber = "LIGO-P2500623", + doi = "10.1103/5hvn-3lmh", + journal = "Phys. Rev. Lett.", + volume = "137", + number = "2", + pages = "021410", + year = "2026" +} diff --git a/joss_paper/paper.md b/joss_paper/paper.md index d3775ee5..4cd268a0 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -1,5 +1,5 @@ --- -title: 'Sequince: a modular sequential Monte Carlo toolkit for extensible sequential inference' +title: 'Sequince: a modular sequential Monte Carlo toolkit' tags: - Python - Bayesian inference @@ -63,10 +63,10 @@ The Python ecosystem already contains several useful SMC-related tools. The teaching and prototyping standard methods. `SMCPy` focuses on uncertainty quantification and Bayesian calibration with parallel likelihood-tempering SMC samplers, including fixed and adaptive tempering variants [@smcpy_repo]. -`pocomc` focuses on persistent sampling for posterior inference -[@karamanis2025persistent]. Broader Bayesian software ecosystems also expose -SMC functionality. `PyMC` includes a sequential Monte Carlo sampler within a -general probabilistic programming framework [@abrilpla2023pymc], while +`pocomc` implements persistent sampling with normalizing flows for posterior +inference [@karamanis2025persistent]. Broader Bayesian software ecosystems also +expose SMC functionality. `PyMC` includes a sequential Monte Carlo sampler +within a general probabilistic programming framework [@abrilpla2023pymc], while `BlackJAX` provides composable inference components in the JAX ecosystem and includes SMC methods alongside other Monte Carlo algorithms [@cabezas2024blackjax]. Recent domain-specific frameworks such as SHARPy @@ -93,7 +93,7 @@ control, or transformation steps. The runtime context carries the current iteration, optional observations, shared user-provided configuration, mutable metadata for communication between steps, and recorded outputs for later inspection. This design supports both -static posterior inference and genuinely sequential settings in which new data +static posterior inference and sequential settings in which new data arrive over time. It also allows algorithm-specific state, such as temperatures or diagnostic summaries, to be passed through the SMC pipeline without hard-coding that logic into the runner itself. @@ -126,12 +126,12 @@ Bayesian inference ecosystems such as `bilby` [@ashton2019bilby]. In these settings, the main benefit of `sequince` is not a single fixed algorithm, but a shared framework for expressing and testing new sequential inference ideas. This includes companion-package development such as `sequince-flows`, which extends -the ecosystem with flow-based components needed for normalizing-flow-assisted -analyses in the style of `aspire`. +the ecosystem with flow-based components needed for normalizing-flow-based +preconditioning similar `pocomc` or ASPIRE-style analyses [@Williams:2025aar]. # AI usage disclosure -Generative AI tools were used to assist with code refactoring and rewriting +Generative AI tools were used to assist with code implementation and refactoring from targeted prompts. OpenAI Codex, via ChatGPT 5.3 and 5.4, and GitHub Copilot were used during software development. The authors reviewed, edited, and validated all AI-assisted outputs and retained responsibility for the From 322266ccda7e32e36ba989ff7ee1341511d7c90c Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Fri, 21 Aug 2026 14:20:20 +0200 Subject: [PATCH 03/19] JOSS: address some of Christian's comments --- joss_paper/paper.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 4cd268a0..6315885b 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -54,7 +54,8 @@ updates, and standard SMC workflows can operate on arrays from multiple Python array libraries where possible. In particular, `sequince` aims to align these core abstractions with the Python Array API standard [@python_array_api], while still allowing specialised components to target particular ecosystems when -needed. +needed. This allows for efficient integration with hardware-accelerated software +libraries, which are increasingly common in scientific programming. # State of the field @@ -85,15 +86,16 @@ application-specific downstream packages. The core object in `sequince` is a runner that executes an ordered sequence of steps on a particle state. Each step receives the current particles, a runtime -context, and a random number generator, then returns an updated state. This -keeps the interface between SMC components small and explicit, which makes it +context, and a random number generator, then returns an updated state, updated +context and any additional diagnostic outputs. This keeps the interface between +SMC components small and explicit, which makes it straightforward to implement custom weighting, resampling, mutation, proposal, control, or transformation steps. -The runtime context carries the current iteration, optional observations, -shared user-provided configuration, mutable metadata for communication between -steps, and recorded outputs for later inspection. This design supports both -static posterior inference and sequential settings in which new data +The runtime context carries the current iteration, +shared user-provided configuration and metadata for communication between +steps. The context can also optionally contain a series of observations. +This design supports both static posterior inference and sequential settings in which new data arrive over time. It also allows algorithm-specific state, such as temperatures or diagnostic summaries, to be passed through the SMC pipeline without hard-coding that logic into the runner itself. @@ -132,16 +134,19 @@ preconditioning similar `pocomc` or ASPIRE-style analyses [@Williams:2025aar]. # AI usage disclosure Generative AI tools were used to assist with code implementation and refactoring -from targeted prompts. OpenAI Codex, via ChatGPT 5.3 and 5.4, and GitHub +from targeted prompts. OpenAI Codex, via ChatGPT 5.3, 5.4 and 5.6, and GitHub Copilot were used during software development. The authors reviewed, edited, -and validated all AI-assisted outputs and retained responsibility for the +and validated all AI-assisted outputs and retain responsibility for the design and implementation decisions. # Acknowledgements M.J.W. acknowledges support from ST/X002225/1, ST/Y004876/1, and the -University of Portsmouth. Numerical computations were carried out on the SCIAMA +University of Portsmouth. C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. +Numerical computations were carried out on the SCIAMA high-performance computing cluster, which is supported by the Institute of Cosmology and Gravitation and the University of Portsmouth. +Additional computations were performed using the University of Birmingham's +BlueBEAR High Performance Computing facility. # References From 8694e08501e55641c37bced0a4dc3dd04bfce29e Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 27 Aug 2026 13:37:23 +0100 Subject: [PATCH 04/19] JOSS: paper updates --- joss_paper/paper.md | 297 +++++++++++++++++++++++++++++--------------- 1 file changed, 194 insertions(+), 103 deletions(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 6315885b..798d1260 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -4,6 +4,7 @@ tags: - Python - Bayesian inference - Sequential Monte Carlo + - Particle filtering authors: - name: Michael J. Williams orcid: 0000-0003-2198-2974 @@ -12,13 +13,12 @@ authors: orcid: 0000-0002-2728-9612 affiliation: 2 affiliations: - - name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom - index: 1 - - name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom - index: 2 + - name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom + index: 1 + - name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom + index: 2 date: 18 June 2026 bibliography: paper.bib - --- # Summary @@ -26,127 +26,218 @@ bibliography: paper.bib Sequential Monte Carlo (SMC) methods are a flexible family of algorithms for approximating sequences of probability distributions using weighted particles, resampling, and mutation steps [@delmoral2006smc; @chopin2020introduction]. -They are used in Bayesian computation, particle filtering, model comparison, -and other sequential inference problems. `sequince` is a Python toolkit for -constructing these methods from reusable components rather than exposing only a -small number of fixed algorithms. It is designed for users who need to adapt -SMC to new scientific problems, including domain-specific workflows in -astrophysics and other research areas. +Such sequences arise naturally in applications including Bayesian computation, +particle filtering, model comparison, and sequential inference, for example +through likelihood tempering or observations arriving over time. + +`sequince` is a Python toolkit for constructing SMC methods from reusable +components rather than exposing only a small number of fixed algorithms. It +provides abstractions for defining sequences of target distributions and for +composing the weighting, resampling, mutation, transformation, and control +steps used to evolve a particle population between them. It is designed for +users who need to adapt SMC to new scientific problems, including +domain-specific workflows in astrophysics and other research areas. # Statement of need SMC is often most useful when it is customised. Researchers may need to combine adaptive tempering, resampling strategies, mutation kernels, deterministic -transformations, stopping rules, or nested procedures in ways that differ from -standard textbook pipelines. In many projects this logic ends up embedded in -application-specific code, which makes it harder to compare methods, reuse -components, and move prototype algorithms into stable analysis software. - -`sequince` addresses this gap by providing a general-purpose, step-oriented SMC -implementation. Its main contribution is a software architecture for composing -SMC pipelines from interchangeable building blocks. Users can start from a -pre-built Bayesian recipe, or construct samplers manually when they need full -control over weighting, resampling, mutation, and control flow. This makes the -package suitable both for routine sequential inference and for methodological -work where new SMC variants are being developed and tested. The package is also -designed around backend-aware core abstractions so that particle states, weight -updates, and standard SMC workflows can operate on arrays from multiple Python -array libraries where possible. In particular, `sequince` aims to align these -core abstractions with the Python Array API standard [@python_array_api], while -still allowing specialised components to target particular ecosystems when -needed. This allows for efficient integration with hardware-accelerated software -libraries, which are increasingly common in scientific programming. +transformations, stopping rules, or multi-stage procedures in ways that differ +from standard textbook pipelines. The sequence of target distributions itself +may also be problem dependent, for example when targets are constructed through +annealing or updated as new observations become available. In many projects, +this logic ends up embedded in application-specific code, making it harder to +compare methods, reuse components, and move prototype algorithms into stable +analysis software. + +`sequince` addresses this gap by providing a general-purpose, step-oriented +framework for SMC. Its central abstraction is the evolution of a particle +population through a sequence of target distributions using interchangeable +algorithmic components. Users can start from pre-built samplers for common +problems, such as tempered Bayesian inference and persistent sampling, or +construct SMC pipelines manually when they require full control over weighting, +resampling, mutation, transformations, and control flow. This makes the package +suitable both for routine inference and for methodological work in which new +SMC variants are developed and tested. + +The package is also designed around backend-aware core abstractions so that +particle states, target evaluations, weight updates, and standard SMC +operations can use arrays from multiple Python array libraries where possible. +In particular, `sequince` aligns these core abstractions with the Python Array +API standard [@python_array_api], while allowing specialised components to +target particular ecosystems when required. This facilitates integration with +hardware-accelerated numerical libraries that are increasingly common in +scientific computing. # State of the field The Python ecosystem already contains several useful SMC-related tools. The -`particles` package accompanying @chopin2020introduction is valuable for -teaching and prototyping standard methods. `SMCPy` focuses on uncertainty -quantification and Bayesian calibration with parallel likelihood-tempering SMC -samplers, including fixed and adaptive tempering variants [@smcpy_repo]. -`pocomc` implements persistent sampling with normalizing flows for posterior -inference [@karamanis2025persistent]. Broader Bayesian software ecosystems also -expose SMC functionality. `PyMC` includes a sequential Monte Carlo sampler -within a general probabilistic programming framework [@abrilpla2023pymc], while -`BlackJAX` provides composable inference components in the JAX ecosystem and -includes SMC methods alongside other Monte Carlo algorithms -[@cabezas2024blackjax]. Recent domain-specific frameworks such as SHARPy -target gravitational-wave inference with JAX-accelerated SMC and -gradient-based mutation kernels [@demasi2026sharpy]. +`particles` package accompanying @chopin2020introduction provides +implementations of many established SMC and particle-filtering methods and is +particularly useful for teaching and methodological prototyping. `SMCPy` +focuses on uncertainty quantification and Bayesian calibration using parallel +likelihood-tempering SMC samplers, including fixed and adaptive tempering +variants [@smcpy_repo]. `pocomc` implements persistent sampling with +normalizing flows for posterior inference [@karamanis2025persistent]. + +Broader Bayesian software ecosystems also expose SMC functionality. `PyMC` +includes a sequential Monte Carlo sampler within a general probabilistic +programming framework [@abrilpla2023pymc], while `BlackJAX` provides composable +inference components in the JAX ecosystem and includes SMC methods alongside +other Monte Carlo algorithms [@cabezas2024blackjax]. Recent domain-specific +frameworks such as SHARPy target gravitational-wave inference with +JAX-accelerated SMC and gradient-based mutation kernels [@demasi2026sharpy]. `sequince` differs from these tools by prioritising a general, modular -architecture for building bespoke SMC workflows. In particular, it is aimed at -problems where users want to reconfigure the sequence of SMC operations, attach -custom diagnostics, couple SMC to problem-specific transformations, or embed -one SMC procedure inside another. This emphasis on composability is intended to -make the package useful both as research infrastructure and as a foundation for -application-specific downstream packages. +architecture for constructing bespoke SMC algorithms. Rather than defining a +single inference procedure, it separates the target distribution, particle +state, and operations that evolve the population. Users can therefore +reconfigure the sequence of SMC operations, introduce custom target sequences +and transformations, use mutation kernels from different sampling ecosystems, +attach problem-specific diagnostics, or compose higher-level SMC procedures +from the same underlying components. This emphasis on composability is intended +to make `sequince` useful both as research infrastructure for developing new +methods and as a foundation for application-specific downstream packages. # Software design -The core object in `sequince` is a runner that executes an ordered sequence of -steps on a particle state. Each step receives the current particles, a runtime -context, and a random number generator, then returns an updated state, updated -context and any additional diagnostic outputs. This keeps the interface between -SMC components small and explicit, which makes it -straightforward to implement custom weighting, resampling, mutation, proposal, -control, or transformation steps. - -The runtime context carries the current iteration, -shared user-provided configuration and metadata for communication between -steps. The context can also optionally contain a series of observations. -This design supports both static posterior inference and sequential settings in which new data -arrive over time. It also allows algorithm-specific state, such as temperatures -or diagnostic summaries, to be passed through the SMC pipeline without -hard-coding that logic into the runner itself. - -The core particle-state, weighting, transform, and runner abstractions are -written around the Python Array API standard where possible -[@python_array_api], allowing backend-native arrays to flow through the main -SMC loop. This support is deliberately layered: generic components aim to -preserve backend compatibility, while some specialised mutation steps and -proposal mechanisms remain library-specific because they depend on external -packages with narrower execution models. Backend-aware execution also extends to -random number generation through the `orng` interface used across the main SMC -steps, helping preserve a common runtime model across array backends. - -Callbacks are executed at the end of each iteration and provide functionality -such as logging, plotting, diagnostics, and checkpointing. Keeping these tasks -separate from the SMC steps helps users inspect or persist a run without -entangling analysis-side concerns with the core inference algorithm. Together, -the runner, step interface, context object, and callback system provide a -compact foundation for both standard workflows and more experimental SMC -designs. +The distributions approximated during an SMC run are represented in `sequince` +by target objects. A target evaluates named components of a probability +distribution for a population of particles, while sequential targets describe +how that distribution changes between stages of an SMC procedure. For example, +a tempered Bayesian target constructs a sequence between a prior and posterior +using an inverse-temperature parameter, whereas other targets may depend on +observations supplied sequentially during a run. + +Target evaluations are stored as particle-aligned collections of named +quantities. These evaluations can be propagated through operations such as +resampling and mutation, allowing previously computed quantities to be reused +where possible. Separating target evaluation from the SMC operations that +consume it also provides a common interface for weighting and mutation steps +across different forms of sequential inference. + +Particle populations are represented by a `ParticleState`, which stores the +particles, their log weights, accumulated normalising-constant information, and +associated target evaluations. Specialised states extend this representation +where an algorithm requires additional information. For example, persistent SMC +retains particles from previous populations in a persistent particle state. + +The SMC algorithm itself is expressed as an ordered collection of steps. Each +step receives the current particle state, a runtime context, and a random +number generator and returns an updated state, updated context, and structured +outputs. These outputs can contain algorithm-specific quantities such as +effective sample sizes, tempering parameters, acceptance statistics, or other +diagnostics. The runner accumulates these outputs during execution so that the +trajectory of the SMC procedure can be inspected after sampling. + +The small step interface allows weighting, resampling, mutation, proposal, +transformation, and control operations to be implemented independently and +combined into different algorithms. Higher-level steps can conditionally +execute or compose other steps, allowing algorithmic control flow to be +represented within the same framework rather than being embedded directly in +the runner. This also makes it possible to reuse individual components across +otherwise different SMC constructions. + +A `SequentialMonteCarlo` runner repeatedly applies the configured sequence of +steps. The runtime context records the current iteration, the current +observation when processing sequential data, shared user-provided information, +and metadata used for communication between steps. It also exposes explicit +stopping controls. The runner accepts an iterable of observations and advances +through them as the SMC procedure progresses, allowing the same execution model +to support both static target sequences and problems in which the target +changes as new data become available. + +The output of a run is represented by an `SMCResult`, which separates +analysis-facing results from the mutable objects used while the sampler is +executing. In addition to the final particle state, the result records outputs +accumulated throughout the SMC procedure. This allows quantities such as +tempering schedules, effective sample sizes, mutation diagnostics, evidence +estimates, and other step-specific information to be inspected after sampling. +Because individual steps can return structured outputs, new algorithms can +extend the information recorded by a result without requiring corresponding +changes to the runner. + +This distinction between runtime state and stored results is important for +methodological work. The particle state represents the current approximation to +a target distribution, the runtime context contains information required while +the sampler is executing, and the result provides the persistent record used +for subsequent analysis. In this way, diagnostics produced by experimental +weighting, mutation, or control steps can be recorded systematically without +coupling them to plotting or logging code. + +The core particle-state, target, weighting, transformation, and runner +abstractions are written around the Python Array API standard where possible +[@python_array_api], allowing backend-native arrays to flow through the SMC +procedure. Random number generation is similarly abstracted through the `orng` +interface. In addition to conventional eager execution, `sequince` provides a +functional execution path in which random state is explicitly threaded through +each step. Compatible step pipelines can therefore be transformed using +facilities such as `jax.jit`, while specialised mutation methods can still +integrate with ecosystem-specific packages including `BlackJAX`. + +Callbacks provide observational functionality such as logging, plotting, and +diagnostics without coupling these tasks to the SMC steps themselves. +Checkpointing is handled separately from result recording. Checkpoint writers +capture the information required to resume an analysis, including the current +particle state, runtime progress, random-number state, and mutable state +belonging to individual SMC steps. By contrast, `SMCResult` provides the +analysis product of a completed or partially completed run. Results and +checkpoints can be serialised using portable HDF5 representations, avoiding +reliance on serialising live Python objects and allowing analyses to be +inspected or resumed independently of the original process. + +Together, the target, particle-state, step, context, result, and runner +abstractions provide a compact foundation from which both standard and +experimental SMC algorithms can be constructed. Pre-built configurations cover +common Bayesian workflows, while the same interfaces are used to implement more +specialised procedures such as persistent SMC and sequential inference with +observations arriving over time. # Research impact statement -`sequince` is being used as reusable infrastructure for problem-specific -inference workflows. Current applications include the development of customised -sampling strategies for astrophysical inference problems related to the Laser -Interferometer Space Antenna (LISA), as well as integration work with broader -Bayesian inference ecosystems such as `bilby` [@ashton2019bilby]. In these -settings, the main benefit of `sequince` is not a single fixed algorithm, but a -shared framework for expressing and testing new sequential inference ideas. This -includes companion-package development such as `sequince-flows`, which extends -the ecosystem with flow-based components needed for normalizing-flow-based -preconditioning similar `pocomc` or ASPIRE-style analyses [@Williams:2025aar]. +`sequince` is being developed as reusable infrastructure for both +methodological research and problem-specific inference workflows. Current +applications include customised sampling strategies for astrophysical inference +problems related to the Laser Interferometer Space Antenna (LISA), as well as +integration with broader Bayesian inference ecosystems such as `bilby` +[@ashton2019bilby]. + +In these applications, the principal benefit of `sequince` is not a single +sampling algorithm but a shared framework in which new sequential inference +methods can be implemented, compared, and reused. The package has been used to +explore alternative tempering strategies, persistent SMC, specialised mutation +schemes, problem-specific transformations, and hardware-accelerated execution. +The common result interface also provides a consistent way to record and +compare algorithm-specific diagnostics across these different methods. + +The modular design of `sequince` additionally supports downstream packages that +add method- or domain-specific functionality without requiring those +dependencies in the core library. For example, `sequince-density` provides +density-estimation components based on Gaussian mixture models and normalizing +flows. These can be combined with the core SMC machinery for learned +preconditioning, proposal construction, and other density-assisted SMC methods, +including approaches related to `pocomc` and ASPIRE \[@karamanis2025persistent; +@Williams:2025aar\]. The wider sequince ecosystem also includes +`sequince-examples`, which provides runnable examples demonstrating common +workflows and more specialised uses of the package. # AI usage disclosure -Generative AI tools were used to assist with code implementation and refactoring -from targeted prompts. OpenAI Codex, via ChatGPT 5.3, 5.4 and 5.6, and GitHub -Copilot were used during software development. The authors reviewed, edited, -and validated all AI-assisted outputs and retain responsibility for the +Generative AI tools were used to assist with code implementation and +refactoring from targeted prompts. OpenAI Codex, via ChatGPT 5.3, 5.4 and 5.6, +and GitHub Copilot were used during software development. The authors reviewed, +edited, and validated all AI-assisted outputs and retain responsibility for the design and implementation decisions. # Acknowledgements -M.J.W. acknowledges support from ST/X002225/1, ST/Y004876/1, and the -University of Portsmouth. C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. -Numerical computations were carried out on the SCIAMA -high-performance computing cluster, which is supported by the Institute of -Cosmology and Gravitation and the University of Portsmouth. -Additional computations were performed using the University of Birmingham's -BlueBEAR High Performance Computing facility. +M.J.W. acknowledges support from ST/X002225/1, ST/Y004876/1, and the University +of Portsmouth. C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. + +Numerical computations were carried out on the SCIAMA high-performance +computing cluster, which is supported by the Institute of Cosmology and +Gravitation and the University of Portsmouth. Additional computations were +performed using the University of Birmingham's BlueBEAR High Performance +Computing facility. # References From 2f4c5932ca247ade9e488cd97d61919e9f5c9c8e Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 27 Aug 2026 16:28:38 +0100 Subject: [PATCH 05/19] JOSS: mention 3G --- joss_paper/paper.md | 47 +++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 798d1260..0b35e02b 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -1,25 +1,20 @@ ---- -title: 'Sequince: a modular sequential Monte Carlo toolkit' -tags: - - Python - - Bayesian inference - - Sequential Monte Carlo - - Particle filtering -authors: - - name: Michael J. Williams - orcid: 0000-0003-2198-2974 - affiliation: 1 - - name: Christian E. A. Chapman-Bird - orcid: 0000-0002-2728-9612 - affiliation: 2 -affiliations: - - name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom - index: 1 - - name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom - index: 2 -date: 18 June 2026 -bibliography: paper.bib ---- +______________________________________________________________________ + +title: 'Sequince: a modular sequential Monte Carlo toolkit' tags: + +- Python +- Bayesian inference +- Sequential Monte Carlo +- Particle filtering authors: +- name: Michael J. Williams orcid: 0000-0003-2198-2974 affiliation: 1 +- name: Christian E. A. Chapman-Bird orcid: 0000-0002-2728-9612 affiliation: 2 + affiliations: +- name: Institute of Cosmology and Gravitation, University of Portsmouth, + United Kingdom index: 1 +- name: Institute for Gravitational Wave Astronomy, University of Birmingham, + United Kingdom index: 2 date: 18 June 2026 bibliography: paper.bib + +______________________________________________________________________ # Summary @@ -198,9 +193,11 @@ observations arriving over time. `sequince` is being developed as reusable infrastructure for both methodological research and problem-specific inference workflows. Current applications include customised sampling strategies for astrophysical inference -problems related to the Laser Interferometer Space Antenna (LISA), as well as -integration with broader Bayesian inference ecosystems such as `bilby` -[@ashton2019bilby]. +problems relevant to ongoing LIGO-Virgo-KAGRA analyses and future observations +with the Laser Interferometer Space Antenna (LISA), as well as integration with +broader Bayesian inference ecosystems such as bilby [@ashton2019bilby]. The +same methodology is also relevant to future ground-based observatories such as +the Einstein Telescope (ET) and Cosmic Explorer (CE). In these applications, the principal benefit of `sequince` is not a single sampling algorithm but a shared framework in which new sequential inference From 01f707581bf9e0b7a38d1bed57e9448ef0e3e862 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 27 Aug 2026 16:31:26 +0100 Subject: [PATCH 06/19] JOSS: fix header --- joss_paper/paper.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 0b35e02b..38e09174 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -1,20 +1,25 @@ -______________________________________________________________________ - -title: 'Sequince: a modular sequential Monte Carlo toolkit' tags: - -- Python -- Bayesian inference -- Sequential Monte Carlo -- Particle filtering authors: -- name: Michael J. Williams orcid: 0000-0003-2198-2974 affiliation: 1 -- name: Christian E. A. Chapman-Bird orcid: 0000-0002-2728-9612 affiliation: 2 - affiliations: -- name: Institute of Cosmology and Gravitation, University of Portsmouth, - United Kingdom index: 1 -- name: Institute for Gravitational Wave Astronomy, University of Birmingham, - United Kingdom index: 2 date: 18 June 2026 bibliography: paper.bib - -______________________________________________________________________ +--- +title: 'Sequince: a modular sequential Monte Carlo toolkit' +tags: + - Python + - Bayesian inference + - Sequential Monte Carlo + - Particle filtering +authors: +- name: Michael J. Williams + orcid: 0000-0003-2198-2974 + affiliation: 1 +- name: Christian E. A. Chapman-Bird + orcid: 0000-0002-2728-9612 + affiliation: 2 +affiliations: +- name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom + index: 1 +- name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom + index: 2 +date: 18 June 2026 +bibliography: paper.bib +--- # Summary From 57a2844136cfdf4398171a0dbe88dc712cff7f51 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 15 Oct 2026 11:04:54 +0200 Subject: [PATCH 07/19] MAINT: allow JOSS commit messages --- CONTRIBUTING.md | 1 + tests/test_commit_message.py | 5 +++++ tools/check_commit_message.py | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2ac1ecf..537f1d39 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -230,6 +230,7 @@ Choose the prefix that best describes the change: | `MAINT` | Refactor or maintain code without changing intended behavior | | `TST` | Add or improve tests | | `DOC` | Update documentation | +| `JOSS` | Update the JOSS paper or its submission materials | | `BLD` | Change packaging, dependencies, or build configuration | | `CI` | Change continuous integration workflows | | `REL` | Prepare or maintain a release | diff --git a/tests/test_commit_message.py b/tests/test_commit_message.py index c0b19936..c0f09ce1 100644 --- a/tests/test_commit_message.py +++ b/tests/test_commit_message.py @@ -22,6 +22,10 @@ "REL(packaging): prepare release artifacts", "REL/DOC: prepare release notes", "DOC/REL: update release notes", + "JOSS: update paper", + "JOSS(paper): add bibliography entries", + "JOSS/DOC: update paper instructions", + "DOC/JOSS: clarify paper build commands", "BUG/TST: correct weights", "BUG/TST(smc): reject degenerate weights", "MAINT/PERF(resampling): avoid duplicate reductions", @@ -52,6 +56,7 @@ def test_accepts_valid_subject( "", "FIX: correct weights", "bug: correct weights", + "joss: update paper", "BUG(SMC): correct weights", "BUG(): correct weights", "BUG(smc extra): correct weights", diff --git a/tools/check_commit_message.py b/tools/check_commit_message.py index 55b1ab42..2cbffe2b 100644 --- a/tools/check_commit_message.py +++ b/tools/check_commit_message.py @@ -5,7 +5,7 @@ import sys from pathlib import Path -PREFIX_PATTERN = r"(?:BUG|ENH|PERF|API|DEP|MAINT|TST|DOC|BLD|CI|STY|REL)" +PREFIX_PATTERN = r"(?:BUG|ENH|PERF|API|DEP|MAINT|TST|DOC|BLD|CI|STY|REL|JOSS)" SUBJECT_PATTERN = re.compile( rf"{PREFIX_PATTERN}(?:/{PREFIX_PATTERN})?" r"(?:\([a-z][a-z0-9_.-]*\))?: [a-z][^\r\n]*" @@ -46,7 +46,8 @@ def main() -> int: "Expected PREFIX(scope): lowercase summary, or PREFIX: lowercase " "summary.\n" "Two prefixes may be joined with '/', e.g. BUG/TST(smc): fix weights\n" - "Prefixes: BUG, ENH, PERF, API, DEP, MAINT, TST, DOC, BLD, CI, STY, REL.\n" + "Prefixes: BUG, ENH, PERF, API, DEP, MAINT, TST, DOC, BLD, CI, STY, " + "REL, JOSS.\n" "Optional scopes start with a lowercase letter and contain only " "lowercase letters, digits, '.', '_', or '-'.\n" "Use a single-line subject without trailing whitespace or a period.\n" From 3a16790167c77170c7b273ec4518e858ff9093b1 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 15 Oct 2026 11:05:08 +0200 Subject: [PATCH 08/19] JOSS: paper updates --- joss_paper/paper.bib | 39 +++++++- joss_paper/paper.md | 222 ++++++++++--------------------------------- 2 files changed, 86 insertions(+), 175 deletions(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index 1e66370c..c8dec21f 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -76,7 +76,7 @@ @misc{python_array_api note = {Accessed 2026-07-07} } -@article{Williams:2025aar, +@article{williams2026accelerated, author = "Williams, Michael J.", title = "{Accelerated Sequential Posterior Inference via Reuse for Gravitational-Wave Analyses}", eprint = "2511.04218", @@ -90,3 +90,40 @@ @article{Williams:2025aar pages = "021410", year = "2026" } + + +@article{salomone2025unbiased, + author = {Salomone, Robert and South, Leah F and Drovandi, Christopher and Kroese, Dirk P and Johansen, Adam M}, + title = {Unbiased and consistent nested sampling via sequential Monte Carlo}, + journal = {Journal of the Royal Statistical Society Series B: Statistical Methodology}, + volume = {87}, + number = {4}, + pages = {1221-1238}, + year = {2025}, + month = {09}, + issn = {1369-7412}, + doi = {10.1093/jrsssb/qkaf015}, + url = {https://doi.org/10.1093/jrsssb/qkaf015}, + eprint = {https://academic.oup.com/jrsssb/article-pdf/87/4/1221/63166567/qkaf015.pdf}, +} + +@article{dau2022wastefree, + author = {Dau, Hai-Dang and Chopin, Nicolas}, + title = {Waste-Free Sequential Monte Carlo}, + journal = {Journal of the Royal Statistical Society Series B: Statistical Methodology}, + volume = {84}, + number = {1}, + pages = {114-148}, + year = {2022}, + month = {02}, + issn = {1369-7412}, + doi = {10.1111/rssb.12475}, + url = {https://doi.org/10.1111/rssb.12475}, + eprint = {https://academic.oup.com/jrsssb/article-pdf/84/1/114/49324223/jrsssb_84_1_114.pdf}, +} + +@misc{williams2026inprep, + author = {Williams, Michael J., Chapman-Bird, Chrstian E. A, Costa Barroso, Raissa, Harry, Ian}, + title = {In Preparation}, + year = {2026} +} diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 38e09174..d7de5a9d 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -8,190 +8,68 @@ tags: authors: - name: Michael J. Williams orcid: 0000-0003-2198-2974 - affiliation: 1 + affiliation: "1, 2" - name: Christian E. A. Chapman-Bird orcid: 0000-0002-2728-9612 - affiliation: 2 + affiliation: 3 affiliations: -- name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom +- name: Max Planck Institute for Gravitational Physics (Albert Einstein Institute), Potsdam, Germany index: 1 -- name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom +- name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom index: 2 -date: 18 June 2026 +- name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom + index: 3 +date: 15 October 2026 bibliography: paper.bib --- # Summary Sequential Monte Carlo (SMC) methods are a flexible family of algorithms for -approximating sequences of probability distributions using weighted particles, -resampling, and mutation steps [@delmoral2006smc; @chopin2020introduction]. -Such sequences arise naturally in applications including Bayesian computation, -particle filtering, model comparison, and sequential inference, for example -through likelihood tempering or observations arriving over time. - -`sequince` is a Python toolkit for constructing SMC methods from reusable -components rather than exposing only a small number of fixed algorithms. It -provides abstractions for defining sequences of target distributions and for -composing the weighting, resampling, mutation, transformation, and control -steps used to evolve a particle population between them. It is designed for -users who need to adapt SMC to new scientific problems, including -domain-specific workflows in astrophysics and other research areas. +approximating sequences of probability distributions using a population of weighted samples, known as particles +[@delmoral2006smc; @chopin2020introduction]. +Such sequences arise naturally in applications including Bayesian inference, +and particle filtering, for example through likelihood tempering or observations arriving over time. + +`sequince` is a Python toolkit for constructing SMC methods from reusable and extensible +components. It provides abstractions for defining sequences of target +distributions and for composing the operations used to evolve a particle population between them. +These include weighting, resampling, mutation, transformation, and control steps. +It is designed for researchers developing new SMC methods or adapting existing methods to scientific applications, including astrophysical inference, with checkpointing to support long-running analyses. Its core components follow the Python Array API standard, supporting NumPy, JAX, PyTorch, and CuPy arrays and enabling compatible workflows to run on CPUs or GPUs. # Statement of need -SMC is often most useful when it is customised. Researchers may need to combine -adaptive tempering, resampling strategies, mutation kernels, deterministic -transformations, stopping rules, or multi-stage procedures in ways that differ -from standard textbook pipelines. The sequence of target distributions itself -may also be problem dependent, for example when targets are constructed through -annealing or updated as new observations become available. In many projects, -this logic ends up embedded in application-specific code, making it harder to -compare methods, reuse components, and move prototype algorithms into stable -analysis software. - -`sequince` addresses this gap by providing a general-purpose, step-oriented -framework for SMC. Its central abstraction is the evolution of a particle -population through a sequence of target distributions using interchangeable -algorithmic components. Users can start from pre-built samplers for common -problems, such as tempered Bayesian inference and persistent sampling, or -construct SMC pipelines manually when they require full control over weighting, -resampling, mutation, transformations, and control flow. This makes the package -suitable both for routine inference and for methodological work in which new -SMC variants are developed and tested. - -The package is also designed around backend-aware core abstractions so that -particle states, target evaluations, weight updates, and standard SMC -operations can use arrays from multiple Python array libraries where possible. -In particular, `sequince` aligns these core abstractions with the Python Array -API standard [@python_array_api], while allowing specialised components to -target particular ecosystems when required. This facilitates integration with -hardware-accelerated numerical libraries that are increasingly common in -scientific computing. +Scientific applications often require SMC methods tailored to a particular problem. Researchers may need to combine adaptive tempering, mutation kernels, transformations, stopping rules, or multi-stage procedures, and to define problem-specific sequences of target distributions. When this logic is embedded in application-specific code, it becomes harder to compare methods, reuse components, and move prototype algorithms into stable analysis software. + +`sequince` addresses these needs through a general-purpose, step-oriented framework with interchangeable algorithmic components. Researchers can start from pre-built samplers for common inference problems or construct custom pipelines with explicit control over the operations and their execution order. The same framework therefore supports both established inference methods and methodological research into new SMC variants. + +Scientific models are also increasingly implemented using different numerical libraries to exploit automatic differentiation and hardware acceleration. Coupling an SMC implementation to a single array library can restrict its integration with these models. `sequince` uses the Python Array API standard [@python_array_api] to support reusable core operations across multiple numerical backends, while allowing specialised components to target particular ecosystems. # State of the field -The Python ecosystem already contains several useful SMC-related tools. The -`particles` package accompanying @chopin2020introduction provides -implementations of many established SMC and particle-filtering methods and is -particularly useful for teaching and methodological prototyping. `SMCPy` -focuses on uncertainty quantification and Bayesian calibration using parallel -likelihood-tempering SMC samplers, including fixed and adaptive tempering -variants [@smcpy_repo]. `pocomc` implements persistent sampling with -normalizing flows for posterior inference [@karamanis2025persistent]. - -Broader Bayesian software ecosystems also expose SMC functionality. `PyMC` -includes a sequential Monte Carlo sampler within a general probabilistic -programming framework [@abrilpla2023pymc], while `BlackJAX` provides composable -inference components in the JAX ecosystem and includes SMC methods alongside -other Monte Carlo algorithms [@cabezas2024blackjax]. Recent domain-specific -frameworks such as SHARPy target gravitational-wave inference with -JAX-accelerated SMC and gradient-based mutation kernels [@demasi2026sharpy]. - -`sequince` differs from these tools by prioritising a general, modular -architecture for constructing bespoke SMC algorithms. Rather than defining a -single inference procedure, it separates the target distribution, particle -state, and operations that evolve the population. Users can therefore -reconfigure the sequence of SMC operations, introduce custom target sequences -and transformations, use mutation kernels from different sampling ecosystems, -attach problem-specific diagnostics, or compose higher-level SMC procedures -from the same underlying components. This emphasis on composability is intended -to make `sequince` useful both as research infrastructure for developing new -methods and as a foundation for application-specific downstream packages. +The Python ecosystem already contains several useful SMC-related tools. The `particles` package accompanying @chopin2020introduction provides implementations of many established SMC and particle-filtering methods and is particularly useful for teaching and methodological prototyping. `SMCPy` focuses on uncertainty quantification and Bayesian calibration using parallel likelihood-tempering SMC samplers, including fixed and adaptive tempering variants [@smcpy_repo]. `pocomc` implements persistent sampling with normalizing flows for posterior inference [@karamanis2025persistent]. + +Broader Bayesian software ecosystems also expose SMC functionality. `PyMC` includes a sequential Monte Carlo sampler within a general probabilistic programming framework [@abrilpla2023pymc], while `BlackJAX` provides composable inference components in the JAX ecosystem and includes SMC methods alongside other Monte Carlo algorithms [@cabezas2024blackjax]. Recent domain-specific frameworks such as SHARPy target gravitational-wave inference with JAX-accelerated SMC and gradient-based mutation kernels [@demasi2026sharpy]. + +`sequince` combines support for multiple SMC variants, including tempering, persistent sampling [@karamanis2025persistent], nested sampling via SMC (NS-SMC) [@salomone2025unbiased], and waste-free SMC [@dau2022wastefree], with a modular architecture for constructing bespoke algorithms. Shared interfaces allow users to reconfigure target sequences, transformations, mutation kernels, and control flow, supporting both the comparison of existing methods and the development of new variants. Support for multiple array backends and integrations with different sampling ecosystems further enable these components to be reused across scientific applications and numerical libraries. This combination makes `sequince` useful as research infrastructure for methodological work and as a foundation for application-specific downstream packages. # Software design -The distributions approximated during an SMC run are represented in `sequince` -by target objects. A target evaluates named components of a probability -distribution for a population of particles, while sequential targets describe -how that distribution changes between stages of an SMC procedure. For example, -a tempered Bayesian target constructs a sequence between a prior and posterior -using an inverse-temperature parameter, whereas other targets may depend on -observations supplied sequentially during a run. - -Target evaluations are stored as particle-aligned collections of named -quantities. These evaluations can be propagated through operations such as -resampling and mutation, allowing previously computed quantities to be reused -where possible. Separating target evaluation from the SMC operations that -consume it also provides a common interface for weighting and mutation steps -across different forms of sequential inference. - -Particle populations are represented by a `ParticleState`, which stores the -particles, their log weights, accumulated normalising-constant information, and -associated target evaluations. Specialised states extend this representation -where an algorithm requires additional information. For example, persistent SMC -retains particles from previous populations in a persistent particle state. - -The SMC algorithm itself is expressed as an ordered collection of steps. Each -step receives the current particle state, a runtime context, and a random -number generator and returns an updated state, updated context, and structured -outputs. These outputs can contain algorithm-specific quantities such as -effective sample sizes, tempering parameters, acceptance statistics, or other -diagnostics. The runner accumulates these outputs during execution so that the -trajectory of the SMC procedure can be inspected after sampling. - -The small step interface allows weighting, resampling, mutation, proposal, -transformation, and control operations to be implemented independently and -combined into different algorithms. Higher-level steps can conditionally -execute or compose other steps, allowing algorithmic control flow to be -represented within the same framework rather than being embedded directly in -the runner. This also makes it possible to reuse individual components across -otherwise different SMC constructions. - -A `SequentialMonteCarlo` runner repeatedly applies the configured sequence of -steps. The runtime context records the current iteration, the current -observation when processing sequential data, shared user-provided information, -and metadata used for communication between steps. It also exposes explicit -stopping controls. The runner accepts an iterable of observations and advances -through them as the SMC procedure progresses, allowing the same execution model -to support both static target sequences and problems in which the target -changes as new data become available. - -The output of a run is represented by an `SMCResult`, which separates -analysis-facing results from the mutable objects used while the sampler is -executing. In addition to the final particle state, the result records outputs -accumulated throughout the SMC procedure. This allows quantities such as -tempering schedules, effective sample sizes, mutation diagnostics, evidence -estimates, and other step-specific information to be inspected after sampling. -Because individual steps can return structured outputs, new algorithms can -extend the information recorded by a result without requiring corresponding -changes to the runner. - -This distinction between runtime state and stored results is important for -methodological work. The particle state represents the current approximation to -a target distribution, the runtime context contains information required while -the sampler is executing, and the result provides the persistent record used -for subsequent analysis. In this way, diagnostics produced by experimental -weighting, mutation, or control steps can be recorded systematically without -coupling them to plotting or logging code. - -The core particle-state, target, weighting, transformation, and runner -abstractions are written around the Python Array API standard where possible -[@python_array_api], allowing backend-native arrays to flow through the SMC -procedure. Random number generation is similarly abstracted through the `orng` -interface. In addition to conventional eager execution, `sequince` provides a -functional execution path in which random state is explicitly threaded through -each step. Compatible step pipelines can therefore be transformed using -facilities such as `jax.jit`, while specialised mutation methods can still -integrate with ecosystem-specific packages including `BlackJAX`. - -Callbacks provide observational functionality such as logging, plotting, and -diagnostics without coupling these tasks to the SMC steps themselves. -Checkpointing is handled separately from result recording. Checkpoint writers -capture the information required to resume an analysis, including the current -particle state, runtime progress, random-number state, and mutable state -belonging to individual SMC steps. By contrast, `SMCResult` provides the -analysis product of a completed or partially completed run. Results and -checkpoints can be serialised using portable HDF5 representations, avoiding -reliance on serialising live Python objects and allowing analyses to be -inspected or resumed independently of the original process. - -Together, the target, particle-state, step, context, result, and runner -abstractions provide a compact foundation from which both standard and -experimental SMC algorithms can be constructed. Pre-built configurations cover -common Bayesian workflows, while the same interfaces are used to implement more -specialised procedures such as persistent SMC and sequential inference with -observations arriving over time. +`sequince` separates target distributions, particle populations, and the operations used to evolve them. The following outlines the main design choices; the documentation and runnable examples provide detailed descriptions of the interfaces and their use. + +The distributions approximated during an SMC run are represented by target objects. A target evaluates named components of a probability distribution for a population of particles, while sequential targets describe how that distribution changes between stages. Separating the target from the operations that evolve the particles allows weighting and mutation components to be reused across different inference procedures. For example, tempered SMC and nested-sampling SMC use different target sequences while sharing resampling and compatible mutation components. + +Target evaluations are stored as particle-aligned collections of named quantities. These can be propagated through resampling and updated during mutation, allowing previously computed quantities to be reused where valid. This is particularly useful for scientific applications in which likelihood evaluations dominate the computational cost. A `ParticleState` stores the particles, their log weights, accumulated normalising-constant information, and associated target evaluations. Specialised states provide additional information where required, such as the archive of previous populations used by persistent SMC. + +An SMC algorithm is expressed as an ordered collection of steps. Each step receives the current particle state, a runtime context, and a random number generator, and returns an updated state, updated context, and structured outputs. Weighting, resampling, mutation, transformation, and control operations can therefore be implemented independently and combined into different algorithms. Higher-level steps can conditionally execute or compose other steps, keeping algorithm-specific control flow outside the runner. For example, waste-free SMC combines resampling with a mutation component that retains intermediate chain states. + +A `SequentialMonteCarlo` runner repeatedly applies the configured steps. The runtime context contains the current iteration and observation, shared user-provided information, metadata used for communication between steps, and stopping controls. The runner accepts an iterable of observations, supporting both static inference problems and procedures in which targets change as new data become available. Separating particle state, runtime context, and algorithm configuration allows the execution machinery to remain common across different SMC constructions. + +Each step can return structured outputs containing quantities such as effective sample sizes, tempering parameters, acceptance statistics, and other diagnostics. These outputs and the recorded particle states are collected in an `SMCResult` for subsequent analysis. New components can therefore introduce diagnostics without requiring changes to the runner or coupling their implementation to plotting and logging code. Callbacks provide logging, plotting, and other monitoring functionality during execution. + +The core abstractions follow the Python Array API standard where possible [@python_array_api], allowing backend-native arrays to pass through the SMC procedure. Random number generation is similarly abstracted through `orng`. This design supports reuse across numerical libraries while allowing specialised components to depend on a particular ecosystem. Alongside conventional eager execution, `sequince` provides a functional execution path that passes random state explicitly between steps. Compatible iterations can be compiled using facilities such as `jax.jit`, while the runner manages observations, callbacks, and result recording. Mutation integrations include ecosystem-specific packages such as `BlackJAX` [@cabezas2024blackjax]. + +Checkpointing is separate from result recording. Checkpoints capture the particle state, runtime progress, random-number state, and mutable step state needed to continue sampling with a reconstructed sampler configuration. Results provide the analysis record of a completed or partially completed run. Both support HDF5 storage, making numerical data and supported metadata available for inspection independently of the running process. # Research impact statement @@ -199,8 +77,8 @@ observations arriving over time. methodological research and problem-specific inference workflows. Current applications include customised sampling strategies for astrophysical inference problems relevant to ongoing LIGO-Virgo-KAGRA analyses and future observations -with the Laser Interferometer Space Antenna (LISA), as well as integration with -broader Bayesian inference ecosystems such as bilby [@ashton2019bilby]. The +with the Laser Interferometer Space Antenna (LISA) [@williams2026efficient], as well as integration with +broader Bayesian inference ecosystems such as `bilby` [@ashton2019bilby] via `sequince-bilby` [@sequince_bilby]. The same methodology is also relevant to future ground-based observatories such as the Einstein Telescope (ET) and Cosmic Explorer (CE). @@ -214,22 +92,18 @@ compare algorithm-specific diagnostics across these different methods. The modular design of `sequince` additionally supports downstream packages that add method- or domain-specific functionality without requiring those -dependencies in the core library. For example, `sequince-density` provides +dependencies in the core library. For example, `sequince-density` [@sequince_density] provides density-estimation components based on Gaussian mixture models and normalizing flows. These can be combined with the core SMC machinery for learned preconditioning, proposal construction, and other density-assisted SMC methods, including approaches related to `pocomc` and ASPIRE \[@karamanis2025persistent; -@Williams:2025aar\]. The wider sequince ecosystem also includes +@williams2025accelerated\]. The wider sequince ecosystem also includes `sequince-examples`, which provides runnable examples demonstrating common -workflows and more specialised uses of the package. +workflows and more specialised uses of the package [@sequince_examples]. # AI usage disclosure -Generative AI tools were used to assist with code implementation and -refactoring from targeted prompts. OpenAI Codex, via ChatGPT 5.3, 5.4 and 5.6, -and GitHub Copilot were used during software development. The authors reviewed, -edited, and validated all AI-assisted outputs and retain responsibility for the -design and implementation decisions. +Generative AI tools, including OpenAI Codex and GitHub Copilot, were used to assist with code implementation and refactoring. ChatGPT was also used to assist with the organisation and editing of the manuscript. The authors made the core scientific and software design decisions and reviewed, edited, and validated all AI-assisted contributions. The authors retain full responsibility for the software and manuscript. # Acknowledgements From 1ecf183c014e8c3ebebcf157ce0fb68b2d38a4ca Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 15 Oct 2026 11:05:20 +0200 Subject: [PATCH 09/19] JOSS: add Makefile for building paper draft --- joss_paper/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 joss_paper/Makefile diff --git a/joss_paper/Makefile b/joss_paper/Makefile new file mode 100644 index 00000000..3dca95f3 --- /dev/null +++ b/joss_paper/Makefile @@ -0,0 +1,19 @@ +.PHONY: joss arxiv + +# Build the JOSS PDF (default). +joss: + docker run --rm \ + --volume "$(CURDIR):/data" \ + --user "$$(id -u):$$(id -g)" \ + --env JOURNAL=joss \ + openjournals/inara \ + -o pdf paper.md + +# Build the arXiv preprint. +arxiv: + docker run --rm \ + --volume "$(CURDIR):/data" \ + --user "$$(id -u):$$(id -g)" \ + --env JOURNAL=joss \ + openjournals/inara \ + -o preprint paper.md From 6b43755cc42ed1f4db51fa00369b91fb4c75d2e5 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Fri, 16 Oct 2026 10:14:31 +0200 Subject: [PATCH 10/19] JOSS: update references --- joss_paper/paper.bib | 48 ++++++++++++++++++++++++++++++++++++++++++++ joss_paper/paper.md | 10 ++++----- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index c8dec21f..802ec28c 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -127,3 +127,51 @@ @misc{williams2026inprep title = {In Preparation}, year = {2026} } + +@software{orng, + author = {Michael J. Williams and + Colm Talbot}, + title = {sequince-dev/orng}, + publisher = {Zenodo}, + doi = {10.5281/zenodo.17544786}, + url = {https://doi.org/10.5281/zenodo.17544786}, +} + +@software{bilby, + author = {Colm Talbot and + Gregory Ashton and + Moritz Hübner and + Matt Pitkin and + Michael J. Williams and + plasky and + asb5468 and + Aditya Vijaykumar and + Rory Smith and + SMorisaki and + John Veitch and + Duncan Macleod and + Nikhil Sarin and + Daniel Williams and + JasperMartins and + MarcArene and + Vivien Raymond and + C P L Berry and + AlexandreGoettel and + Fabian Gittins and + Ceciliogq and + Lorenzo Pompili and + Ivan Markin and + David Keitel and + Hen42rik and + Mick Wright and + oliviawilk and + noahewolfe and + jacobgolomb and + Shichao Wu}, + title = {bilby-dev/bilby}, + month = aug, + year = 2026, + publisher = {Zenodo}, + doi = {10.5281/zenodo.14025463}, + url = {https://doi.org/10.5281/zenodo.14025463}, +} diff --git a/joss_paper/paper.md b/joss_paper/paper.md index d7de5a9d..143603a9 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -67,7 +67,7 @@ A `SequentialMonteCarlo` runner repeatedly applies the configured steps. The run Each step can return structured outputs containing quantities such as effective sample sizes, tempering parameters, acceptance statistics, and other diagnostics. These outputs and the recorded particle states are collected in an `SMCResult` for subsequent analysis. New components can therefore introduce diagnostics without requiring changes to the runner or coupling their implementation to plotting and logging code. Callbacks provide logging, plotting, and other monitoring functionality during execution. -The core abstractions follow the Python Array API standard where possible [@python_array_api], allowing backend-native arrays to pass through the SMC procedure. Random number generation is similarly abstracted through `orng`. This design supports reuse across numerical libraries while allowing specialised components to depend on a particular ecosystem. Alongside conventional eager execution, `sequince` provides a functional execution path that passes random state explicitly between steps. Compatible iterations can be compiled using facilities such as `jax.jit`, while the runner manages observations, callbacks, and result recording. Mutation integrations include ecosystem-specific packages such as `BlackJAX` [@cabezas2024blackjax]. +The core abstractions follow the Python Array API standard where possible [@python_array_api], allowing backend-native arrays to pass through the SMC procedure. Random number generation is similarly abstracted through `orng` [@orng]. This design supports reuse across numerical libraries while allowing specialised components to depend on a particular ecosystem. Alongside conventional eager execution, `sequince` provides a functional execution path that passes random state explicitly between steps. Compatible iterations can be compiled using facilities such as `jax.jit`, while the runner manages observations, callbacks, and result recording. Mutation integrations include ecosystem-specific packages such as `BlackJAX` [@cabezas2024blackjax]. Checkpointing is separate from result recording. Checkpoints capture the particle state, runtime progress, random-number state, and mutable step state needed to continue sampling with a reconstructed sampler configuration. Results provide the analysis record of a completed or partially completed run. Both support HDF5 storage, making numerical data and supported metadata available for inspection independently of the running process. @@ -77,8 +77,8 @@ Checkpointing is separate from result recording. Checkpoints capture the particl methodological research and problem-specific inference workflows. Current applications include customised sampling strategies for astrophysical inference problems relevant to ongoing LIGO-Virgo-KAGRA analyses and future observations -with the Laser Interferometer Space Antenna (LISA) [@williams2026efficient], as well as integration with -broader Bayesian inference ecosystems such as `bilby` [@ashton2019bilby] via `sequince-bilby` [@sequince_bilby]. The +with the Laser Interferometer Space Antenna (LISA) [@williams2026inprep], as well as integration with +broader Bayesian inference ecosystems such as `bilby` \[@ashton2019bilby,@bilby\] via `sequince-bilby` [@sequince_bilby]. The same methodology is also relevant to future ground-based observatories such as the Einstein Telescope (ET) and Cosmic Explorer (CE). @@ -96,8 +96,8 @@ dependencies in the core library. For example, `sequince-density` [@sequince_den density-estimation components based on Gaussian mixture models and normalizing flows. These can be combined with the core SMC machinery for learned preconditioning, proposal construction, and other density-assisted SMC methods, -including approaches related to `pocomc` and ASPIRE \[@karamanis2025persistent; -@williams2025accelerated\]. The wider sequince ecosystem also includes +including approaches related to `pocomc` and `aspire` \[@karamanis2025persistent; +@williams2026accelerated\]. The wider sequince ecosystem also includes `sequince-examples`, which provides runnable examples demonstrating common workflows and more specialised uses of the package [@sequince_examples]. From 665b8ba5068a5aad5aeb76375a2425242206e190 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Tue, 27 Oct 2026 12:23:34 +0100 Subject: [PATCH 11/19] JOSS: update reference and acknowledgments --- joss_paper/paper.bib | 28 ++++++++++++++++++++++++++++ joss_paper/paper.md | 14 ++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index 802ec28c..63a60b1c 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -128,6 +128,34 @@ @misc{williams2026inprep year = {2026} } +@software{sequince, + author = {Michael J. Williams and + Christian Chapman-Bird}, + title = {sequince-dev/sequince}, + year = {2026}, + publisher = {Zenodo}, + doi = {10.5281/zenodo.23596103}, + url = {https://doi.org/10.5281/zenodo.23596103}, +} + +@software{sequince_density, + author = {Michael J. Williams}, + title = {sequince-dev/sequince-density}, + year = {2026}, + publisher = {Zenodo}, + doi = {10.5281/zenodo.23687687}, + url = {https://doi.org/10.5281/zenodo.23687687}, +} + +@misc{sequince_examples, + author = {{Sequince contributors}}, + title = {sequince-dev/sequince-examples}, + year = {2026}, + howpublished = {\url{https://github.com/sequince-dev/sequince-examples}}, + url = {https://github.com/sequince-dev/sequince-examples}, + note = {Accessed 2026-10-27}, +} + @software{orng, author = {Michael J. Williams and Colm Talbot}, diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 143603a9..76d02cae 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -13,7 +13,7 @@ authors: orcid: 0000-0002-2728-9612 affiliation: 3 affiliations: -- name: Max Planck Institute for Gravitational Physics (Albert Einstein Institute), Potsdam, Germany +- name: Max Planck Institute for Gravitational Physics (Albert Einstein Institute), Am Mühlenberg 1, 14476 Potsdam, Germany index: 1 - name: Institute of Cosmology and Gravitation, University of Portsmouth, United Kingdom index: 2 @@ -31,8 +31,9 @@ approximating sequences of probability distributions using a population of weigh Such sequences arise naturally in applications including Bayesian inference, and particle filtering, for example through likelihood tempering or observations arriving over time. -`sequince` is a Python toolkit for constructing SMC methods from reusable and extensible -components. It provides abstractions for defining sequences of target +`sequince` [@sequince] is a Python toolkit for constructing SMC methods from reusable and extensible +components. This paper describes version 0.1.0 of the toolkit. +The toolkit provides abstractions for defining sequences of target distributions and for composing the operations used to evolve a particle population between them. These include weighting, resampling, mutation, transformation, and control steps. It is designed for researchers developing new SMC methods or adapting existing methods to scientific applications, including astrophysical inference, with checkpointing to support long-running analyses. Its core components follow the Python Array API standard, supporting NumPy, JAX, PyTorch, and CuPy arrays and enabling compatible workflows to run on CPUs or GPUs. @@ -55,7 +56,7 @@ Broader Bayesian software ecosystems also expose SMC functionality. `PyMC` inclu # Software design -`sequince` separates target distributions, particle populations, and the operations used to evolve them. The following outlines the main design choices; the documentation and runnable examples provide detailed descriptions of the interfaces and their use. +`sequince` separates target distributions, particle populations, and the operations used to evolve them. The following outlines the main design choices; the [documentation](https://sequince.readthedocs.io/en/latest/) and [runnable examples](https://sequince.readthedocs.io/projects/sequince-examples/en/latest/) provide detailed descriptions of the interfaces and their use. The distributions approximated during an SMC run are represented by target objects. A target evaluates named components of a probability distribution for a population of particles, while sequential targets describe how that distribution changes between stages. Separating the target from the operations that evolve the particles allows weighting and mutation components to be reused across different inference procedures. For example, tempered SMC and nested-sampling SMC use different target sequences while sharing resampling and compatible mutation components. @@ -99,7 +100,8 @@ preconditioning, proposal construction, and other density-assisted SMC methods, including approaches related to `pocomc` and `aspire` \[@karamanis2025persistent; @williams2026accelerated\]. The wider sequince ecosystem also includes `sequince-examples`, which provides runnable examples demonstrating common -workflows and more specialised uses of the package [@sequince_examples]. +workflows and more specialised uses of the package [@sequince_examples], with +[online documentation](https://sequince.readthedocs.io/projects/sequince-examples/en/latest/). # AI usage disclosure @@ -107,7 +109,7 @@ Generative AI tools, including OpenAI Codex and GitHub Copilot, were used to ass # Acknowledgements -M.J.W. acknowledges support from ST/X002225/1, ST/Y004876/1, and the University +M.J.W. acknowledges support from Max-Planck-Gesellschaft, ST/X002225/1, ST/Y004876/1, and the University of Portsmouth. C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. Numerical computations were carried out on the SCIAMA high-performance From 36d355e6b5616534d074a9840c90dd2986af94c8 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Wed, 28 Oct 2026 17:33:43 +0100 Subject: [PATCH 12/19] JOSS: add sequince-bilby reference --- joss_paper/paper.bib | 9 +++++++++ joss_paper/paper.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index 63a60b1c..9b1a3d8c 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -147,6 +147,15 @@ @software{sequince_density url = {https://doi.org/10.5281/zenodo.23687687}, } +@software{sequince_bilby, + author = {Michael J. Williams}, + title = {sequince-dev/sequince-bilby}, + year = {2026}, + publisher = {Zenodo}, + doi = {10.5281/zenodo.23736054}, + url = {https://doi.org/10.5281/zenodo.23736054}, +} + @misc{sequince_examples, author = {{Sequince contributors}}, title = {sequince-dev/sequince-examples}, diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 76d02cae..334d7b6d 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -32,7 +32,7 @@ Such sequences arise naturally in applications including Bayesian inference, and particle filtering, for example through likelihood tempering or observations arriving over time. `sequince` [@sequince] is a Python toolkit for constructing SMC methods from reusable and extensible -components. This paper describes version 0.1.0 of the toolkit. +components. This paper describes `sequince` v0.1.0. The toolkit provides abstractions for defining sequences of target distributions and for composing the operations used to evolve a particle population between them. These include weighting, resampling, mutation, transformation, and control steps. From c790ee9ac3d82e84594acc09eb1b9047a21c0e36 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Wed, 28 Oct 2026 18:10:40 +0100 Subject: [PATCH 13/19] JOSS: update references --- joss_paper/paper.bib | 71 ++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index 9b1a3d8c..5fd0ea2c 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -1,68 +1,75 @@ @book{chopin2020introduction, - title={An introduction to sequential Monte Carlo}, - author={Chopin, Nicolas and Papaspiliopoulos, Omiros and others}, - volume={4}, + title={An introduction to sequential {Monte Carlo}}, + author={Chopin, Nicolas and Papaspiliopoulos, Omiros}, + series={Springer Series in Statistics}, year={2020}, - publisher={Springer} + publisher={Springer}, + doi={10.1007/978-3-030-47845-2} } @article{delmoral2006smc, - title={Sequential Monte Carlo Samplers}, + title={Sequential {Monte Carlo} Samplers}, author={Del Moral, Pierre and Doucet, Arnaud and Jasra, Ajay}, journal={Journal of the Royal Statistical Society: Series B (Statistical Methodology)}, volume={68}, number={3}, pages={411--436}, - year={2006} + year={2006}, + doi={10.1111/j.1467-9868.2006.00553.x} } @article{karamanis2025persistent, - title={Persistent Sampling: Enhancing the Efficiency of Sequential Monte Carlo}, + title={Persistent Sampling: Enhancing the Efficiency of Sequential {Monte Carlo}}, author={Karamanis, Minas and Seljak, Uro{\v{s}}}, - journal={Statistics and computing}, + journal={Statistics and Computing}, volume={35}, number={5}, pages={144}, year={2025}, - publisher={Springer} + publisher={Springer}, + doi={10.1007/s11222-025-10682-y} } @article{cabezas2024blackjax, - title={BlackJAX: Composable Bayesian inference in JAX}, + title={{BlackJAX}: Composable {Bayesian} inference in {JAX}}, author={Cabezas, Alberto and Corenflos, Adrien and Lao, Junpeng and Louf, R{\'e}mi and Carnec, Antoine and Chaudhari, Kaustubh and Cohn-Gordon, Reuben and Coullon, Jeremie and Deng, Wei and Duffield, Sam and Dur{\'a}n-Mart{\'i}n, Gerardo and Elantkowski, Marcin and Foreman-Mackey, Dan and Gregori, Michele and Iguaran, Carlos and Kumar, Ravin and Lysy, Martin and Murphy, Kevin and Orduz, Juan Camilo and Patel, Karm and Wang, Xi and Zinkov, Rob}, journal={arXiv preprint arXiv:2402.10797}, + url={https://arxiv.org/abs/2402.10797}, year={2024} } @article{demasi2026sharpy, - title={The Sequential Monte Carlo goes NUTS: Boosting Gravitational-Wave Inference}, + title={The Sequential {Monte Carlo} goes {NUTS}: Boosting Gravitational-Wave Inference}, author={Demasi, Gabriele and Capurri, Giulia and Lenti, Massimo and Ricciardone, Angelo and Patricelli, Barbara and Frattale Mascioli, Adriano and Piccari, Lorenzo and Albuquerque, Saulo and Guidi, Gianluca M. and Pannarale, Francesco and Stratta, Giulia and Del Pozzo, Walter}, journal={arXiv preprint arXiv:2601.02336}, + url={https://arxiv.org/abs/2601.02336}, year={2026} } @article{ashton2019bilby, - title={Bilby: A user-friendly Bayesian inference library for gravitational-wave astronomy}, + title={{Bilby}: A user-friendly {Bayesian} inference library for gravitational-wave astronomy}, author={Ashton, Gregory and H{\"u}bner, Moritz and Lasky, Paul D. and Talbot, Colm and Ackley, Kendall and Biscoveanu, Sylvia and Chu, Qi and Divarkala, Atul and Easter, Paul J. and Goncharov, Boris and Hernandez Vivanco, Francisco and Harms, Jan and Lower, Marcus E. and Meadors, Grant D. and Melchor, Denyz and Payne, Ethan and Pitkin, Matthew D. and Powell, Jade and Sarin, Nikhil and Smith, Rory J. E. and Thrane, Eric}, - journal={Royal Society Open Science}, - volume={6}, + journal={The Astrophysical Journal Supplement Series}, + volume={241}, number={2}, - pages={181707}, - year={2019} + pages={27}, + year={2019}, + doi={10.3847/1538-4365/ab06fc} } @article{abrilpla2023pymc, - title={PyMC: A modern, and comprehensive probabilistic programming framework in Python}, + title={{PyMC}: A modern, and comprehensive probabilistic programming framework in {Python}}, author={Abril-Pla, Oriol and Andreani, Virgile and Carroll, Colin and Dong, Larry and Fonnesbeck, Christopher J. and Kochurov, Maxim and Kumar, Ravin and Lao, Junpeng and Luhmann, Christian C. and Martin, Osvaldo A. and Osthege, Michael and Vieira, Ricardo and Wiecki, Thomas V. and Zinkov, Robert}, journal={PeerJ Computer Science}, volume={9}, pages={e1516}, - year={2023} + year={2023}, + doi={10.7717/peerj-cs.1516} } @misc{smcpy_repo, author = {{NASA Langley Research Center}}, - title = {SMCPy: Python module for uncertainty quantification using a parallel sequential Monte Carlo sampler}, + title = {{SMCPy}: {Python} module for uncertainty quantification using a parallel sequential {Monte Carlo} sampler}, year = {2026}, howpublished = {\url{https://github.com/nasa/SMCPy}}, note = {Accessed 2026-07-07} @@ -70,7 +77,7 @@ @misc{smcpy_repo @misc{python_array_api, author = {{Consortium for Python Data API Standards}}, - title = {Python array API standard}, + title = {{Python} array {API} standard}, year = {2026}, howpublished = {\url{https://data-apis.org/array-api/latest/}}, note = {Accessed 2026-07-07} @@ -94,11 +101,11 @@ @article{williams2026accelerated @article{salomone2025unbiased, author = {Salomone, Robert and South, Leah F and Drovandi, Christopher and Kroese, Dirk P and Johansen, Adam M}, - title = {Unbiased and consistent nested sampling via sequential Monte Carlo}, + title = {Unbiased and consistent nested sampling via sequential {Monte Carlo}}, journal = {Journal of the Royal Statistical Society Series B: Statistical Methodology}, volume = {87}, number = {4}, - pages = {1221-1238}, + pages = {1221--1238}, year = {2025}, month = {09}, issn = {1369-7412}, @@ -109,11 +116,11 @@ @article{salomone2025unbiased @article{dau2022wastefree, author = {Dau, Hai-Dang and Chopin, Nicolas}, - title = {Waste-Free Sequential Monte Carlo}, + title = {Waste-Free Sequential {Monte Carlo}}, journal = {Journal of the Royal Statistical Society Series B: Statistical Methodology}, volume = {84}, number = {1}, - pages = {114-148}, + pages = {114--148}, year = {2022}, month = {02}, issn = {1369-7412}, @@ -123,7 +130,7 @@ @article{dau2022wastefree } @misc{williams2026inprep, - author = {Williams, Michael J., Chapman-Bird, Chrstian E. A, Costa Barroso, Raissa, Harry, Ian}, + author = {Williams, Michael J. and Chapman-Bird, Christian E. A. and Costa Barroso, Raissa and Harry, Ian}, title = {In Preparation}, year = {2026} } @@ -131,7 +138,7 @@ @misc{williams2026inprep @software{sequince, author = {Michael J. Williams and Christian Chapman-Bird}, - title = {sequince-dev/sequince}, + title = {{sequince-dev/sequince}}, year = {2026}, publisher = {Zenodo}, doi = {10.5281/zenodo.23596103}, @@ -140,7 +147,7 @@ @software{sequince @software{sequince_density, author = {Michael J. Williams}, - title = {sequince-dev/sequince-density}, + title = {{sequince-dev/sequince-density}}, year = {2026}, publisher = {Zenodo}, doi = {10.5281/zenodo.23687687}, @@ -149,7 +156,7 @@ @software{sequince_density @software{sequince_bilby, author = {Michael J. Williams}, - title = {sequince-dev/sequince-bilby}, + title = {{sequince-dev/sequince-bilby}}, year = {2026}, publisher = {Zenodo}, doi = {10.5281/zenodo.23736054}, @@ -158,9 +165,8 @@ @software{sequince_bilby @misc{sequince_examples, author = {{Sequince contributors}}, - title = {sequince-dev/sequince-examples}, + title = {{sequince-dev/sequince-examples}}, year = {2026}, - howpublished = {\url{https://github.com/sequince-dev/sequince-examples}}, url = {https://github.com/sequince-dev/sequince-examples}, note = {Accessed 2026-10-27}, } @@ -168,7 +174,8 @@ @misc{sequince_examples @software{orng, author = {Michael J. Williams and Colm Talbot}, - title = {sequince-dev/orng}, + title = {{sequince-dev/orng}}, + year = {2026}, publisher = {Zenodo}, doi = {10.5281/zenodo.17544786}, url = {https://doi.org/10.5281/zenodo.17544786}, @@ -205,7 +212,7 @@ @software{bilby noahewolfe and jacobgolomb and Shichao Wu}, - title = {bilby-dev/bilby}, + title = {{bilby-dev/bilby}}, month = aug, year = 2026, publisher = {Zenodo}, From 3a0ac667006134f5b4edc2571a8a9a8ac0874835 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Wed, 28 Oct 2026 18:10:59 +0100 Subject: [PATCH 14/19] JOSS: formatting tweaks --- joss_paper/paper.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 334d7b6d..1af0b932 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -19,7 +19,7 @@ affiliations: index: 2 - name: Institute for Gravitational Wave Astronomy, University of Birmingham, United Kingdom index: 3 -date: 15 October 2026 +date: '\today' bibliography: paper.bib --- @@ -79,7 +79,7 @@ methodological research and problem-specific inference workflows. Current applications include customised sampling strategies for astrophysical inference problems relevant to ongoing LIGO-Virgo-KAGRA analyses and future observations with the Laser Interferometer Space Antenna (LISA) [@williams2026inprep], as well as integration with -broader Bayesian inference ecosystems such as `bilby` \[@ashton2019bilby,@bilby\] via `sequince-bilby` [@sequince_bilby]. The +broader Bayesian inference ecosystems such as `bilby` [@ashton2019bilby; @bilby] via `sequince-bilby` [@sequince_bilby]. The same methodology is also relevant to future ground-based observatories such as the Einstein Telescope (ET) and Cosmic Explorer (CE). @@ -97,8 +97,8 @@ dependencies in the core library. For example, `sequince-density` [@sequince_den density-estimation components based on Gaussian mixture models and normalizing flows. These can be combined with the core SMC machinery for learned preconditioning, proposal construction, and other density-assisted SMC methods, -including approaches related to `pocomc` and `aspire` \[@karamanis2025persistent; -@williams2026accelerated\]. The wider sequince ecosystem also includes +including approaches related to `pocomc` and `aspire` [@karamanis2025persistent; +@williams2026accelerated]. The wider sequince ecosystem also includes `sequince-examples`, which provides runnable examples demonstrating common workflows and more specialised uses of the package [@sequince_examples], with [online documentation](https://sequince.readthedocs.io/projects/sequince-examples/en/latest/). @@ -109,8 +109,8 @@ Generative AI tools, including OpenAI Codex and GitHub Copilot, were used to ass # Acknowledgements -M.J.W. acknowledges support from Max-Planck-Gesellschaft, ST/X002225/1, ST/Y004876/1, and the University -of Portsmouth. C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. +M.J.W. acknowledges support from Max-Planck-Gesellschaft, the UKSA's LISA Ground Segment (UKRI968) and Science and Technology Facilities Council (STFC) grant UKRI2490 +C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. Numerical computations were carried out on the SCIAMA high-performance computing cluster, which is supported by the Institute of Cosmology and From a9f7f245b985b596903b64f9590ab337c5c6aa37 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Wed, 28 Oct 2026 20:24:45 +0100 Subject: [PATCH 15/19] JOSS: tweak MJW acknowledgments --- joss_paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 1af0b932..4b69dd4e 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -109,7 +109,7 @@ Generative AI tools, including OpenAI Codex and GitHub Copilot, were used to ass # Acknowledgements -M.J.W. acknowledges support from Max-Planck-Gesellschaft, the UKSA's LISA Ground Segment (UKRI968) and Science and Technology Facilities Council (STFC) grant UKRI2490 +M.J.W. acknowledges partial support from the UKSA's LISA Ground Segment (UKRI968) and Science and Technology Facilities Council (STFC) grant UKRI2490 C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. Numerical computations were carried out on the SCIAMA high-performance From b2131bdb49fc7f38d358e3c76adf364f96025a2e Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 29 Oct 2026 09:56:38 +0100 Subject: [PATCH 16/19] JOSS: add abstract for arxiv --- joss_paper/paper.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 4b69dd4e..3567c590 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -21,6 +21,8 @@ affiliations: index: 3 date: '\today' bibliography: paper.bib +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. --- # Summary From b692e883ed08269dcf75e2fea45505c237fa4881 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 29 Oct 2026 09:57:39 +0100 Subject: [PATCH 17/19] JOSS: omit abstract from JOSS PDF and add arxiv PDF command --- joss_paper/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/joss_paper/Makefile b/joss_paper/Makefile index 3dca95f3..77310faa 100644 --- a/joss_paper/Makefile +++ b/joss_paper/Makefile @@ -1,13 +1,13 @@ -.PHONY: joss arxiv +.PHONY: joss arxiv arxiv.pdf -# Build the JOSS PDF (default). +# Build the JOSS PDF without the abstract (default). joss: docker run --rm \ --volume "$(CURDIR):/data" \ --user "$$(id -u):$$(id -g)" \ --env JOURNAL=joss \ openjournals/inara \ - -o pdf paper.md + -o pdf -- paper.md --metadata=abstract: # Build the arXiv preprint. arxiv: @@ -17,3 +17,14 @@ arxiv: --env JOURNAL=joss \ openjournals/inara \ -o preprint paper.md + +# Compile the arXiv preprint to paper.preprint.pdf. +arxiv.pdf: arxiv + docker run --rm \ + --volume "$(CURDIR):/data" \ + --user "$$(id -u):$$(id -g)" \ + --workdir /data \ + --env XDG_CACHE_HOME=/tmp \ + --entrypoint latexmk \ + openjournals/inara \ + -xelatex -interaction=nonstopmode -halt-on-error paper.preprint.tex From 5b59cd76b343b896ef4eaa113bbedc4276167198 Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 29 Oct 2026 11:33:58 +0100 Subject: [PATCH 18/19] JOSS: tweaks to text --- joss_paper/paper.bib | 5 +++-- joss_paper/paper.md | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/joss_paper/paper.bib b/joss_paper/paper.bib index 5fd0ea2c..ae71bb4f 100644 --- a/joss_paper/paper.bib +++ b/joss_paper/paper.bib @@ -91,7 +91,7 @@ @article{williams2026accelerated primaryClass = "hep-ex", reportNumber = "LIGO-P2500623", doi = "10.1103/5hvn-3lmh", - journal = "Phys. Rev. Lett.", + journal = "Physical Review Letters", volume = "137", number = "2", pages = "021410", @@ -131,7 +131,8 @@ @article{dau2022wastefree @misc{williams2026inprep, author = {Williams, Michael J. and Chapman-Bird, Christian E. A. and Costa Barroso, Raissa and Harry, Ian}, - title = {In Preparation}, + title = {Robust {Bayesian} inference for massive black hole binaries in {LISA} with sequential {Monte Carlo}}, + howpublished = {Manuscript in preparation (provisional title)}, year = {2026} } diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 3567c590..995b7f4c 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -30,14 +30,14 @@ abstract: | Sequential Monte Carlo (SMC) methods are a flexible family of algorithms for approximating sequences of probability distributions using a population of weighted samples, known as particles [@delmoral2006smc; @chopin2020introduction]. -Such sequences arise naturally in applications including Bayesian inference, +Such sequences arise naturally in applications including Bayesian inference and particle filtering, for example through likelihood tempering or observations arriving over time. `sequince` [@sequince] is a Python toolkit for constructing SMC methods from reusable and extensible components. This paper describes `sequince` v0.1.0. The toolkit provides abstractions for defining sequences of target distributions and for composing the operations used to evolve a particle population between them. -These include weighting, resampling, mutation, transformation, and control steps. +These include weighting, resampling, mutation, and control steps. It is designed for researchers developing new SMC methods or adapting existing methods to scientific applications, including astrophysical inference, with checkpointing to support long-running analyses. Its core components follow the Python Array API standard, supporting NumPy, JAX, PyTorch, and CuPy arrays and enabling compatible workflows to run on CPUs or GPUs. # Statement of need @@ -54,7 +54,7 @@ The Python ecosystem already contains several useful SMC-related tools. The `par Broader Bayesian software ecosystems also expose SMC functionality. `PyMC` includes a sequential Monte Carlo sampler within a general probabilistic programming framework [@abrilpla2023pymc], while `BlackJAX` provides composable inference components in the JAX ecosystem and includes SMC methods alongside other Monte Carlo algorithms [@cabezas2024blackjax]. Recent domain-specific frameworks such as SHARPy target gravitational-wave inference with JAX-accelerated SMC and gradient-based mutation kernels [@demasi2026sharpy]. -`sequince` combines support for multiple SMC variants, including tempering, persistent sampling [@karamanis2025persistent], nested sampling via SMC (NS-SMC) [@salomone2025unbiased], and waste-free SMC [@dau2022wastefree], with a modular architecture for constructing bespoke algorithms. Shared interfaces allow users to reconfigure target sequences, transformations, mutation kernels, and control flow, supporting both the comparison of existing methods and the development of new variants. Support for multiple array backends and integrations with different sampling ecosystems further enable these components to be reused across scientific applications and numerical libraries. This combination makes `sequince` useful as research infrastructure for methodological work and as a foundation for application-specific downstream packages. +`sequince` combines support for multiple SMC variants, including tempering, persistent sampling [@karamanis2025persistent], nested sampling via SMC (NS-SMC) [@salomone2025unbiased], and waste-free SMC [@dau2022wastefree], with a modular architecture for constructing bespoke algorithms. Shared interfaces allow users to reconfigure target sequences, transformations, mutation kernels, and control flow, supporting both the comparison of existing methods and the development of new variants. Support for multiple array backends and integrations with different sampling ecosystems further enable these components to be reused across scientific applications and numerical libraries. The need to combine configurable target sequences, independently reusable steps, and multiple array backends within one framework motivated this design. This combination makes `sequince` useful as research infrastructure for methodological work and as a foundation for application-specific downstream packages. # Software design @@ -70,7 +70,7 @@ A `SequentialMonteCarlo` runner repeatedly applies the configured steps. The run Each step can return structured outputs containing quantities such as effective sample sizes, tempering parameters, acceptance statistics, and other diagnostics. These outputs and the recorded particle states are collected in an `SMCResult` for subsequent analysis. New components can therefore introduce diagnostics without requiring changes to the runner or coupling their implementation to plotting and logging code. Callbacks provide logging, plotting, and other monitoring functionality during execution. -The core abstractions follow the Python Array API standard where possible [@python_array_api], allowing backend-native arrays to pass through the SMC procedure. Random number generation is similarly abstracted through `orng` [@orng]. This design supports reuse across numerical libraries while allowing specialised components to depend on a particular ecosystem. Alongside conventional eager execution, `sequince` provides a functional execution path that passes random state explicitly between steps. Compatible iterations can be compiled using facilities such as `jax.jit`, while the runner manages observations, callbacks, and result recording. Mutation integrations include ecosystem-specific packages such as `BlackJAX` [@cabezas2024blackjax]. +The core abstractions follow the Python Array API standard where possible [@python_array_api], allowing backend-native arrays to pass through the SMC procedure. Random number generation is similarly abstracted through `orng` [@orng]. This design supports reuse across numerical libraries while allowing specialised components to depend on a particular ecosystem. Alongside conventional eager execution, `sequince` provides a functional execution path that passes random state explicitly between steps. Compatible iterations can be compiled using facilities such as `jax.jit`, provided their operations are traceable and their state structures, shapes, and dtypes remain stable, while the runner manages observations, callbacks, and result recording. Mutation integrations include ecosystem-specific packages such as `BlackJAX` [@cabezas2024blackjax]. Checkpointing is separate from result recording. Checkpoints capture the particle state, runtime progress, random-number state, and mutable step state needed to continue sampling with a reconstructed sampler configuration. Results provide the analysis record of a completed or partially completed run. Both support HDF5 storage, making numerical data and supported metadata available for inspection independently of the running process. @@ -107,12 +107,12 @@ workflows and more specialised uses of the package [@sequince_examples], with # AI usage disclosure -Generative AI tools, including OpenAI Codex and GitHub Copilot, were used to assist with code implementation and refactoring. ChatGPT was also used to assist with the organisation and editing of the manuscript. The authors made the core scientific and software design decisions and reviewed, edited, and validated all AI-assisted contributions. The authors retain full responsibility for the software and manuscript. +Generative AI tools, including OpenAI Codex, were used to assist with code implementation and refactoring. ChatGPT was also used to assist with the organisation and editing of the manuscript. Models varied over the course of development and included GPT-5.3, GPT-5.4, GPT-5.6, GPT-6.0, and GPT-6.1; a complete historical record of model versions was not retained. The authors made the core scientific and software design decisions and reviewed, edited, and validated all AI-assisted contributions. The authors retain full responsibility for the software and manuscript. # Acknowledgements -M.J.W. acknowledges partial support from the UKSA's LISA Ground Segment (UKRI968) and Science and Technology Facilities Council (STFC) grant UKRI2490 -C.E.A.C-B. is supported by UKSA Space Agency grant UKRI971. +M.J.W. acknowledges partial support from the UKSA's LISA Ground Segment (UKRI968) and Science and Technology Facilities Council (STFC) grant UKRI2490. +C.E.A.C-B. is supported by UKSA grant UKRI971. Numerical computations were carried out on the SCIAMA high-performance computing cluster, which is supported by the Institute of Cosmology and From 1052ac1fdb33319d479831558f898ce65ef9509c Mon Sep 17 00:00:00 2001 From: "Michael J. Williams" Date: Thu, 29 Oct 2026 11:50:10 +0100 Subject: [PATCH 19/19] JOSS: remder sequince with texttt in abstract --- joss_paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joss_paper/paper.md b/joss_paper/paper.md index 995b7f4c..3ba9f888 100644 --- a/joss_paper/paper.md +++ b/joss_paper/paper.md @@ -22,7 +22,7 @@ affiliations: date: '\today' bibliography: paper.bib 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. + 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. --- # Summary