Belief Propagation

24
Belief Propagation Kai Ju Liu March 9, 2006

description

Belief Propagation. Kai Ju Liu March 9, 2006. Statistical Problems. Medicine Finance Internet Computer vision. Inference Problems. Given data B , infer A : p ( A | B ) Computer vision Given image, find objects Given two images, resolve 3D object Given multiple images, track object. - PowerPoint PPT Presentation

Transcript of Belief Propagation

Page 1: Belief Propagation

Belief Propagation

Kai Ju LiuMarch 9, 2006

Page 2: Belief Propagation

Statistical Problems

• Medicine• Finance• Internet• Computer vision

Page 3: Belief Propagation

Inference Problems

• Given data B, infer A: p(A|B)• Computer vision

– Given image, find objects– Given two images, resolve 3D object– Given multiple images, track object

Page 4: Belief Propagation

Conditional Probability

• Given event B, what is probability of A?

• Independence: p(A|B)=p(A)

Bp

BApBAp ,|

A B

Page 5: Belief Propagation

Bayes’ Rule

Bp

ApABpBp

BApBAp |,|

Page 6: Belief Propagation

e.g.

Cold Weekday

Party

Hangover

Marginal Probability: WCP xxx

WCPHH xxxxpxp,,

,,,

8-sum

WCWCPPH

WCPH

xpxpxxxpxxpxxxxp

,|| ,,, Joint Probability:

Page 7: Belief Propagation

e.g. (cont.)

Cold Weekday

Party

Hangover

Marginal Probability:

WCP xxxWCPHH xxxxpxp

,,

,,,

8-sum

sum-2|

sum-4,|,

P

WC

xPPHH

WCxx

WCPP

xpxxpxp

xpxpxxxpxpLocalize probabilities:

Page 8: Belief Propagation

Approach

• Define variables and connections

• Calculate marginal probabilities efficiently

• Find most likely configuration

PHWCPWCHPWC xxpxxxpxpxpxxxx |,,|,,;,,,

PWC xxx

HPWCH xxxxpxp,,

,,,

Hx

xpH

maxarg

Page 9: Belief Propagation

Pairwise Markov Random Field

1 2 3

4

5

• Basic structure: vertices, edges

Page 10: Belief Propagation

Pairwise Markov Random Field

• Basic structure: vertices, edges• Vertex i has set of possible states Xi

1X 2X 3X

4X

5X

and observed value yi

1y 2y 3y4y

5y

• Compatibility between states and observed values, iii yx ,

1 2 3

4

5

• Compatibility between neighboring vertices i and j, jiij xx ,

12 23

34

35

45

Page 11: Belief Propagation

Pairwise MRF: Probabilities

• Joint probability:

1X 2X 3X

4X

5X

1y 2y 3y4y

5y

1 2 3

4

5

12 23

34

35

45

ij

jiiji

iii xxyxZ

xxp ,,1,,5

151

• Marginal probability:

ijjXx

iijj

xxpxp,51,

51 ,,

– Advantage: allows average over ambiguous states– Disadvantage: complexity exponential in number of vertices

Page 12: Belief Propagation

Belief Propagation

1 2 3

4

5

Page 13: Belief Propagation

Belief Propagation

1b 2b 3b

4b

5b

• Beliefs replace probabilities:

iNj

ijiiiii

ii xmyxz

xb ,1

• Messages propagate information:

jj Xx ijNk

jkjijjijjjiji xmxxyxxm\

,,

212 xm

121 xm

323 xm

232 xm

434 xm

343 xm

535 xm

353 xm

Page 14: Belief Propagation

Belief Propagation Example

1 3

4

5

2b

23221222222

222222

22 ,1,1 xmxmyxz

xmyxz

xbNj

j

212 xm

232 xm

33

3533432332333232 ,,Xx

xmxmxxyxxm

343 xm

353 xm

11

2112111212 ,,Xx

xxyxxm

5544

35535553533443444343 ,,;,,XxXx

xxyxxmxxyxxm

Page 15: Belief Propagation

BP: Questions

• When can we calculate beliefs exactly?• When do beliefs equal probabilities?• When is belief propagation efficient?

Answer: Singly-Connected Graphs (SCG’s)• Graphs without loops• Messages terminate at leaf vertices• Beliefs equal probabilities• Complexity in previous example reduced from 13S5 to

24S2

Page 16: Belief Propagation

BP on Loopy Graphs

• Messages do not terminate• Possible approximate solutions

– Standard belief propagation– Generalized belief propagation

BP-TwoGraphs: Goals• Utilize advantages of SCG’s• Be accurate and efficient on loopy graphs

Page 17: Belief Propagation

BP-TwoGraphs: SCG’s

• Calculate beliefs on each set of SCG’s:–

• Select maximum beliefs from both sets– i

Hii

Giii xbxbxb ,max

iHii

Gi xbxb and

n

n

HHGG,,,,

1

1

• Consider loopy graph with n vertices• Select two sets of SCG’s that approximate the graph

Page 18: Belief Propagation

BP-TwoGraphs: Vision SCG’s

• Rectangular grid of pixel vertices• Hi: horizontal graphs

• Gi: vertical graphs

Page 19: Belief Propagation

Image Segmentation

add noise segment

Page 20: Belief Propagation

Image Segmentation: Results

Page 21: Belief Propagation

Real Image Segmentation

Page 22: Belief Propagation

Real Image Segmentation: Training

Page 23: Belief Propagation

Real Image Segmentation: Results

Page 24: Belief Propagation

Stereo Vision