NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

To discretize continually: Mean shift interacting particle systems for Bayesian inference

Ayoub Belhadji, Daniel Sharp, Youssef MarzoukNeurIPS 2026

TL;DR

Bayesian inference requires integrating over complex, unnormalized probability landscapes, where standard sampling algorithms often get trapped in single peaks or struggle with stretched geometries. This paper introduces a clever mathematical workaround to minimize Maximum Mean Discrepancy (MMD)—a famously tricky distance metric in this setting—by evolving a small, weighted swarm of particles. The result is an adaptable, fast-converging family of algorithms (both gradient-based and gradient-free) that resists mode collapse and scales gracefully into high dimensions.

What Problem Does This Paper Address?

Picture trying to map a vast, foggy mountain range in the dark. You have an altimeter that tells you the relative height right where you stand, and maybe a compass for the local slope, but you have no idea what the total volume of the mountain range is. In Bayesian inference and computational physics, this is the daily reality of integrating expectations against an unnormalized probability density.

To estimate averages across this landscape, modern approaches deploy "interacting particle systems" like Stein Variational Gradient Descent (SVGD), which march a swarm of points toward high-probability regions while nudging them apart so they don't clump together. Almost all of these methods rely on minimizing the Kullback–Leibler (KL) divergence because its math conveniently cancels out that unknown total volume (the normalizing constant). However, finite particle swarms using uniform weights often suffer from mode collapse—completely missing isolated peaks—and struggle when hills are sharply stretched (anisotropy).

An attractive alternative metric is Maximum Mean Discrepancy (MMD), which compares distributions using smooth kernel functions and naturally handles comparing discrete points to a continuous landscape. Historically, though, minimizing MMD directly has been viewed as a non-starter here because the MMD formula explicitly depends on that elusive normalizing constant.

Methods

Instead of treating every particle equally, the authors frame sampling as building a quadrature rule—a small set of particles where each carries a distinct weight. Building on an algorithm called Mean Shift Interacting Particles (MSIP), previously restricted to empirical datasets, they extend it to continuous, unnormalized densities through three core innovations:

  1. Alternating Optimization: They alternate between solving a linear system to find the optimal weights for the current particle positions, and taking a damped fixed-point step to shift the particles toward better configurations.
  2. Taming Matrix Inversions with Regularization: Computing optimal weights requires inverting a kernel matrix, which becomes numerically unstable when particles drift close together. Adding a small penalty $\lambda$ stabilizes the matrix inversion. Crucially, the authors prove this isn't just a numerical hack—it corresponds to exact preconditioned gradient descent on a penalized MMD objective.
  3. Inner Quadrature Estimators: Moving particles requires knowing local kernel-smoothed averages of the target density (the kernel mean embedding and first moment). By using a squared exponential (Gaussian) kernel, these intractable integrals transform into expectations against a standard Gaussian. The authors approximate these using an "inner quadrature rule," unlocking both gradient-free (MSIP-GF) and gradient-informed (Stein/score-based, like MSIP-GI and the 1-point Fredholm estimator MSIP-F) implementations.
Figure 1: Example of our methods, with color indicating particle weight. (Left): Particle initialization far from support. (Middle left): Result of SVGD with 100 target gradient evaluations per particle. (Middle right): Our gradient-informed method with 100 target gradient evaluations per particle. (Right): Our gradient-free method with 500 target density evaluations per particle.

Datasets

Because this is a sampling and integration paper rather than a model-training paper, "datasets" take the form of synthetic probability geometries and real-world Bayesian posterior targets (with no newly invented benchmarks introduced):

  • Synthetic Landscapes: Multi-modal Gaussian Mixture Models (2D to 20D), highly stretched Funnel distributions (2D to 50D), heavy-tailed/curved Joker (2D), and multi-modal Himmelblau (2D) distributions.
  • Real-World Posteriors: Bayesian hierarchical models (Schools10, 10D), epidemiological models (COVID51, 51D), logistic regression (CovType56, 56D), PDE-constrained inverse problems (ABPDE64, 64D), and a Bayesian neural network classifier (TwoMoons201, 201D).

Key Insights and Ideas

  • Canceling the Unknowable: Even though the MMD objective itself depends on the unknown normalizing constant, the MSIP update map divides by the optimal particle weights. Because both the numerator and the weights scale linearly with the normalizing constant, it cancels out completely!
  • Inverse Weight Dynamics: Unlike importance sampling or Consensus-Based Sampling (CBS) where particle movement scales linearly with weights, MSIP dynamics are inversely proportional to a particle's kernel-optimal weight. This preconditioning aggressively propels low-weight stragglers toward unexplored territory.
  • Looking Beyond Local Slopes: Standard score-based methods only feel the gradient right beneath their feet. MSIP’s inner quadrature probes a small Gaussian neighborhood around each particle, gathering non-local geometry—and because these inner probes are independent, modern GPU vectorization (vmap in JAX/PyTorch) makes evaluating them nearly as fast as single-point methods.

Key Results

Across both synthetic and real-world tasks, MSIP variants consistently match or outperform SVGD, affine-invariant Langevin dynamics (ALDI), and CBS.

On a 5-mode anisotropic Gaussian mixture, SVGD and ALDI collapse into one mode, while MSIP-Fredholm populates and aligns with all five.
  • Zero Mode Collapse: On a 5-component anisotropic Gaussian mixture, SVGD and ALDI collapse onto a single mode, whereas MSIP-F cleanly populates all five, driving MMD down orders of magnitude faster as particle count grows from $M=5$ to $50$.
  • High-Dimensional & Gradient-Free Strength: On the 50D Funnel benchmark, MSIP-GI-1 achieves a Kernel Stein Discrepancy (KSD) of 46.68, vastly beating SVGD (242.5) while ALDI fails to converge. Remarkably, the gradient-free MSIP-GF scores 47.64, beating gradient-based SVGD without touching a single derivative.
  • Robustness Without Babysitting: On real-world posteriors (Table 2), ALDI and CBS frequently diverge without delicate step-size tuning. On the 201D TwoMoons Bayesian neural network, MSIP-F reaches a negative log-likelihood of 258.60 (KSD 267) and MSIP-GI-1 hits KSD 168, dramatically outpacing SVGD (NLL 13653, KSD 449) at identical per-iteration evaluation budgets.

Limitations and Future Work

  • Theoretical Guarantees: Because optimizing finite particle locations and weights is fundamentally non-convex, the method currently lacks formal convergence rate and approximation guarantees—a primary target for future work.
  • Hyperparameter Selection: Performance relies on choosing the kernel bandwidth $\sigma$, regularization $\lambda$, and the inner quadrature budget $Q$. Developing automated, adaptive strategies to tune these on the fly remains an open direction.

Summary updated

BibTeX
@inproceedings{belhadji2026discretize,
  author = {Ayoub Belhadji and Daniel Sharp and Youssef Marzouk},
  title = {{To discretize continually: Mean shift interacting particle systems for Bayesian inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=UZav7CjTGq},
}

Loading related content...

Figure