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.
翻译:敏感性分析衡量贝叶斯网络参数对网络所定义关注量(如变量取特定值的概率)的影响程度。已有多种敏感性测度被定义用于量化此类影响,最常见的是关注量对网络条件概率偏导数的某种函数。然而,在包含数千个参数的大型网络中计算这些测度可能变得计算成本极高。我们提出一种结合自动微分与精确推理的算法,能够在单次遍历中高效计算敏感性测度。该算法首先通过变量消除等方法对整个网络进行边缘化处理,随后反向传播该操作以获得所有输入参数的梯度。该方法可应用于单因素和多因素敏感性分析及可行域推导。仿真研究通过将算法扩展至包含十万个参数的超大规模网络验证其高效性,并探究了通用多因素分析的可行性。我们的程序还在两个中等规模贝叶斯网络上进行了展示:第一个模型对引发人道主义危机的国家风险进行建模,第二个研究COVID-19疫情期间技术使用与强制社交隔离心理效应之间的关系。基于流行机器学习库PyTorch的实现已免费开源。