Bayesian inference via rejection filtering

Nathan Wiebe, Christopher E. Granade, Ashish Kapoor, Krysta M. SvorearXiv 2015

Introduction

Bayesian inference provides a robust framework for updating beliefs in the face of new evidence. In high-dimensional dynamic systems, Sequential Monte Carlo (SMC) methods, or particle filters, are widely used. However, these methods suffer from a significant "memory tax," requiring the storage and update of thousands of particles. This overhead is often prohibitive for memory-constrained environments such as embedded systems, cryogenic controllers, or high-speed robotics.

This paper introduces Rejection Filtering (RF), a novel approach that combines the simplicity of rejection sampling with the iterative nature of particle filtering. By representing probability distributions through their first two moments (mean and covariance) rather than a large particle cloud, RF achieves a 100x reduction in memory usage while maintaining high inference accuracy.

The Rejection Filtering Algorithm

Rejection Filtering bridges the gap between sample-based and moment-based estimation through a four-step process:

  1. Rejection Sampling: The algorithm draws samples from a prior distribution and accepts them based on the likelihood of the observed data.
  2. Moment Estimation: Instead of retaining all accepted samples, RF updates running sums for the mean and covariance matrix. This ensures memory requirements remain constant relative to the number of samples processed.
  3. Iterative Resampling: The calculated moments define a new Gaussian distribution, which serves as the prior for subsequent data chunks.
  4. Robustness to Bounds: Standard rejection sampling requires a strict upper bound on the likelihood ($\kappa_E$). The authors demonstrate that even with an approximate or "guessed" bound, the resulting posterior errors remain bounded, enhancing the algorithm's practical utility.

Experimental Evaluation

The performance of RF was evaluated on two distinct tasks: frequency tracking of a quantum oscillator and binary classification of MNIST handwritten digits.

Frequency Tracking

In the synthetic frequency estimation task, the goal was to track the time-dependent frequency of an oscillator following a normal random walk. RF demonstrated the ability to saturate the Bayesian Cramér–Rao bound—the theoretical limit for tracking accuracy—using as few as 100 sampling attempts per update.

Convergence of the median square error for different numbers of sampling attempts (m). The filter approaches the RMS error floor as the number of experiments increases.

MNIST Classification and Feature Selection

For the MNIST benchmark, RF was applied to binary classification tasks (e.g., "even vs. odd"). In an active learning setting, the filter identifies which pixels are most informative for the decision. This process leads to implicit feature selection, where the algorithm naturally focuses on high-variance pixels.

Visualization of the filter's belief and feature selection during MNIST digit classification. The heatmaps illustrate how the algorithm focuses on specific regions of the digit to improve classification accuracy.

Key Insights and Results

  • Memory Efficiency: RF's memory footprint scales with the square of the feature dimensions ($O(dim(x)^2)$) but is independent of the number of samples. This allowed the oscillator tracking task to run on less than 1 kilobit of memory.
  • Parallelizability: The independent nature of rejection sampling trials allows the update step to be distributed across multiple low-power processing cores.
  • Performance: On the MNIST "even vs odd" task, RF outperformed standard k-Nearest Neighbors (kNN) in regimes where pixel queries were limited.
  • Stability: While low-likelihood events can occasionally destabilize the filter, the authors found that "random restarts" effectively mitigate this issue, ensuring long-term tracking stability.

Conclusion and Future Work

Rejection Filtering offers a memory-efficient alternative to traditional particle filters, making real-time Bayesian inference feasible on embedded hardware. While currently reliant on a Gaussian assumption for the posterior, future work could integrate more advanced resampling techniques, such as unscented transformations, to handle highly non-Gaussian or multi-modal distributions. The theoretical robustness to imperfect likelihood bounds further paves the way for its application in complex, real-world sensing environments.

Summary updated

BibTeX
@misc{wiebe2015bayesian,
  author = {Nathan Wiebe and Christopher E. Granade and Ashish Kapoor and Krysta M. Svore},
  title = {{Bayesian inference via rejection filtering}},
  year = {2015},
  eprint = {1511.06458},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.06458},
}
Figure