Top Banner
Belief Propagation
16

Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Jan 16, 2016

Download

Documents

Rosalyn Garrett
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Belief Propagation

Page 2: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

What is Belief Propagation (BP)?

BP is a specific instance of a general class

of methods that exist for approximate

inference in Bayes Nets (variational

methods).

Simplified Bayes Net is the key idea of BP.

Simplification yields faster/tractable inference at the cost of accuracy.

Page 3: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

An Example & Motivation

1X 2X 3X

1C 2C 3C

1R 2R

2-SAT problem as a Bayes Net.

Try applying Junction Tree Algorithm and …

Page 4: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

An Example & Motivation (contd.)

1X 2X 3X

1C 2C 3C

1R 2R

1 2 3 1 2 3 1 2X X X C C C R R

We get one huge clique.

…and Junction Tree Algorithm yields :

Same as having a full joint table.

Defeats purpose of Bayes Net and so …

Junction Tree Clique

Page 5: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Accuracy Sacrifice = Possible Solution(Belief Propagation)

… Belief Propagation (BP) to the rescue

Two main steps :

(1) Simplified Graph Construction

(2) Message Passing until convergence

Page 6: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Caveat : BP may not converge.

Simplification? So what?

Good News : Seems to work well in practice.

Page 7: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Simplified Graph Construction

1X 2X 3X

1C 2C 3C

1R 2R

We will build a “clique” graph similar to Junction Tree Algorithm, but …

… without triangulation, and …

… need to have a “home” for all CPTs

The simplified graph is …

Page 8: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Simplified Graph Construction (contd.)

1X 2X 3X

1C 2C 3C

1R 2R

1 3 2X X C

1 2 1X X C

2 3 3X X C

1 1 2RC C

1 2 3R R C

Simplified Graph: Separators needto be specified. Second simplificationis that the connecting arc need nothave all the separator variables.By doing this we get …

Page 9: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Simplified Graph Construction (contd.)

1 3 2X X C

1 2 1X X C

2 3 3X X C

1 1 2RC C

1 2 3R R C

3X

1X

2X

1C

2C

3C

1R

Here all separator variables are specified. This is a specific flavor of BP called Loopy BeliefPropagation (LBP).

Loops are allowed in LBP.

Now we need to do …

Page 10: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Message Passing

1 3 2X X C

1 2 1X X C

2 3 3X X C

1 1 2RC C

1 2 3R R C

3X

1X

2X

1C

2C

3C

1RPass messages, just as inJunction Tree Algorithm.

Messages are nothing but CPTsmarginalized down to the separatorvariable(s).

Page 11: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Message Passing (contd.)

Initialize the messages on all separator edges to 1.

In the above we have assumed all variables are binary.

i je

1 1

1 3 2X X C 1 2 1X X C1X

1 1

Message Initialization : Generic

Message Initialization : Example (2-SAT)

1X 1 1= (message)

e 1 1= (message)

Page 12: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Message Passing (contd.)

1 3 2X X C 1 2 1X X C1X1X

i jee

inode is marginalized to ee

1X is marginalized to

1 3 2X X C 1X

Page 13: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Message Passing (contd.)

i jee

1 3 2X X C 1 2 1X X C1X1X

e

e

1

1

X

X

Message that reaches j

Multiplies CPT at j

Message that reaches 1 2 1X X C

Multiplies CPT at 1 2 1X X C

Page 14: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Message Passing (contd.)

1X

1 3 2X X C 1 2 1X X C1X

i jee

Reset message on arc with the message that was just passed through the arc

Page 15: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

Message Passing (contd.)

Summary :

1) Initialize the message on all arcs.2) To pass a message marginalize the CPT on node to separator variable.3) Divide the marginalized CPT by the message on the arc. This messages

reaches the destination node.4) Reset the CPT in destination node by multiplying it by arriving message.5) Reset the message on arc to the message that just passed through.

Note : The marginalized CPT has to be divided by the message on the arc irrespective of direction of flow of message.

The above is message passing between any two adjacent nodes.

Page 16: Belief Propagation. What is Belief Propagation (BP)? BP is a specific instance of a general class of methods that exist for approximate inference in Bayes.

BP : Summary

• BP is simplified graph + message passing.

• Can yield approximate results. Sacrificing accuracy buys us efficiency/tractability.

• Convergence not guaranteed, but seems to work well in practice.

• More general class of approximate inference – variational methods – is an exciting area of research… see Ch 11.