sum-product on trees

(2 hours to learn)


Sum-product is an algorithm for marginalization and partition function computation in graphical models. It is based on dynamic programming, and has the advantage that it reuses computations to compute marginals for all nodes in the graph. It is a generalization of the forward-backward algorithm for hidden Markov models.


This concept has the prerequisites:

Core resources (read/watch one of the following)


Supplemental resources (the following are optional, but you may find them useful)


Information Theory, Inference, and Learning Algorithms
A graudate-level textbook on machine learning and information theory.
Author: David MacKay
Coursera: Probabilistic Graphical Models (2013)
An online course on probabilistic graphical models.
Author: Daphne Koller
Other notes:
  • These lectures describe the junction tree (or clique tree) algorithm, a way of applying BP to general graphs. The notation differs significantly from the more traditional formulation of BP on factor graphs.
  • Click on "Preview" to see the videos.


See also

  • If we apply the BP update rules in a non-tree graph, it often still works; this is known as loopy BP .
  • We can apply (exact) BP to any MRF using the junction tree representation , although possibly with a large increase in complexity
  • The special case of Gaussian graphical models
  • Some HMM inference algorithms can be interpreted as belief propagation
  • If we have a polytree or chordal MRF, we can convert it to a factor graph and then [run BP](factor_graph_bp) .
  • BP can be interpreted as fixed point updates to an optimization problem involving Bethe free energy.