Variable Elimination as Rewriting in a Linear Lambda Calculus
Logic in Computer Science
2025-01-28 v1
Abstract
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 -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.
Cite
@article{arxiv.2501.15439,
title = {Variable Elimination as Rewriting in a Linear Lambda Calculus},
author = {Thomas Ehrhard and Claudia Faggian and Michele Pagani},
journal= {arXiv preprint arXiv:2501.15439},
year = {2025}
}