# Belief propagation with Infer.net (Migrated from community.research.microsoft.com) • ### Question

• amchiclet posted on 10-17-2009 11:33 PM

Hi,

I'm new to both belief propagation and Infer.net, so if my questions don't make sense, please point me in a good direction to understand the matter better which leads to asking better questions.

I have this algorithm on paper.

There are
1) a probability distribution function
2) a psi function
3) a phi function
4) a set of nodes structured as a tree
5) messages between the nodes all initialized to 1

From what I understand, we update the messages until they "saturate". This is called belief propagation, right?

I don't really know where to start modeling this structure in Infer.net because it seems like
1) the probability distribution function doesn't look like a standard one like beta, gaussian, etc. It uses products of phi's and psi's to some extent
2) I don't know how I would go about implementing the psi and phi functions
3) I'm not quite sure what variable I want to infer
4) the inference engine will use the belief propagation algorithm, and infer() will be called once. What if I need to see the message updates between each loop?

I've seen http://community.research.microsoft.com/forums/p/2434/3726.aspx#3726 and I think that an easy example like that will help me understand the best.

Friday, June 3, 2011 5:19 PM

• minka replied on 10-18-2009 6:03 AM

Belief propagation is an algorithm for computing the marginal distribution of a variable (or multiple variables) in a graphical model.  So before you can apply the algorithm you should know what is the graphical model and what are the marginal distributions that you want.  In other words, what is the problem that you are trying to solve using belief propagation?

Friday, June 3, 2011 5:19 PM

### All replies

• minka replied on 10-18-2009 6:03 AM

Belief propagation is an algorithm for computing the marginal distribution of a variable (or multiple variables) in a graphical model.  So before you can apply the algorithm you should know what is the graphical model and what are the marginal distributions that you want.  In other words, what is the problem that you are trying to solve using belief propagation?

Friday, June 3, 2011 5:19 PM
• amchiclet replied on 10-18-2009 11:19 PM

Thanks minka.

Let me give you a little background. I'm a computer scientist trying to help the statistics department at a university implement an example of using the belief propagation algorithm in Infer.Net. For this reason, I still have a pretty vague idea of the high-level problem I'm trying to solve. I'm still trying to understand the domain better but meanwhile I'll tell you what I know.

What I know for now is that the graphical model is an undirected graph with a tree-structure. And the problem statement I got during a meeting with them is stated as follows:

"Given a distribution P(x), we want to find the most probable configuration of x under P, i.e., x_mp = argmax_x P(x), or we want to find the marginal distribution P(x_i) = \sum_{x\x_i} P(x), where x is a vector and x_i is its ith component"

If this is not enough for you to help me, I'll have to do some more understanding and come back to this forum later.

Friday, June 3, 2011 5:19 PM