800 likes | 905 Views
Probabilistic Inference Lecture 6 – Part 2. M. Pawan Kumar pawan.kumar@ecp.fr. Slides available online http:// cvc.centrale-ponts.fr /personnel/ pawan /. MRF. d 1. d 2. d 3. V 1. V 2. V 3. d 4. d 5. d 6. V 4. V 5. V 6. d 7. d 8. d 9. V 7. V 8. V 9.
E N D
Probabilistic InferenceLecture 6 – Part 2 M. Pawan Kumar pawan.kumar@ecp.fr Slides available online http://cvc.centrale-ponts.fr/personnel/pawan/
MRF d1 d2 d3 V1 V2 V3 d4 d5 d6 V4 V5 V6 d7 d8 d9 V7 V8 V9 A is conditionally independent of B given C if there is no path from A to B when C is removed
MRF d1 d2 d3 V1 V2 V3 d4 d5 d6 V4 V5 V6 d7 d8 d9 V7 V8 V9 Va is conditionally independent of Vb given Va’s neighbors
Pairwise MRF Unary Potential ψ1(v1,d1) d1 d2 d3 V1 V2 V3 d4 d5 d6 Pairwise Potential ψ56(v5,v6) V4 V5 V6 d7 d8 d9 V7 V8 V9 Πaψa(va,da) Π(a,b)ψab(va,vb) Probability P(v,d) = Z Z is known as the partition function
Inference maxv P(v) Maximum a Posteriori (MAP) Estimation minvQ(v) Energy Minimization P(v) = exp(-Q(v))/Z P(va = li) = ΣvP(v)δ(va = li) P(va = li, vb = lk) = ΣvP(v)δ(va = li)δ(vb= lk) Computing Marginals
Outline • Belief Propagation on Chains • Belief Propagation on Trees • Loopy Belief Propagation
Overview Vb Vc Vd Va Compute the marginal probability for Vd P(v) = P(va|vb)P(vb|vc)P(vc|vd)P(vd) Compute (unnormalized) distribution Σva Ψa(va)Ψab(va,vb) Function m(vb)
Overview Vb Vc Vd Va Compute the marginal probability for Vd P(v) = P(va|vb)P(vb|vc)P(vc|vd)P(vd) Compute (unnormalized) distribution Σvb Ψb(vb)Ψbc(vb,vc)m(vb) Function m(vc)
Overview Vb Vc Vd Va Compute the marginal probability for Vd P(v) = P(va|vb)P(vb|vc)P(vc|vd)P(vd) Compute (unnormalized) distribution Σvc Ψc(vc)Ψcd(vc,vd)m(vc) (Unnormalized) Marginals !!
Overview Vb Vc Vd Va Compute the marginal probability for Vc P(v) = P(va|vb)P(vb|vc)P(vc|vd)P(vd) P(v) = P(va|vb)P(vb|vc)P(vd|vc)P(vc) Several common terms !!
Overview Vb Vc Vd Va Compute the marginal probability for Vb P(v) = P(va|vb)P(vb|vc)P(vc|vd)P(vd) P(v) = P(va|vb)P(vb|vc)P(vd|vc)P(vc) P(v) = P(va|vb)P(vc|vb)P(vd|vc)P(vb)
Overview Vb Vc Vd Va Compute the marginal probability for Va P(v) = P(va|vb)P(vb|vc)P(vc|vd)P(vd) P(v) = P(va|vb)P(vb|vc)P(vd|vc)P(vc) P(v) = P(va|vb)P(vc|vb)P(vd|vc)P(vb) P(v) = P(vb|va)P(vc|vb)P(vd|vc)P(va)
Belief Propagation on Chains Compute exact marginals Avoids re-computing common terms
Two Variables 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Unary Potentials ψa(li) Pairwise Potentials ψab(li,lk)
Two Variables 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Marginal Probability P(vb = lj) = Σiψa(li)ψb(lj)ψab(li,lj)/Z
Two Variables 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Un-normalized Marginal Probability P’(vb = lj) = Σiψa(li)ψb(lj)ψab(li,lj)/Z
Two Variables 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Un-normalized Marginal Probability P’(vb = lj) = Σiψa(li)ψb(lj)ψab(li,lj)
Two Variables 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Un-normalized Marginal Probability P’(vb = lj) = ψb(lj)Σiψa(li)ψab(li,lj)
Two Variables 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va 2 x 3
Two Variables 11 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Mab;0 2 x 3 + 5 x 1
Two Variables 11 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va 2 x 1
Two Variables 11 17 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Mab;1 2 x 1 + 5 x 3
Two Variables 11 17 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va Marginal Probability P’(vb = lj) = ψb(lj)Σiψa(li)ψab(li,lj)
Two Variables 11 17 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va P’(vb = l0) = 22 P’(vb = l1) = 68 Marginal Probability P’(vb = lj) = ψb(lj)Mab;j
Two Variables 11 17 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va P’(vb = l0) = 22 P’(vb = l1) = 68 Marginal Probability P(vb = lj) = ψb(lj)Mab;j/Z = 90 Z = Σj P’(vb= lj)
Two Variables 11 17 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va P(vb = l0) = 0.244… P(vb = l1) = 0.755… Marginal Probability P(vb = lj) = ψb(lj)Mab;j/Z = 90 O(h2)!! Z = Σj P’(vb= lj)
Two Variables 11 17 2 2 1 4 3 3 5 1 5 2 Vb Vb Va Va P(vb = l0) = 0.244… P(vb = l1) = 0.755… O(h2)!! Same as brute-force
Three Variables 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va P’(vc = lk) ΣjΣiψa(li)ψb(lj)ψc(lk)ψab(li,lj)ψbc(lj,lk)
Three Variables 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va P’(vc = lk) ψc(lk)ΣjΣiψa(li)ψb(lj)ψab(li,lj)ψbc(lj,lk)
Three Variables 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va P’(vc = lk) ψc(lk)Σjψb(lj)Σiψa(li)ψab(li,lj)ψbc(lj,lk)
Three Variables 11 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 Mab;j P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Σiψa(li)ψab(li,lj)
Three Variables 11 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 Mbc;k P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Mab;j
Three Variables 11 1 2 4 6 3 3 2 5 1 2 3 2 Vb Vc Va 17 P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Mab;j
Three Variables 11 1 2 4 6 3 3 2 5 1 2 3 2 Vb Vc Va 17 P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Mab;j 4 x 2 x 11
Three Variables 11 1 2 4 6 3 3 2 5 1 2 3 2 Vb Vc Va 17 P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Mab;j 4 x 2 x 11 + 2 x 2 x 17
Three Variables 11 1 2 4 6 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Mab;j 4 x 2 x 11 + 2 x 2 x 17
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 P’(vc = lk) ψc(lk)Σjψb(lj)ψbc(lj,lk)Mab;j
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 P’(vc = lk) ψc(lk)Mbc;k NOTE: Mbc;k “includes” Mab;j
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 Z = 156 x 3 + 146 x 6 = 1344 P(vc = 0) = 0.35 P(vc = 1) = 0.65
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 O(nh2) Better than brute-force
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 What about P(vb = lj)?
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 P’(vb = lj) ΣkΣiψa(li)ψb(lj)ψc(lk)ψab(li,lj)ψbc(lj,lk)
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 P’(vb = lj) ψb(lj)ΣkΣiψa(li)ψc(lk)ψab(li,lj)ψbc(lj,lk)
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 P’(vb = lj) ψb(lj)Σkψc(lk)Σiψa(li)ψab(li,lj)ψbc(lj,lk)
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 Mab;j P’(vb = lj) ψb(lj)Σkψc(lk)ψbc(lj,lk)Σiψa(li)ψab(li,lj)
Three Variables 11 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 156 Mcb;j P’(vb = lj) ψb(lj)Mab;jΣkψc(lk)ψbc(lj,lk) NOTE: Mcb;j does not “include” Mbc;k
Three Variables 11 12 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 24 156 P’(vb = lj) ψb(lj)Mab;jMcb;j
Three Variables 11 12 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 24 156 Z = 11 x 12 x 4 + 17 x 24 x 2 = 1344 P(vb = 0) = 0.39 P(vb = 1) = 0.61
Three Variables 11 12 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 24 156 O(nh2) Better than brute-force
Three Variables 11 12 146 1 2 4 1 6 3 3 3 2 5 1 2 3 2 Vb Vc Va 17 24 156 What about P(va = li)?