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

Diffusion posterior sampling for simulation-based inference in tall data settings

Julia Linhart, Gabriel Cardoso, Alexandre Gramfort, Sylvain Le Corff, Pedro L. C. Rodrigues · DOI

TL;DR

This paper introduces a novel diffusion-based sampling algorithm for simulation-based inference (SBI) in "tall data" settings, where multiple observations are available. Their method significantly speeds up and stabilizes posterior inference compared to existing approaches, making it more practical for complex scientific models.

What Problem Does This Paper Address?

In many scientific fields, we want to understand the parameters of a complex model that best explain observed data. When these models rely on intricate simulators, directly calculating the probability of observing the data given the parameters (the likelihood) is often impossible. This makes traditional statistical inference methods, like Markov Chain Monte Carlo (MCMC), unusable. Simulation-Based Inference (SBI) offers a solution by training deep generative models on simulated data to learn the posterior distribution of parameters.

This paper focuses on a specific challenge within SBI: the "tall data" setting. Here, we have not just one observation, but multiple independent observations of the same phenomenon. Intuitively, more data should lead to a more precise understanding of the model's parameters (sharper posterior distributions). However, existing SBI methods struggle to efficiently leverage this extra information. While some methods can handle tall data by composing information from individual observations, they often rely on computationally expensive and unstable sampling techniques like Langevin dynamics. This paper aims to provide a faster, more stable, and more flexible way to perform inference in these tall data scenarios.

Methods

The core contribution of this paper is a new diffusion posterior sampling algorithm. It builds upon the idea of score-based generative models (SBGMs), which learn to reverse a diffusion process (adding noise) to generate data. Specifically, they adapt Neural Posterior Score Estimation (NPSE), which trains a neural network to estimate the score (gradient of the log probability) of the diffused posterior distribution for a single observation.

The key innovation lies in how they handle the "tall data" posterior. Instead of directly training a model on all observations at once or relying on costly Langevin dynamics, they:

  1. Derive an analytical formula for the score of the diffused tall data posterior: This formula leverages the scores of individual posteriors.
  2. Approximate the backward diffusion process: They use a second-order approximation based on Tweedie's formula to make the computation tractable.
  3. Propose two algorithms (JAC and GAUSS): These algorithms efficiently implement the approximation, allowing the use of deterministic score-based samplers like DDIM. GAUSS, in particular, uses a constant Gaussian approximation for covariance matrices, leading to significant speedups and stability.

This approach avoids the need for Langevin dynamics, which is a major bottleneck in previous methods like F-NPSE.

Datasets

The paper evaluates their methods on:

  • Two Gaussian toy models: These are used to analytically verify the posterior and score functions, allowing for precise evaluation of accuracy and speed.
  • Three SBI benchmark examples: SLCP, Lotka-Volterra, and SIR. These are standard benchmarks in the SBI field, featuring different posterior structures (multimodal, high-dimensional unimodal, smooth unimodal) and requiring learned score models.
  • Jansen and Rit Neural Mass Model (JRNMM): A complex, real-world model from computational neuroscience, used to demonstrate the scalability and practical applicability of their method.

No new datasets were introduced.

Key Insights and Ideas

  • Compositionality is powerful, but needs careful handling: The paper shows that leveraging information from individual observations in a compositional way is key for tall data inference. However, naive composition can lead to error accumulation.
  • Diffusion models offer a flexible framework for SBI: By framing inference as a diffusion process, they can leverage powerful generative modeling techniques.
  • Avoiding Langevin dynamics is crucial for efficiency: The reliance on Langevin dynamics in prior work was a major bottleneck. Their method bypasses this, leading to significant speedups.
  • GAUSS provides a robust and efficient trade-off: While JAC can be highly accurate in noise-free settings, GAUSS offers a better balance of speed, accuracy, and robustness, especially when dealing with learned scores or noisy data.
  • Tall data can reveal hidden dependencies: The JRNMM example demonstrates how aggregating observations can uncover parameter dependencies that are not apparent from single observations alone.

Key Results

  • Significant speedup: Their proposed methods (GAUSS and JAC) are substantially faster than the Langevin-based F-NPSE baseline, with GAUSS being up to 2.5 times faster.
  • Improved accuracy and stability: GAUSS consistently outperforms F-NPSE in terms of accuracy (measured by Sliced Wasserstein distance) and robustness, especially in noisy or high-dimensional settings.
  • Scalability: The method scales well to increasing numbers of observations (n) and demonstrates effectiveness on complex real-world models like the JRNMM.
  • Competitive performance on benchmarks: On standard SBI benchmarks, GAUSS and JAC show superior performance compared to the Langevin baseline across various metrics (sW, MMD, C2ST).
  • JAC's precision in ideal conditions: In noise-free settings with exact scores, JAC achieves highly accurate results, though it can be less stable than GAUSS.

Limitations and Future Work

  • Approximation errors accumulate: The paper acknowledges that approximation errors can accumulate as the number of observations (n) increases, particularly in the compositional step. They suggest exploring partially factorized methods (PF-NPSE) as a potential solution.
  • JAC's stability: While accurate, JAC can be unstable in practice, especially with noisy score estimates. Further research into principled stabilization techniques beyond simple clipping is suggested.
  • Refining approximations: The authors suggest exploring data-driven covariance estimation methods to better approximate local curvature without sacrificing stability.
  • Scaling to thousands of observations: Current methods are limited to hundreds of context observations. Future work aims to scale this to thousands.
  • Hierarchical and structured inference: The framework opens possibilities for modular, hierarchical, and other structured inference tasks.

Summary updated

BibTeX
@misc{linhart2024diffusion,
  author = {Julia Linhart and Gabriel Cardoso and Alexandre Gramfort and Sylvain Le Corff and Pedro L. C. Rodrigues},
  title = {{Diffusion posterior sampling for simulation-based inference in tall data settings}},
  year = {2024},
  eprint = {2404.07593},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.07593},
}
Figure