# L-C2ST: Local Diagnostics for Posterior Approximations in Simulation-Based Inference

arXiv: https://arxiv.org/abs/2306.03580 · HTML: https://mlsanity.com/paper/2306.03580/

## Key facts

- Cited by 18 papers in the map (data through 14 Oct 2026).
- Builds on 27 of its 49 references that are in the map.
- First posted on arXiv 6 Jun 2023.

## Builds on (most cited first, 27 of 27)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Generative Adversarial Networks](https://mlsanity.com/paper/2203.00667/) (2022)
- [Variational Inference with Normalizing Flows](https://mlsanity.com/paper/1505.05770/) (2015)
- [Normalizing Flows for Probabilistic Modeling and Inference](https://mlsanity.com/paper/1912.02762/) (2019)
- [Masked Autoregressive Flow for Density Estimation](https://mlsanity.com/paper/1705.07057/) (2017)
- [Neural Spline Flows](https://mlsanity.com/paper/1906.04032/) (2019)
- [The frontier of simulation-based inference](https://mlsanity.com/paper/1911.01429/) (2019)
- [Revisiting Classifier Two-Sample Tests](https://mlsanity.com/paper/1610.06545/) (2016)
- [Sequential Neural Likelihood: Fast Likelihood-free Inference with Autoregressive Flows](https://mlsanity.com/paper/1805.07226/) (2018)
- [Automatic Posterior Transformation for Likelihood-Free Inference](https://mlsanity.com/paper/1905.07488/) (2019)
- [Benchmarking Simulation-Based Inference](https://mlsanity.com/paper/2101.04653/) (2021)
- [Validating Bayesian Inference Algorithms with Simulation-Based Calibration](https://mlsanity.com/paper/1804.06788/) (2018)
- [Real-time gravitational-wave science with neural posterior estimation](https://mlsanity.com/paper/2106.12594/) (2021)
- [Robust Neural Posterior Estimation and Statistical Model Criticism](https://mlsanity.com/paper/2210.06564/) (2022)
- [Diagnostics for Conditional Density Models and Bayesian Inference Algorithms](https://mlsanity.com/paper/2102.10473/) (2021)
- [Towards Reliable Simulation-Based Inference with Balanced Neural Ratio Estimation](https://mlsanity.com/paper/2208.13624/) (2022)
- [A Large-Scale Study of Probabilistic Calibration in Neural Network Regression](https://mlsanity.com/paper/2306.02738/) (2023)
- [HNPE: Leveraging Global Parameters for Neural Posterior Estimation](https://mlsanity.com/paper/2102.06477/) (2021)
- [Simulation-Based Calibration Checking for Bayesian Computation: The Choice of Test Quantities Shapes Sensitivity](https://mlsanity.com/paper/2211.02383/) (2022)
- [Confidence Sets and Hypothesis Testing in a Likelihood-Free Inference Setting](https://mlsanity.com/paper/2002.10399/) (2020)
- [Group equivariant neural posterior estimation](https://mlsanity.com/paper/2111.13139/) (2021)
- [Global and Local Two-Sample Tests via Regression](https://mlsanity.com/paper/1812.08927/) (2018)
- [Robust Simulation-Based Inference in Cosmology with Bayesian Neural Networks](https://mlsanity.com/paper/2207.08435/) (2022)
- [E-Valuating Classifier Two-Sample Tests](https://mlsanity.com/paper/2210.13027/) (2022)
- [Validation Diagnostics for SBI algorithms based on Normalizing Flows](https://mlsanity.com/paper/2211.09602/) (2022)
- [Inverting brain grey matter models with likelihood-free inference: a tool for trustable cytoarchitecture measurements](https://mlsanity.com/paper/2111.08693/) (2021)
- [Discriminative calibration: Check Bayesian computation from simulations and flexible classifier](https://mlsanity.com/paper/2305.14593/) (2023)

## Built on by (most cited first, 18 of 18)

- [Simulation-Based Inference: A Practical Guide](https://mlsanity.com/paper/2508.12939/) (2025)
- [sbi reloaded: a toolkit for simulation-based inference workflows](https://mlsanity.com/paper/2411.17337/) (2024)
- [Diffusion posterior sampling for simulation-based inference in tall data settings](https://mlsanity.com/paper/2404.07593/) (2024)
- [Simulation-based Inference for High-dimensional Data using Surjective Sequential Neural Likelihood Estimation](https://mlsanity.com/paper/2308.01054/) (2023)
- [A Kernel-Based Conditional Two-Sample Test Using Nearest Neighbors (with Applications to Calibration, Regression Curves, and Simulation-Based Inference)](https://mlsanity.com/paper/2407.16550/) (2024)
- [Simulation-based Inference with the Python Package sbijax](https://mlsanity.com/paper/2409.19435/) (2024)
- [CP4SBI: Local Conformal Calibration of Credible Sets in Simulation-Based Inference](https://mlsanity.com/paper/2508.17077/) (2025)
- [Amortized Bayesian Workflow](https://mlsanity.com/paper/2409.04332/) (2024)
- [Optimizing Likelihoods via Mutual Information: Bridging Simulation-Based Inference and Bayesian Optimal Experimental Design](https://mlsanity.com/paper/2502.08004/) (2025)
- [Predictive posterior sampling from non-stationnary Gaussian process priors via Diffusion models with application to climate data](https://mlsanity.com/paper/2505.24556/) (2025)
- [Predict-Project-Renoise: Sampling Diffusion Models under Hard Constraints](https://mlsanity.com/paper/2601.21033/) (2026)
- [VeriFlow: Modeling Distributions for Neural Network Verification](https://mlsanity.com/paper/2406.14265/) (2024)
- [Trustworthy scientific inference with generative models](https://mlsanity.com/paper/2508.02602/) (2025)
- [Tokenised Flow Matching for Hierarchical Simulation Based Inference](https://mlsanity.com/paper/2604.20723/) (2026)
- [An Introduction to Bayesian and Frequentist Simulation-Based Inference with Machine Learning](https://mlsanity.com/paper/2607.21702/) (2026)
- [Overcoming Selection Bias in Statistical Studies With Amortized Bayesian Inference](https://mlsanity.com/paper/2604.18319/) (2026)
- [GenSBI: Generative Methods for Simulation-Based Inference in JAX](https://mlsanity.com/paper/2605.27499/) (2026)
- [FUSE: FK-Steered Multi-Modal Flow Matching for Efficient Simulation-Based Posterior Estimation](https://mlsanity.com/paper/2607.05252/) (2026)

## Abstract (arXiv)

Many recent works in simulation-based inference (SBI) rely on deep generative models to approximate complex, high-dimensional posterior distributions. However, evaluating whether or not these approximations can be trusted remains a challenge. Most approaches evaluate the posterior estimator only in expectation over the observation space. This limits their interpretability and is not sufficient to identify for which observations the approximation can be trusted or should be improved. Building upon the well-known classifier two-sample test (C2ST), we introduce L-C2ST, a new method that allows for a local evaluation of the posterior estimator at any given observation. It offers theoretically grounded and easy to interpret -- e.g. graphical -- diagnostics, and unlike C2ST, does not require access to samples from the true posterior. In the case of normalizing flow-based posterior estimators, L-C2ST can be specialized to offer better statistical power, while being computationally more efficient. On standard SBI benchmarks, L-C2ST provides comparable results to C2ST and outperforms alternative local approaches such as coverage tests based on highest predictive density (HPD). We further highlight the importance of local evaluation and the benefit of interpretability of L-C2ST on a challenging application from computational neuroscience.
