- product
Algorithm
,Loopy
Belief Propagation Scribes :Denis
McInerney Sara Taheri Homework 2 : Out today Due
Fri Denis McInerney Scribes : Taheri Sara Out Homework 2 - - PowerPoint PPT Presentation
Algorithm Sum - product Lecture : , Loopy Belief Propagation Fri Denis McInerney Scribes : Taheri Sara Out Homework 2 today : Feb Due I Today Variables Marginals Discrete Exact over : Marginals Goal form Compute of
Algorithm
,Loopy
Belief Propagation Scribes :Denis
McInerney Sara Taheri Homework 2 : Out today Duepl
Xi
u¥
. ,↳ ; PK ' ' × " , . .Example
:Markov
Chain Basic Idea :Rearrange
Terms in Sum Pla , b , c , d ) = peas = E E [ To lb ) : = . . E&
l E
D
ya C c ) i = = E bExample
:Markov
Chain peas = .I E.
pca.bipcbnp.ua , " " " Sm B Rearranged Sum = I p ca I b ) zac b )&
. . , pc b I c) yb C c ) 2b Col = § p ( c I d ) face ) I 1 Question : What is the Computational Complexityf.
la , b ) fzlb , a ) f , ( C , d ) fa , (d) Messages : Variable to Variable pea , b , c ) = pca , b ) =µ
( c ) = {fz ( b
, c) µb→f . ( b ) b → c b = µfz→c ( < )f.
la , b) fzlb , a ) f , I C , d ) fa , (d) Factor Graph ( singlyftp.lfxfyc-neltissx3
Variable → Factor , µ × → f I x ) = M ( Product ) ge'
needs If }tf off ( X, )
he ( x ) hecfl Factor → Variable : µ , → × C x ) = I M ( Sum ) FX ,4 ss
< srd
< s s s pkl a M µt→×l× )f
fehecx ) Algorithm : Compute All Messages 1 . Pich any variable x 2 . Compute incoming messages 3 . ComputeBelief
Propagation :
Pseudo( Binary
Variables ) Assume : E dBelief
Propagation :
Pseudo( Binary
Variables ) def inBelief
Propagation :
Pseudo( Binary
Variables ) def inBelief
Propagation :
Pseudo( Binary
Variables ) Assume : EEdges
C x , f ) d OItag
messages{
µ = in{
for f e f f : I x , f) EE } : messages µ =Belief
Propagation :
Pseudo( Binary
Variables ) defI ' I
rd
{pix
, h ] = 17 b c e n a A f.tag f ,mom
arguers ,{
for g E { g , , . . .,gN
} :g.
x ) a from in . prod return MBelief
Propagation :
Pseudo( Binary
Variables ) def{
pelf ,×][ h ] =L # If]fx=h , yah , . .;yµ=hµ) b c e hi , . . , , kNIf
{
for ye { y , , . .Example
: ForwardAlgorithm
I HM Ms ) Factor Graph Generative Model I 9 9 I s g g h , n n a a ^ htt hi . , = h ~ a a n a Vt theForward
Pass ( outgoing messages )!ht
th
) Iftlh.lt/Uh+..-sf+ll)
lExample
: ForwardAlgorithm
I HM Ms ) Factor Graph Generative Model f. fr f , fg L L L 2 L s L h , ~ Discrete ( n ) ^ ^ n n htt hi . , =L ~ Discrete ( Ah ) g , ga 93 gu ^ ^ ^ " v , Ihr .hn Normal Hun , Gu ) Backward Pass( Incoming
Messages ) Bt th ) =Mf ,
→ h.lk ) = EEft
Chih ) Mutt , →fell )
' = EEfell
.tn/hg.....s.n!..llMft+ioht
. " 'Example
: ForwardAlgorithm
/ HMMS ) ForwardPass di ( k ) = plv , 1h ,=h ) plh ,=h ) ( t=| ) dt 1 h ) = p(V+lh+=hl{
Aeudt . ,( l ) ( t > 1) Backward Pass Btlhl = 1 ( t=T ) B + 1h ) =§
Ane p(✓t+,1ht+,=l ) p++,ll ) ltctl Marginal s ytlh ) a 0+14 Ptlh ) = µf+ . ,→h+l↳µgµhd↳µfphd "LS 59 as
r , < sis
PHI a M ftp.sxlxsI
fehecx ) Algorithm : Compute All Messages 1 . Pich any variable x 2 . compute incoming messages }! ?
Impute
3 . ComputeBelief
Propagation :
The Problem With Loops a b Directed Graph ; pca , b , c d ) a ( = Pla) p ( b 1 a) pcdla ) p ( CI b , d )Belief
Propagation :
The Problem With Loops a b Directed Graph ; pca , b. c d ) a ( = Pla) p ( b 1 a ) p( dla ) p ( cl b. d)fz
Factor Graph ; a a. b f a. a. f Pla , b. c d ) 3 4 =f.
( a) fz ( a. b ) fs (Belief
Propagation :
The Problem With Loops my fi f- z Factor Graph ; a ago b f ma my f Pla , b , c d) ] 4 =f.
C as feta , b ) f , Ca , a ) fu ( b , c. d) d C pg fiMarginal
I ,
=Loopy
Belief Propagation Step 1 : Initialize Messages µ[ f. × ][ h ] = 1 Hefz
a a. b Step 2 : Update messagesfs
a. a.fu
for f € SCHEDULE : a c for × e nelf ) : Update µ×→t and µf→×Loopy
Belief Propagation Step 2 : Update messages for f e SCHEDULE : Repeat until for x e he ( f ) : convergencefz
a a. bSM
= necxl \{ f } 3 4 for he { o , 13 : a c µ×→tlkl = .Loopy
Belief Propagation Step 2 : Update messages for f E SCHEDULE : Repeat until my fi convergence f- z for x E he ( fl : a wa b Update In , → f and Mf → × f ma ma f ] 4 a c Problems . Unlike EM updates , Loopy BP dates are not guaranteed to converge → designing a good schedule is critical to performance}
can now compute z , Compute