Automatically adapting the number of state particles in SMC$^2$

Imke Botha, Robert Kohn, Leah F. South, Christopher Drovandi · DOI

Introduction

State-space models (SSMs) are fundamental tools in engineering, ecology, and finance, used to track latent processes through noisy observations. However, performing Bayesian inference on these models is often challenging because the likelihood function—the probability of observing data given specific parameters—is frequently intractable. Sequential Monte Carlo squared ($SMC^2$) methods address this by using a nested approach: an outer particle filter tracks the model parameters, while an inner particle filter estimates the likelihood for each parameter particle.

The efficiency of $SMC^2$ is highly sensitive to the number of state particles ($N_x$) used in the inner filter. This creates a "Goldilocks" problem: too few particles result in a noisy likelihood estimate that causes the algorithm to stall, while too many particles lead to prohibitive computational costs. Traditionally, $N_x$ required manual tuning through trial and error. This paper introduces a fully automated framework to adaptively select $N_x$ on the fly, optimizing the balance between statistical precision and computational effort.

The Adaptive Framework

The authors propose a three-stage automated process to manage the number of state particles during the execution of the $SMC^2$ algorithm.

1. Triggering: When to Adapt

Instead of relying on simple acceptance rates—which can be misleading if an algorithm makes many tiny, insignificant moves—the framework uses the Expected Squared Jumping Distance (ESJD). ESJD measures both the frequency and the distance of particle movements in the parameter space. By monitoring ESJD, the algorithm can detect when the "heartbeat" of the inference process is slowing down due to excessive noise in the likelihood estimates, triggering an update to $N_x$.

2. Selection: Choosing the Optimal $N_x$

Two strategies are introduced to determine the new particle count:

  • novel-var: This method scales $N_x$ based on a target variance for the log-likelihood estimate. It tests a range of values to find the minimum $N_x$ that meets a specific noise threshold.
  • novel-esjd: A more sophisticated "cost-benefit" approach. It evaluates different $N_x$ values and selects the one that maximizes the ESJD relative to the computational cost. This strategy acknowledges that a slightly noisier (but faster) likelihood estimate is often preferable to a perfect (but slow) one.

3. Updating: The REPLACE Method

Increasing $N_x$ requires replacing the current set of noisy state particles with a larger, more accurate set. Previous techniques like REINIT or REWEIGHT often led to numerical instability or "weight collapse," where a single particle dominates the entire distribution. The authors introduce the REPLACE method, which leverages a modified exchange importance sampling trick. This ensures that when $N_x$ is updated, the weights of the parameter particles remain perfectly balanced (incremental weight = 1), maintaining the stability of the overall filter.

Experimental Evaluation

The methodology was tested against four challenging benchmarks:

  1. Brownian Motion Model: A basic stochastic differential equation.
  2. Stochastic Volatility (SV) Model: A standard for financial econometrics.
  3. Theta-logistic Model: Used for modeling population dynamics (e.g., female nutria).
  4. Noisy Ricker Model: An ecological model known for its extreme multimodality and difficulty in likelihood estimation.

Key Insights and Results

The automated methods, particularly novel-esjd, demonstrated significant improvements over existing techniques. In the Brownian motion and SV models, the adaptive algorithm outperformed the "Gold Standard"—a version of $SMC^2$ where $N_x$ was manually pre-tuned to its theoretical optimum.

Key findings include:

  • Consistency: The novel-esjd approach was the most robust across different models and initial conditions, successfully navigating the trade-off between speed and accuracy.
  • Reliability: The REPLACE method proved more stable than the REINIT scheme proposed in earlier literature, which frequently failed to converge on complex models like the Noisy Ricker.
  • Metric Superiority: The study confirms that ESJD is a superior metric for adaptation compared to acceptance rates, as it better reflects the actual progress of the Markov chain Monte Carlo (MCMC) mutation steps.

Conclusion and Future Work

By automating the selection of $N_x$, this research removes a significant barrier to the practical application of $SMC^2$. The resulting "set-and-forget" algorithm is both more efficient and more accessible to researchers who may not have the expertise to tune these complex models manually.

While the algorithm is highly effective, the authors note that extremely multimodal models (like the low-noise Ricker) still pose challenges for capturing the full posterior distribution. Future work may explore extending these adaptive techniques to mixed-effects models, where the number of state particles might need to vary across different subjects within a single study.

Code for the implementation is available at https://github.com/imkebotha/adaptive-exact-approximate-smc.

Summary updated

BibTeX
@article{botha2023automatically,
  author = {Imke Botha and Robert Kohn and Leah F. South and Christopher Drovandi},
  title = {{Automatically adapting the number of state particles in SMC$^2$}},
  journal = {Stat. Comput.},
  year = {2023},
  doi = {10.1007/s11222-023-10250-2},
}
Figure