Module 2 produced messages. This lecture reads them: variable and factor beliefs, an exact product formula for on a tree, the Bethe free entropy that continues that formula off the tree, and the iterative algorithm used on loopy graphs. The zero-temperature limit is min-sum — Bellman dynamic programming run as if every neighbourhood were a tree.
Marginals from messages
Once the messages of Theorem 2.2 are known, the marginal at a variable is its field times all the incoming factor beliefs:
The pair (or higher) marginal on a factor is
On a tree both are exact after one leaves-to-root sweep. The same formulae will be used on loopy graphs; they then define the BP beliefs, not the true marginals.
The partition function as a product
Rooting at gave . We want a form in the normalized messages that does not depend on the root. Define three local partition functions:
Theorem 3.1 (Product formula for Z).
On a tree,
Adding a variable node multiplies by ; adding a factor multiplies it by ; every edge is then counted twice — once from each end — so each must be divided out once.
Telescoping in and
Substitute the definitions of in terms of the unnormalized , using and . The numerator telescopes, and dividing by cancels every and except those at the root, leaving exactly .
Check on a single edge (, ): with uniform messages, , , and the ratio is .
The Bethe free entropy
Taking the logarithm of defines the Bethe free entropy
On a tree this equals, by Theorem 3.1. On a general graph one still defines by , evaluated at a fixed point of Theorem 2.2. Three facts make this the central object of the subject:
BP fixed points are exactly the stationary points of under the message normalizations (Homework, and the collapsed argument below).
When BP has several fixed points, the physically correct one is the global maximizer of (minimizer of the free energy).
is asymptotically exact on locally tree-like graphs in the replica-symmetric phase.
The tension between (1) and (2) — BP finds a stationary point, but not necessarily the global one — is taken up at the end of Module 4.
BP is Bethe stationarity (sketch)
Write and adjoin Lagrange multipliers for and on every edge.
Vary : it appears in and in . Stationarity forces , which is the variable-to-factor rule.
Vary : it appears in and in . Stationarity forces , the factor-to-variable rule.
Hence every BP fixed point is a stationary point of , and vice versa. The stationary value of is the BP estimate of . The full Lagrange argument is Homework, problem 4.
Loopy BP
On a tree, Theorem 2.2 is a definition, not an iteration: sweep once from leaves to root. On a graph with loops there is no leaf to start from, so the same equations are turned into a fixed-point iteration. Initialize all messages, then update them repeatedly (in parallel, or in random sequential order) until they stop changing:
Typical initializations: (i) the prior ; (ii) the prior plus a small random perturbation; (iii) fully random; (iv) planted, , biased toward a known configuration.
The iteration need not converge, and when it does it may reach different fixed points from different initializations. Two practical controls:
Damping. Replace a parallel update by . Undamped parallel BP oscillates on antiferromagnets and frustrated loops; damping or sequential updates often restore convergence.
-annealing. At large a cold start rarely converges. Run BP as the inner loop of a geometric schedule, reusing the previous fixed point.
When local neighbourhoods are tree-like and correlations decay, the loopy iteration nonetheless returns asymptotically exact marginals and free entropy — that is Figure 1.4 plus decaying correlations.
The gadget below runs pairwise Ising BP on a path (a tree: exact after one sweep) versus a 4-cycle (a loop: approximate, and able to oscillate). Exact marginals are the 16-configuration brute force.
Optimization: max-product and min-sum
For optimization we care about , where concentrates on minimizers of . Writing every message in the log domain, and , and using , the sum-product rules become the min-sum (also called max-product) equations
Here , , and the messages are min-marginals: is the minimum energy of the amputated subtree above with fixed.
On a tree this computes and a minimizer exactly — it is Bellman’s dynamic-programming recursion, or the Viterbi algorithm, written on the factor graph. On loopy graphs it is the workhorse of LP decoding and of the survey-propagation family.
Note 3.1 (One idea, two failures).
Min-sum is Bellman DP run on the interaction graph as if every neighbourhood were a tree: per sweep, and wrong once per short cycle. Two contract differences with local search are easy to miss. First, message passing produces beliefs, not incumbents: at no point does it hold a configuration whose energy could be reported. Turning beliefs into an assignment is a separate step (decimation, reinforcement, rounding). Second, exact contraction of the same factors — variable elimination in a good order — is the same recursion made exact, at cost . Every method between BP and exact inference picks a point between those poles.
Raise in the gadget above to watch sum-product concentrate onto min-sum: the beliefs sharpen into decisions, and on the cycle they can start to disagree with the true MAP.
Other routes to the same equations
The tree recursion explains why BP is exact on trees. Three other derivations explain what it optimizes, how to average it over a random ensemble, and when it breaks. They produce the same fixed-point equations. Details are collapsed; we will not need the algebra in Module 4.
Variational Bethe principle
The Gibbs variational principle says over all trial distributions , with the maximum at . The Bethe approximation restricts to its node and factor marginals , and replaces the entropy by the tree formula . The resulting Bethe free-entropy functional is a function of the local marginals only. Stationarity under the consistency constraints is equivalent to Theorem 2.2. Every BP fixed point is a stationary point of that functional, and vice versa.
This is the deepest of the four viewpoints. It tells us BP is an optimization algorithm for a specific non-convex free-energy surface — which may have maxima, minima, and saddles, and whose global maximizer need not be reached by the iteration.
Cavity method and population dynamics
Delete one incident factor of variable (dig a cavity). On a tree the remaining branches through are independent, and the cavity law of is exactly . Re-closing the cavity is the BP update. Free-energy shifts, , reproduce .
On a random graph the cavity fields become i.i.d. draws from a distribution that satisfies a self-consistent equation, solved numerically by population dynamics. That is how one computes phase-transition thresholds for random ensembles without building a single large graph.
Replica, survey propagation, and the rest
The replica method computes the quenched free entropy . The replica-symmetric saddle reproduces the cavity/Bethe result: its order parameter is the same , its value is the disorder-averaged . When that saddle is unstable (de Almeida–Thouless / Kesten–Stigum), one-step replica-symmetry breaking promotes the order parameter to a distribution over distributions. The stationarity equations are survey propagation — BP lifted one level up the RSB hierarchy — which is the algorithm that continues to work in the clustered phase where plain BP fails.
Other controlled enlargements: Kikuchi / generalized BP keeps marginals on larger regions (plaquettes) and captures short loops; tree-reweighted BP convexifies the entropy and gives a unique minimizer plus an upper bound on ; the Plefka expansion recovers mean field, TAP, and Bethe as successive orders in coupling.