# Distributional Sensitivity Analysis: Enabling Differentiability in Sample-Based Inference

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

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 30 references that are in the map.
- First posted on arXiv 12 Aug 2025.

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

- [Auto-Encoding Variational Bayes](https://mlsanity.com/paper/1312.6114/) (2013)
- [Normalizing Flows for Probabilistic Modeling and Inference](https://mlsanity.com/paper/1912.02762/) (2019)
- [The frontier of simulation-based inference](https://mlsanity.com/paper/1911.01429/) (2019)
- [Black Box Variational Inference](https://mlsanity.com/paper/1401.0118/) (2013)
- [Monte Carlo Gradient Estimation in Machine Learning](https://mlsanity.com/paper/1906.10652/) (2019)
- [Gradient Estimation Using Stochastic Computation Graphs](https://mlsanity.com/paper/1506.05254/) (2015)
- [Implicit Reparameterization Gradients](https://mlsanity.com/paper/1805.08498/) (2018)
- [Automated Variational Inference in Probabilistic Programming](https://mlsanity.com/paper/1301.1299/) (2013)
- [Reparameterization Gradients through Acceptance-Rejection Sampling Algorithms](https://mlsanity.com/paper/1610.05683/) (2016)
- [Adversarial Variational Optimization of Non-Differentiable Simulators](https://mlsanity.com/paper/1707.07113/) (2017)
- [Unifying Simulation and Inference with Normalizing Flows](https://mlsanity.com/paper/2404.18992/) (2024)
- [Statistical Treatment of Inverse Problems Constrained by Differential Equations-Based Models with Stochastic Terms](https://mlsanity.com/paper/1810.08557/) (2018)

## Abstract (arXiv)

This work introduces a mathematical framework for estimating the space-parameter sensitivity of random samples in arbitrary dimensions. Such sensitivity effectively acts as gradients of random samples with respect to distributional parameters, which are essential in sample-based inverse problems in nuclear physics, such as inferring quantum correlation functions. We present two analytical formulae for sensitivity and gradient estimation. The first interprets sensitivity as the partial derivatives of the inverse mapping of 1-D conditional distributions. The second, suited for optimization methods that tolerate inexact gradients, applies a diagonal approximation that reduces computational cost with minimal accuracy loss. When closed forms are unavailable, four second-order numerical algorithms are provided to approximate both expressions. Verification and validation studies confirm the correctness of these algorithms and the effectiveness of the proposed formulae. A nuclear physics application demonstrates how the framework enables uncertainty quantification and parameter inference for quantum correlation functions. Unlike existing approaches, our method requires neither model fitting nor knowledge of sampling algorithms or high-dimensional integrals, making it suitable for black-box or simulation-based samplers. Moreover, it renders arbitrary sampling subroutines differentiable, facilitating integration into deep learning and automatic differentiation frameworks. Algorithmic details and open-source implementations are provided to ensure reproducibility and promote further development.
