NeurIPS2025

CoLT: The conditional localization test for assessing the accuracy of neural posterior estimates

Tianyu Chen, Vansh Bansal, James G. Scott

Abstract

We consider the problem of validating whether a neural posterior estimate q(θx)q(\theta \mid x) is an accurate approximation to the true, unknown true posterior p(θx)p(\theta \mid x). Existing methods for evaluating the quality of an NPE estimate are largely derived from classifier-based tests or divergence measures, but these suffer from several practical drawbacks. As an alternative, we introduce the Conditional Localization Test (CoLT), a principled method designed to detect discrepancies between p(θx)p(\theta \mid x) and q(θx)q(\theta \mid x) across the full range of conditioning inputs. Rather than relying on exhaustive comparisons or density estimation at every xx, CoLT learns a localization function that adaptively selects points θl(x)\theta_l(x) where the neural posterior qq deviates most strongly from the true posterior pp for that xx. This approach is particularly advantageous in typical simulation-based inference settings, where only a single draw θp(θx)\theta \sim p(\theta \mid x) from the true posterior is observed for each conditioning input, but where the neural posterior q(θx)q(\theta \mid x) can be sampled an arbitrary number of times. Our theoretical results establish necessary and sufficient conditions for assessing distributional equality across all xx, offering both rigorous guarantees and practical scalability. Empirically, we demonstrate that CoLT not only performs better than existing methods at comparing pp and qq, but also pinpoints regions of significant divergence, providing actionable insights for model refinement. These properties position CoLT as a state-of-the-art solution for validating neural posterior estimates.