Variable Elimination (VE) is a classical exact inference algorithm for probabilistic graphical models such as Bayesian Networks, computing the marginal distribution of a subset of the random variables in the model. Our goal is to understand Variable Elimination as an algorithm acting on programs, here expressed in an idealized probabilistic functional language -- a linear simply-typed $\lambda$-calculus suffices for our purpose. Precisely, we express VE as a term rewriting process, which transforms a global definition of a variable into a local definition, by swapping and nesting let-in expressions. We exploit in an essential way linear types.
翻译:变量消除(VE)是一种用于概率图模型(如贝叶斯网络)的经典精确推理算法,用于计算模型中随机变量子集的边缘分布。我们的目标是将变量消除理解为作用于程序的算法,此处程序以理想化的概率函数式语言表达——线性简单类型λ演算足以满足我们的需求。具体而言,我们将VE表达为项重写过程,通过交换和嵌套let-in表达式,将变量的全局定义转换为局部定义。我们以本质性的方式利用了线性类型。