Consistency Models for Scalable and Fast Simulation-Based Inference

Marvin Schmitt, Valentin Pratz, Ullrich Koethe, Paul-Christian Bürkner, Stefan T. Radev

In the world of scientific discovery, we often have a "forward model"—a simulator that tells us what data to expect given certain parameters. But the real challenge is the "inverse problem": given the data we just observed, what were the parameters that created it? This is Simulation-Based Inference (SBI), and a new paper introduces a way to make it significantly faster and more flexible.

The Challenge of Simulation-Based Inference

Scientific simulators are often "black boxes" where the likelihood function is unknown or impossible to calculate. To perform Bayesian inference, researchers use deep generative models to learn the posterior distribution.

Currently, the field is split between two camps:

  1. Normalizing Flows (NPE): These are fast but require "bijective" architectures. This means the math has to be perfectly reversible, strictly limiting how the neural network can be designed.
  2. Diffusion and Flow Matching (FMPE): These are incredibly expressive and can use any unconstrained neural network architecture, but they are slow. They require dozens or hundreds of sequential steps to "denoise" a sample during inference.

In fields like genomics or climate science, researchers might need to run inference on millions of data points. If each one takes seconds to process via diffusion, the pipeline grinds to a halt.

Introducing Consistency Model Posterior Estimation (CMPE)

The authors adapt Consistency Models (CMs) for SBI. Originally designed for image generation, consistency models are trained to map any point along a "probability flow" (the path data takes as it is turned into noise) directly back to the starting point.

CMPE extends this to a conditional setting. By training the model to be "consistent" across the entire diffusion trajectory while conditioned on observed data $x$, the model learns to jump from pure noise to a posterior sample in just one or two steps.

Crucially, because CMPE doesn't require the mathematical constraints of normalizing flows, researchers can use powerful, off-the-shelf architectures like U-Nets for images or Transformers for time-series data without worrying about bijectivity.

Datasets and Visual Benchmarks

The authors evaluated CMPE across a diverse battery of tests, including high-dimensional image denoising (Fashion MNIST), complex scientific simulations (Tumor Spheroid Growth), and astrophysics (Gravitational wave inference).

They also tested the model on standard low-dimensional benchmarks: Gaussian Mixture Models (GMM), the "Two Moons" task, and a 2D robot arm "Inverse Kinematics" problem.

Qualitative comparison on low-dimensional benchmarks

As seen above, CMPE successfully captures complex, multi-modal distributions (like the bimodal GMM and Two Moons) in a fraction of the time required by Flow Matching (FMPE) to achieve similar quality. It also outperforms traditional Normalizing Flows (ACF and NSF), which struggle to cleanly separate the modes.

Key Insights and Performance

  • The "Architecture Agnostic" Advantage: CMPE performs well even with a "naive" MLP architecture where Flow Matching fails. This suggests CMPE is more robust when the "perfect" network design for a problem is unknown.
  • Efficiency in the "Low-Data" Regime: Scientific simulations are often expensive to run. CMPE proved highly competitive even when trained on very small budgets (e.g., only 512 or 1,024 simulations).
  • The U-Shaped Performance Curve: Interestingly, more sampling steps aren't always better. There is a "sweet spot" where accuracy peaks, representing a counter-intuitive departure from standard diffusion models.
Quantitative performance showing the U-shaped curve and low-data efficiency

Overall, CMPE achieved a 50x to 1000x speedup over Flow Matching in high-dimensional tasks while maintaining similar or better sample quality. Furthermore, in the tumor growth model, CMPE provided highly calibrated results, meaning its reported uncertainty accurately matched the true statistical uncertainty of the parameters.

Limitations and Future Work

The authors identify two main hurdles:

  1. Tractable Densities: Unlike Normalizing Flows, CMPE does not naturally provide a "probability density" value for a specific parameter. You can draw samples, but you cannot easily ask the model for the exact likelihood of a specific value. Surrogate density estimators are suggested as a workaround.
  2. Hyperparameter Sensitivity: Consistency training introduces new hyperparameters (like the discretization schedule) that require careful tuning, especially for low-dimensional problems.

Future work will likely focus on pushing CMPE toward reliable "one-step" inference and integrating it into more automated "plug-and-play" workflows for scientists.

Summary updated

BibTeX
@inproceedings{schmitt2024consistency,
  author = {Marvin Schmitt and Valentin Pratz and Ullrich Koethe and Paul-Christian Bürkner and Stefan T. Radev},
  title = {{Consistency Models for Scalable and Fast Simulation-Based Inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=IHjKpKljyH},
}
Figure