Back to Module 1 · Module 2 · Module 3
These are Exercises 5.1 and 5.2 of Krzakala & Zdeborová, rewritten as callouts, plus a loopy-graph check that matches the gadget in Module 3.
Problem 1
Problem 1.1 (The 3-spin model as a factor graph).For the Ising
-spin model , , write (i) the Boltzmann law, (ii) the factor graph, and (iii) the BP equations and the Bethe free entropy.
Solution
(i)
. (ii) One ternary factor
per triplet, attached to its three variables; one field per spin. (iii) With
, The factor-to-variable update is a double sum. The Bethe entropy is
with , , and .
Problem 2
Problem 1.2 (Independent set).Write a probability distribution (a) uniform over independent sets of a graph and (b) weighted by
. Give the factor graph, specialize the BP equations, and write the Bethe free entropy.
Solution
Membership
, hard factor , fugacity (and for the uniform case). Cavity occupation obeys The Bethe entropy is
. See Module 4.
Problem 3
Problem 1.3 (Matching).Do the same for matchings, with a weight
favouring larger matchings.
Solution
Variables
live on edges; a hard factor at each vertex enforces ; . Availability messages give
. The factor graph is dual to independent set.
Problem 4
Problem 1.4 (BP is Bethe stationarity).Show that the BP equations are the stationarity conditions of the Bethe free entropy
with respect to the messages, under and on every edge.
Solution
Adjoin Lagrange multipliers
, for the two normalizations on edge . The Lagrangian is . Vary
. It appears in and in : Setting
and matching normalizations gives , the variable-to-factor rule. Vary
. It appears in and in . Stationarity likewise gives , the factor-to-variable rule. Thus BP fixed points are exactly the stationary points of
. Stationary is not the same as minimal: see the last section of Module 4.
Problem 5
Problem 1.5 (A 4-cycle by hand).On a
-cycle with and no fields, run BP for two parallel iterations from the uniform start . Compare the resulting single-variable beliefs to the exact (brute-force) marginals. Then put a field on one spin and try again — the gadget in Module 3 does the arithmetic. Optional: set
(antiferromagnet) and damping . What happens to the iteration?
Solution
With no fields the model is spin-flip symmetric, so the uniform messages
are already a fixed point: two iterations change nothing, and the beliefs are , which is the exact marginal. The approximation error is invisible at the level of single-site magnetizations. A field
on one spin breaks the symmetry. Exact magnetizations are the 16-term brute force; loopy BP is a truncation that pretends the two paths from to are independent. They are not, and at any finite . For
, undamped parallel updates on the even cycle oscillate: each spin tells its neighbours to flip, and the even length feeds that instruction back in phase. Damping (or sequential updates) kills the two-cycle. This is the antiferromagnetic lesson of Module 3, not a failure of the Bethe free energy itself.