Validation Diagnostics for SBI algorithms based on Normalizing Flows

Julia Linhart, Alexandre Gramfort, Pedro L. C. Rodrigues · DOI

Introduction

Simulation-Based Inference (SBI) is a critical tool in scientific domains where simulators lack tractable likelihood functions. Normalizing Flows (NFs) have become the state-of-the-art for approximating posterior distributions in these contexts. However, validating these high-dimensional, deep-learning-based models remains a challenge. Traditional methods like Simulation-Based Calibration (SBC) are often insufficient as they are univariate and global, potentially missing local inaccuracies or complex parameter correlations. This paper introduces a multivariate diagnostic framework that provides theoretical guarantees of local consistency and interpretable visual tools.

Methodology

The proposed framework leverages the architecture of Normalizing Flows to establish a more rigorous validation process.

  1. Multivariate PIT: By mapping complex data to a simple base distribution (e.g., Gaussian), the authors show that for a perfectly accurate model, the transformed variables must be mutually independent and uniformly distributed. This defines a "necessary and sufficient" condition for model consistency.
  2. Local Coverage Tests (LCT): Utilizing a regression-based approach, the framework evaluates model performance at specific points in the data space ($x$-space), moving beyond global averages to identify localized failure modes.
  3. Visual Diagnostics: The framework generates PP-plots and histograms to visually diagnose biases, over-confidence, or under-confidence in the posterior estimates.

Experimental Evaluation

The method was tested on the Jansen and Rit neural mass model (JRNMM), a standard in computational neuroscience for simulating EEG signals. A Masked Autoregressive Flow (MAF) was trained on 50,000 simulations to estimate four parameters from 1024-dimensional time-series data.

Results and Discussion

Global Consistency

The authors demonstrate that standard SBC can fail to reject inconsistent models. In contrast, the multivariate PIT test successfully identifies these discrepancies.

Global PIT vs. SBC comparison showing PIT's superior sensitivity to model inconsistency.

Local Consistency and Interpretability

Local analysis revealed that the estimator's performance varies significantly across the parameter space. Specifically, for the JRNMM, inaccuracies were most prominent at the extremes of the "gain" parameter ($g$). Local PP-plots for $g_0 = -20$ and $g_0 = 20$ exhibited characteristic "U-shapes," signaling a failure to capture the true dispersion of parameters, whereas the model appeared consistent at $g_0 = 0$.

Local diagnostics identifying model failure at parameter extremes.

Conclusion

This work transitions SBI validation from empirical heuristics to theoretical guarantees. By providing a workflow that combines global and local consistency checks, researchers can now identify specific "blind spots" in their models. Future work will focus on optimizing the computational overhead of local tests and refining practical implementations for mutual independence checks in high-dimensional settings.

Summary updated

BibTeX
@misc{linhart2022validation,
  author = {Julia Linhart and Alexandre Gramfort and Pedro L. C. Rodrigues},
  title = {{Validation Diagnostics for SBI algorithms based on Normalizing Flows}},
  year = {2022},
  eprint = {2211.09602},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.09602},
}
Figure