Difference between revisions of "Belief Propagation"

From Cohen Courses
Jump to navigationJump to search
Line 48: Line 48:
 
we then do the same to compute all the downward messages. After we obtain all the bottom-up and top-down messages, we then can easily compute the marginals. For example, if we want to compute <math>P(x_G = \epsilon)</math>, we can
 
we then do the same to compute all the downward messages. After we obtain all the bottom-up and top-down messages, we then can easily compute the marginals. For example, if we want to compute <math>P(x_G = \epsilon)</math>, we can
 
: <math> P(x_G = \epsilon) = \frac{1}{Z} m_{A,G}(\epsilon) m_{D,G}(\epsilon) m_{Z,G}(\epsilon)</math>
 
: <math> P(x_G = \epsilon) = \frac{1}{Z} m_{A,G}(\epsilon) m_{D,G}(\epsilon) m_{Z,G}(\epsilon)</math>
 +
the general form of above calculation can be expressed as
 +
: <math> P(x_i = \epsilon) = \frac{1}{Z} \prod_{i \in Neighbor(i)(\epsilon)}</math>

Revision as of 11:16, 27 September 2011

This is a method proposed by Judea Pearl, 1982: Reverend Bayes on inference engines: A distributed hierarchical approach, AAAI 1982.

Belief Propagation (BP) is a message passing inference method for statistical graphical models (e.g. Bayesian networks and Markov random fields). The basic idea is to compute the marginal distribution of unobserved nodes, based on the conditional distribution of observed nodes. There are two major cases:

  • When the graphical model is both a factor graph and a tree (no loops), the exact marginals can be obtained. This is also equivalent to dynamic programming and Viterbi.
  • Otherwise, loopy Belief Propagation will become an approximation inference algorithm.

Motivation: Marginals vs. Joint Maximizer

To compute marginals, we need to find:

where as to compute joint maximum likelihood, we need:

Unfortunately, for each random variable , it might have M possible states, so if we run search algorithms for all states, the complexity is , which is a computationally hard problem. As a result, we need to find better inference algorithms to solve the above problems.

Problem Formulation

In a generalized Markov random fields (MRFs), the marginals of the log-likelihood model can be formalized as the following equation:

where as the partition function is:

Therefore, the two tasks here are: (1)compute the marginals of . (2)compute the partition function.

The Belief Propagation Algorithm

In this example, we first show a simple case where the graph is a tree, then we also show the general form of BP messages. Assume we have the following tree-structured MRF, and we pick as the root node (technically, you can choose any node).

Binarytree.gif

(1)In the first step, we compute the partition function by sending messages from leaves to the top of the tree. The message passing process can be recognized as bottom-up dynamic programming as well. For example, to compute the possible value of in message from node A to node G, we can calculate

following the same method above, we can also calculate and . Next, we can calculate

and the partition function will become

If we define to be the set of neighbors of , the general form of the message can be defined as

when , then

(2)In the second step, we compute marginals by sending top-down messages through out the tree MRF, using the same definition as above.

for example, when calculating the downward message from Z to G, we can compute:

we then do the same to compute all the downward messages. After we obtain all the bottom-up and top-down messages, we then can easily compute the marginals. For example, if we want to compute , we can

the general form of above calculation can be expressed as