This lecture carries out Theorem 1.1. It derives belief propagation on a tree factor graph the way the source notes do — not by postulating update rules, but by defining exact partition functions of subtrees and discovering that they satisfy a local recursion. The recursion is BP. Everything here is exact. The leap to loopy graphs is Module 3.

We work throughout with the factor-graph law of Definition 1.1.

A subscript dictionary

Read this twice. Most confusion in the derivation is about what is being summed, and what is pinned.

Notation 2.1 (What every sum ranges over).
  • : one variable’s value. Ising ; colouring .
  • : sum over the alphabet of that one variable ( terms), not over all configurations of the graph.
  • : Cartesian product of alphabets of the free variables in the subtree above .
  • : configurations of the siblings of under factor .
  • : is pinned (a fixed argument), not a dummy of summation.
  • : now is free — sum the partial over the pin.

Ising check: . A pairwise sum has four terms.

Root the tree; define two cuts

Fix a tree factor graph. Root it anywhere and orient every edge upward toward the root, so each variable and factor has a well-defined set of nodes above it.

The running example is the four-variable tree

rooted at variable :

3 b 4 c 2 a 1 root
Figure 2.1. The working tree. Leaves 3 and 4 hang off factors b and c; the root is variable 1.

For each directed edge define a reduced partition function of everything above a cut, with the boundary variable pinned. The gadget below steps through those cuts on Figure 2.1.

Reduced partition functions and

Definition 2.1 (Variable-to-factor partial Z).

The index is pinned. The sum is over every variable strictly above the cut at (the subtree hanging off , excluding the edge toward ). The local field is included. Reading: the weight of the amputated subsystem above , given .

Definition 2.2 (Factor-to-variable partial Z).

The pin is for the variable below toward the root (, so still enters ). The sum is over all variables above : the siblings of under , and their whole subtrees. Reading: the weight of the subsystem above , given .

On Figure 2.1, of Definition 2.1 sums and with held fixed; of Definition 2.2 sums with held fixed. Keep Notation 2.1 in view: in is pinned, not a dummy of summation.

The key lemma: pinning disconnects branches

Lemma 2.1 (Tree factorization).

On a tree, conditioning on (pinning) a variable disconnects the graph into independent components hanging off . Configuration-sums over those components factor into a product.

Why: no loops means any two branches meet only at . Pin and there is no residual coupling between branches. The joint Boltzmann weight multiplies, and the multi-sum splits.

What fails on loops: branches reconnect through another path. Independence is then only approximate, and only if loops are long and correlations decay — the locally tree-like regime of Figure 1.4.

Lemma 2.1 is the single fact that gives the recursions.

The and recursions

Theorem 2.1 (R and V recurse).

On a tree,

A variable leaf attached only to factor has empty product , so .

The -recursion is a product because, after pinning , each neighbouring factor heads an independent branch, and that branch’s weight is (still a function of the same pinned ). The -recursion is a sum because factor couples to its siblings: pin , sum the siblings, and each sibling subtree contributes an .

The gadget below walks that factorization on Figure 2.1. Toggle versus , then step: each frame shades the relevant cut and shows the matching identity. The two proofs under the gadget write the same algebra without the picture.

Sweep from the leaves to the root. Rooting at any variable ,

Now is free — sum over . The value of cannot depend on the chosen root; that is a consistency check. On a tree this is an exact dynamic program, not an iteration.

Worked example: expand from the leaves

On Figure 2.1 the recursion is small enough to write by hand.

Step 1 — leaf s. Empty product above a leaf:

Step 2 — factor s. Each of and has a single sibling of the downward variable:

Here runs over only. Ising: two terms, .

Step 3 — mid variable by recursion. Pinning disconnects branches and :

Step 4 — factor toward the root. Only sibling is summed; is pinned:

Step 5 — full at root :

Unfolding everything recovers the original four-variable sum, so the recursion is exact bookkeeping of the same .

The gadget below does the arithmetic for a binary Ising specialization: choose leaf fields and couplings, and watch , , then the normalized messages, then the root marginal.

From to messages

The reduced partition functions grow like and are unwieldy. Only their ratios carry the marginal information, so normalize them into probability distributions — the messages:

so that . Here is the variable-to-factor message (the law of in the amputated subsystem above ) and is the factor-to-variable message.

Theorem 2.2 (Belief propagation equations).

Substituting into and absorbing the growing normalizations into constants , yields

A variable multiplies together the beliefs coming from all other factors and its own field. A factor convolves the incoming variable beliefs against its interaction and sums out the neighbours. On a tree these are not iterative — a single sweep from the leaves to the root evaluates every message exactly.

Reading of the messages:

  • is the probability that takes the value in the system amputated at factor (a cavity marginal).
  • is the reweighting that factor applies to variable .
Note 2.1 (Cavity picture).

To emit , variable deletes the factor it is addressing — opening a cavity — and multiplies the incoming messages from the other factors . That is why the product in omits .

On a tree, initialize the leaves by and sweep once to the root. Theorem 2.1 plus normalization is Theorem 2.2. The messages, and the marginals built from them in Module 3, are exact.

Next: Beliefs, Bethe, and loopy BP.