# The YODO algorithm: An efficient computational framework for sensitivity analysis in Bayesian networks

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

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 13 of its 47 references that are in the map.
- First posted on arXiv 1 Feb 2023.

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

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Automatic differentiation in machine learning: a survey](https://mlsanity.com/paper/1502.05767/) (2015)
- [A Differential Approach to Inference in Bayesian Networks](https://mlsanity.com/paper/1301.3847/) (2013)
- [The R Package stagedtrees for Structural Learning of Stratified Staged Trees](https://mlsanity.com/paper/2004.06459/) (2020)
- [Duality of Graphical Models and Tensor Networks](https://mlsanity.com/paper/1710.01437/) (2017)
- [Sum-product networks: A survey](https://mlsanity.com/paper/2004.01167/) (2020)
- [Sensitivity and robustness analysis in Bayesian networks with the bnmonitor R package](https://mlsanity.com/paper/2107.11785/) (2021)
- [Making Sensitivity Analysis Computationally Efficient](https://mlsanity.com/paper/1301.3868/) (2013)
- [Sensitivity analysis beyond linearity](https://mlsanity.com/paper/1901.02062/) (2018)
- [A geometric characterisation of sensitivity analysis in monomial models](https://mlsanity.com/paper/1901.02058/) (2018)
- [Sensitivity Analysis for Probability Assessments in Bayesian Networks](https://mlsanity.com/paper/1303.1470/) (2013)
- [You Only Derive Once (YODO): Automatic Differentiation for Efficient Sensitivity Analysis in Bayesian Networks](https://mlsanity.com/paper/2206.08687/) (2022)
- [Analysing Sensitivity Data from Probabilistic Networks](https://mlsanity.com/paper/1301.2314/) (2013)

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

- [Global Sensitivity Analysis of Uncertain Parameters in Bayesian Networks](https://mlsanity.com/paper/2406.05764/) (2024)
- [The diameter of a stochastic matrix: A new measure for sensitivity analysis in Bayesian networks](https://mlsanity.com/paper/2407.04667/) (2024)

## Abstract (arXiv)

Sensitivity analysis measures the influence of a Bayesian network's parameters on a quantity of interest defined by the network, such as the probability of a variable taking a specific value. Various sensitivity measures have been defined to quantify such influence, most commonly some function of the quantity of interest's partial derivative with respect to the network's conditional probabilities. However, computing these measures in large networks with thousands of parameters can become computationally very expensive. We propose an algorithm combining automatic differentiation and exact inference to efficiently calculate the sensitivity measures in a single pass. It first marginalizes the whole network once, using e.g. variable elimination, and then backpropagates this operation to obtain the gradient with respect to all input parameters. Our method can be used for one-way and multi-way sensitivity analysis and the derivation of admissible regions. Simulation studies highlight the efficiency of our algorithm by scaling it to massive networks with up to 100'000 parameters and investigate the feasibility of generic multi-way analyses. Our routines are also showcased over two medium-sized Bayesian networks: the first modeling the country-risks of a humanitarian crisis, the second studying the relationship between the use of technology and the psychological effects of forced social isolation during the COVID-19 pandemic. An implementation of the methods using the popular machine learning library PyTorch is freely available.
