Referring capter 8 of PRML, I implemented loopy belief propagation(max-sum) for factor graph. However, probabilities of all variable nodes creating loops on loopy factor graph are always 0, as follows.

  1. On max-sum, messages are -∞~0 because they are logarithm of probability which is 0~1.
  2. Messages of a node are created as summation of messages flowing to the node.
  3. Messages should be sent repeatedly by they satisfy termination criteria if a factor graph has loops.
  4. Whenever messages are sent, negative values(messages flowing to the node) are summed repeatedly. After all, all messages diverge to -∞.
  5. Probabilities of all variable nodes becomes 0 because all messages are -∞.

I doubt whether I misunderstand the algorithm. Please help me.

asked Nov 02 '11 at 05:25

hirost's gravatar image

hirost
1112

edited Nov 02 '11 at 05:44

You do misunderstand the algorithm. There's a bug in your implementation. How are you incorporating the factor scores into your messages?

Another possibility is for you to check out one of the many implementations of loopy bp available on the web to see what you missed.

(Nov 02 '11 at 06:47) Alexandre Passos ♦

I considered the factor scores as mentioned on PRML. My implementation correctly works on markov-chain, tree or graphs which have no loops. However, errors occur if I apply my implementation to loopy factor graph.

What I want to implement is max-sum on loopy factor graph. I searched it on the web, but I couldn't find any codes.

(Nov 02 '11 at 06:56) hirost
1

Max-product loopy BP can use almost the same code as sum-product loopy BP, the only difference being that when sending a factor message you maximize over the values of the other variables rather than sum over them. With this in mind you can easily grab any implementation of loopy sum-product BP and adapt it to suit your tastes.

(Nov 02 '11 at 07:00) Alexandre Passos ♦

I am reading source code of loopy sum-product, but I still feel confused. According to message update equations described in PRML, It is clear that messages diverge to -∞ for all loopy factor graph, I think.

(Nov 02 '11 at 09:47) hirost

One Answer:

Yes, messages will tend to 0 on loopy graphs. You have to normalize your messages, e.g., so that they sum/max to 1. You'd want to do this on tree networks anyways, to help prevent underflow.

answered Nov 13 '11 at 15:38

arthur's gravatar image

arthur
1

Your answer
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.