Skip to content

Bayesian Inference

Lazy Symbolic Bayesian Inference: A Compiler for Junction Trees

Most exact-inference libraries treat junction-tree calibration as a numerical procedure: build the tree, run two passes of message passing, return the marginals. Change the evidence and the whole pass runs again. PyBayes treats it as a compiler problem instead. The junction tree is built once, then the calibration is reified as a symbolic computation DAG of typed algebraic terms. A parallel heap of torch.Tensor thunks hangs off that DAG, indexed by the same identifiers, evaluated on demand and invalidated selectively when evidence changes. The library is PyBayes (github.com/dlewissandy/pybayes).

Yet Another Primer on Bayes Nets

A walking-pace introduction to exact inference for discrete Bayesian networks: what they are, what we ask of them, why naive inference is intractable, and how junction trees turn it into a sequence of local computations. Aimed at someone who knows probability and graphs but hasn't worked with Bayesian networks specifically. By the end you should be able to read the algorithm in a graphical-models paper, recognise when exact inference is tractable for a given network, and trace why two variables are or aren't conditionally independent given some set of observations. The running example is the Asia network (Lauritzen and Spiegelhalter 1988); each algorithm is walked through end-to-end on it.