Sequential Neural Score Estimation: Likelihood-Free Inference with Conditional Score Based Diffusion Models

Louis Sharrock, Jack Simons, Song Liu, Mark Beaumont

Introduction

In many scientific fields—from neuroscience to cosmology—researchers use complex stochastic simulators to model phenomena. While these simulators can generate synthetic data $x$ given parameters $\theta$, they rarely provide a tractable likelihood function $p(x|\theta)$. This makes standard Bayesian inference (finding the posterior $p(\theta|x)$) nearly impossible.

The field of Simulation-Based Inference (SBI) aims to solve this. Current state-of-the-art methods often rely on Normalizing Flows (like SNPE). However, normalizing flows come with strict architectural constraints: they must be bijective and have easily computable Jacobians. Diffusion models (or score-based generative models) have recently revolutionized image generation because they lack these restrictions, offering much greater flexibility. This paper introduces Sequential Neural Posterior Score Estimation (SNPSE), a new framework that adapts these flexible diffusion models into a sequential inference procedure that can efficiently zoom in on the parameters most likely to have produced a specific observation.

Methods: Neural Posterior Score Estimation

The authors propose Neural Posterior Score Estimation (NPSE) and its sequential counterpart, SNPSE.

  1. Core Model: Instead of learning a density directly, they train a neural network to estimate the score function $\nabla_\theta \log p_t(\theta_t|x)$ of a noise-perturbed version of the posterior. This is done using a conditional denoising score matching objective.
  2. TSNPSE (Truncated SNPSE): This is the authors' preferred sequential variant. In each round of training, the algorithm approximates the current posterior, defines a "truncated" proposal prior that focuses only on the high-probability regions of that posterior, and runs new simulations using parameters drawn from this focused region. The "Truncated" approach is particularly clever because it avoids the need for complex importance-weighting corrections that other sequential methods require.
  3. Inference: Once trained, samples from the posterior are generated by solving a "probability flow" ODE or a reverse-time SDE, starting from a simple Gaussian distribution and "denoising" it into the posterior distribution.
Forward and backward diffusion processes for posterior estimation.

Key Insights and Ideas

  • Architectural Freedom: Because score-based models don't need to be bijective, they can use standard, powerful MLP architectures that are easier to train and more expressive than the restricted layers required by normalizing flows.
  • Scaling to High Dimensions: The results suggest that score-based methods are more robust as the dimensionality of the parameter space increases.
  • SDE Choice Matters: The authors found that Variance-Exploding (VE) SDEs generally perform better for low-dimensional experiments, while Variance-Preserving (VP) SDEs are superior for high-dimensional tasks.
  • The Truncation Advantage: By using truncated proposals, the authors proved that the loss function remains minimized at the true posterior score, effectively bypassing the "proposal bias" that plagues other sequential SBI methods.

Experimental Results

The authors evaluated their method on two main fronts:

  • sbibm Benchmarks: A suite of eight standard SBI tasks including Two Moons, SLCP, Lotka-Volterra, and SIR. These range from simple 2D problems to complex, multi-modal, and high-dimensional distributions.
  • Real-world Neuroscience Problem: Inference for a 31-parameter model of the pyloric network in the stomatogastric ganglion of the crab Cancer borealis. This is a notoriously difficult "black-box" simulator.
Performance comparison of NPSE variants against NPE across various sbibm benchmark tasks.

Benchmark Superiority: SNPSE matched or outperformed state-of-the-art methods across the sbibm suite. It showed particularly strong gains in the most challenging tasks, such as SLCP and Lotka-Volterra.

Neuroscience Success: In the crab pyloric network task, SNPSE achieved 81% valid summary statistics in the final round, significantly higher than the percentages achieved by other methods for the same simulation budget.

Robustness: The method performed well across different simulation budgets (from 1,000 to 100,000 simulations) without requiring extensive per-task hyperparameter tuning.

Limitations and Future Work

  • Computational Overhead: The main drawback is the cost of evaluating the posterior density. In a score-based model, it requires solving an ODE, which involves multiple neural network evaluations.
  • Energy-Based Parameterization: The authors suggest that using an energy-based parameterization (modeling the scalar energy rather than the vector score) could drastically reduce the cost of the truncation step.
  • Flow Matching: A promising future direction is extending this sequential framework to Flow Matching (FMPE), a related class of generative models that can be faster to train and sample from than traditional diffusion.

Summary updated

BibTeX
@inproceedings{sharrock2024sequential,
  author = {Louis Sharrock and Jack Simons and Song Liu and Mark Beaumont},
  title = {{Sequential Neural Score Estimation: Likelihood-Free Inference with Conditional Score Based Diffusion Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=8viuf9PdzU},
}
Figure