You Only Derive Once (YODO): Automatic Differentiation for Efficient Sensitivity Analysis in Bayesian Networks

Rafael Ballester-Ripoll, Manuele Leonelli
6/17/2022
cs.AI
bayesian

Official code: rballester/yodo (2 stars, Jupyter Notebook, BSD-3-Clause, PyTorch, last commit 2023-06-04).

Abstract

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. In particular, the so-called sensitivity value measures the quantity of interest's partial derivative with respect to the network's conditional probabilities.

Show full abstract

However, finding such values in large networks with thousands of parameters can become computationally very expensive. We propose to use automatic differentiation combined with exact inference to obtain all sensitivity values in a single pass. Our method 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. We demonstrate our routines by ranking all parameters by importance on a Bayesian network modeling humanitarian crises and disasters, and then show the method's efficiency by scaling it to huge networks with up to 100'000 parameters. An implementation of the methods using the popular machine learning library PyTorch is freely available.

View on arXivView PDF

Code Implementations(1)

rballester/yodoOfficial100%
PyTorchBSD-3-Clause

You Only Derive Once (YODO): Automatic Differentiation for Efficient Sensitivity Analysis in Bayesian Networks

20Jupyter Notebook, PythonJun 15, 20223 years agoBSD-3-Clause
bayesian-networkspytorchsensitivity-analysistensor-networks

Similar Papers

Cite this paper

@article{ballesterripoll2022only,
  title  = {You Only Derive Once (YODO): Automatic Differentiation for Efficient Sensitivity Analysis in Bayesian Networks},
  author = {Rafael Ballester-Ripoll and Manuele Leonelli},
  year   = {2022},
  eprint = {2206.08687},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.08687}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.08687.svg)](https://codeofpaper.com/paper/2206.08687)

Discussion