graphical models inference and learning lecture 2 · 2018-12-05 · graphical models inference and...
TRANSCRIPT
![Page 1: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/1.jpg)
GraphicalModelsInferenceandLearning
Lecture2MVA
2018–2019h>p://thoth.inrialpes.fr/~alahari/disinflearn
SlidesbasedonmaterialfromM.PawanKumar
![Page 2: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/2.jpg)
PracJcalma>ers
• PaperpresentaJons– 18/12:SpaJo-temporalvideosegmentaJon…– 15/01:OnParameterLearninginCRF-based...– 12/02:CRFsasRNNs(chosen)
• Atmost2presentersperpaper• Bonuspoints&youwilldobe>erinthequiz
![Page 3: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/3.jpg)
PracJcalma>ers
• Coursewebsite– h>p://thoth.inrialpes.fr/~alahari/disinflearn– (linkedfrommywebpage)
• QuesJons?
![Page 4: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/4.jpg)
Recap:Lecture1
• GraphicalModels– MakingglobalpredicJonsfromlocalobservaJons– LearningfromlargequanJJesofdata
• Twotypesofmodelsstudiedintheclass– Bayesiannets– Markovnets
![Page 5: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/5.jpg)
Recap:Lecture1
![Page 6: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/6.jpg)
Recap:Lecture1
• QuesJon:Whatisthecoreofthesemodels?
• QuesJon:CanyoucomputeprobabiliJesinMarkovnets?Ifyes,howandifno,why?
• QuesJon:WhatisthedifferencebetweenMarkovandCondiJonalrandomfields?
![Page 7: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/7.jpg)
TheGeneralProblem
b
a
e
d
c
f
Graph G = ( V, E )
Discrete label set L = {1,2,…,h}
Assign a label to each vertex f: V ➜ L
1
1 2
2 2
3
Cost of a labelling Q(f)
Unary Cost Pairwise Cost
Find f* = arg min Q(f)
![Page 8: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/8.jpg)
Overview• Basics:problemformulaJon
– EnergyFuncJon– MAPEsJmaJon– CompuJngmin-marginals– ReparameterizaJon
• SoluJons
– BeliefPropagaJonandrelatedmethods[Lecture2]– Graphcuts[Lecture3]
![Page 9: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/9.jpg)
EnergyFuncJon
Va Vb Vc Vd
Label l0
Label l1
Da Db Dc Dd
Random Variables V = {Va, Vb, ….}
Labels L = {l0, l1, ….} Data D
Labelling f: {a, b, …. } ➔ {0,1, …}
![Page 10: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/10.jpg)
EnergyFuncJon
Va Vb Vc Vd
Da Db Dc Dd
Q(f) = ∑a θa;f(a)
Unary Potential
2
5
4
2
6
3
3
7Label l0
Label l1
Easy to minimize
Neighbourhood
![Page 11: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/11.jpg)
EnergyFuncJon
Va Vb Vc Vd
Da Db Dc Dd
E : (a,b) ∈ E iff Va and Vb are neighbours
E = { (a,b) , (b,c) , (c,d) }
2
5
4
2
6
3
3
7Label l0
Label l1
![Page 12: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/12.jpg)
EnergyFuncJon
Va Vb Vc Vd
Da Db Dc Dd
+∑(a,b) θab;f(a)f(b) Pairwise Potential
0
1 1
0
0
2
1
1
4 1
0
3
2
5
4
2
6
3
3
7Label l0
Label l1
Q(f) = ∑a θa;f(a)
![Page 13: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/13.jpg)
EnergyFuncJon
Va Vb Vc Vd
Da Db Dc Dd
0
1 1
0
0
2
1
1
4 1
0
3
Parameter
2
5
4
2
6
3
3
7Label l0
Label l1
+∑(a,b) θab;f(a)f(b) Q(f; θ) = ∑a θa;f(a)
![Page 14: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/14.jpg)
Overview• Basics:problemformulaJon
– EnergyFuncJon– MAPEsJmaJon– CompuJngmin-marginals– ReparameterizaJon
• SoluJons
– BeliefPropagaJonandrelatedmethods[Lecture2]– Graphcuts[Lecture3]
![Page 15: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/15.jpg)
MAPEsJmaJon
Va Vb Vc Vd
2
5
4
2
6
3
3
7
0
1 1
0
0
2
1
1
4 1
0
3
Q(f; θ) = ∑a θa;f(a) + ∑(a,b) θab;f(a)f(b)
2 + 1 + 2 + 1 + 3 + 1 + 3 = 13
Label l0
Label l1
![Page 16: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/16.jpg)
MAPEsJmaJon
Va Vb Vc Vd
2
5
4
2
6
3
3
7
0
1 1
0
0
2
1
1
4 1
0
3
Q(f; θ) = ∑a θa;f(a) + ∑(a,b) θab;f(a)f(b)
5 + 1 + 4 + 0 + 6 + 4 + 7 = 27
Label l0
Label l1
![Page 17: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/17.jpg)
MAPEsJmaJon
Va Vb Vc Vd
2
5
4
2
6
3
3
7
0
1 1
0
0
2
1
1
4 1
0
3
Q(f; θ) = ∑a θa;f(a) + ∑(a,b) θab;f(a)f(b)
f* = arg min Q(f; θ)
q* = min Q(f; θ) = Q(f*; θ)
Label l0
Label l1
Equivalent to maximizing the associated probability
![Page 18: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/18.jpg)
MAPEsJmaJon
f(a) f(b) f(c) f(d) Q(f; θ) 0 0 0 0 18 0 0 0 1 15 0 0 1 0 27 0 0 1 1 20 0 1 0 0 22 0 1 0 1 19 0 1 1 0 27 0 1 1 1 20
16 possible labellings
f(a) f(b) f(c) f(d) Q(f; θ) 1 0 0 0 16 1 0 0 1 13 1 0 1 0 25 1 0 1 1 18 1 1 0 0 18 1 1 0 1 15 1 1 1 0 23 1 1 1 1 16
f* = {1, 0, 0, 1} q* = 13
![Page 19: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/19.jpg)
ComputaJonalComplexity
|V| = number of pixels ≈ 153600
Segmentation
2|V|
Can we do better than brute-force?
MAP Estimation is NP-hard !!
![Page 20: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/20.jpg)
MAPInference/EnergyMinimizaJon• CompuJngtheassignmentminimizingtheenergyinNP-hardingeneral
• Exactinferenceispossibleinsomecases,e.g.,– Lowtreewidthgraphsàmessage-passing– SubmodularpotenJalsàgraphcuts
• Efficientapproximateinferencealgorithmsexist– Messagepassingongeneralgraphs– Move-makingalgorithms– RelaxaJonalgorithms
![Page 21: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/21.jpg)
Overview• Basics:problemformulaJon
– EnergyFuncJon– MAPEsJmaJon– CompuJngmin-marginals– ReparameterizaJon
• SoluJons
– BeliefPropagaJonandrelatedmethods[Lecture2]– Graphcuts[Lecture3]
![Page 22: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/22.jpg)
Min-Marginals
Va Vb Vc Vd
2
5
4
2
6
3
3
7
0
1 1
0
0
2
1
1
4 1
0
3
f* = arg min Q(f; θ) such that f(a) = i
Min-marginal qa;i
Label l0
Label l1
Not a marginal (no summation)
![Page 23: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/23.jpg)
Min-Marginals16 possible labellings qa;0 = 15 f(a) f(b) f(c) f(d) Q(f; θ) 0 0 0 0 18 0 0 0 1 15 0 0 1 0 27 0 0 1 1 20 0 1 0 0 22 0 1 0 1 19 0 1 1 0 27 0 1 1 1 20
f(a) f(b) f(c) f(d) Q(f; θ) 1 0 0 0 16 1 0 0 1 13 1 0 1 0 25 1 0 1 1 18 1 1 0 0 18 1 1 0 1 15 1 1 1 0 23 1 1 1 1 16
![Page 24: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/24.jpg)
Min-Marginals16 possible labellings qa;1 = 13
f(a) f(b) f(c) f(d) Q(f; θ) 1 0 0 0 16 1 0 0 1 13 1 0 1 0 25 1 0 1 1 18 1 1 0 0 18 1 1 0 1 15 1 1 1 0 23 1 1 1 1 16
f(a) f(b) f(c) f(d) Q(f; θ) 0 0 0 0 18 0 0 0 1 15 0 0 1 0 27 0 0 1 1 20 0 1 0 0 22 0 1 0 1 19 0 1 1 0 27 0 1 1 1 20
![Page 25: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/25.jpg)
Min-MarginalsandMAP• Minimum min-marginal of any variable = energy of MAP labelling
minf Q(f; θ) such that f(a) = i
qa;i mini
mini ( )
Va has to take one label
minf Q(f; θ)
![Page 26: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/26.jpg)
Summary
MAP Estimation
f* = arg min Q(f; θ)
Q(f; θ) = ∑a θa;f(a) + ∑(a,b) θab;f(a)f(b)
Min-marginals
qa;i = min Q(f; θ) s.t. f(a) = i
Energy Function
![Page 27: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/27.jpg)
Overview• Basics:problemformulaJon
– EnergyFuncJon– MAPEsJmaJon– CompuJngmin-marginals– ReparameterizaJon
• SoluJons
– BeliefPropagaJonandrelatedmethods[Lecture2]– Graphcuts[Lecture3]
![Page 28: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/28.jpg)
ReparameterizaJon
f(a) f(b) Q(f; θ)
0 0 7 + 2 - 2
0 1 10 + 2 - 2
1 0 5 + 2 - 2
1 1 6 + 2 - 2
Add a constant to all θa;i
Subtract that constant from all θb;k
Q(f; θ’) = Q(f; θ)
Va Vb
2
5
4
2
0
0
2 +
2 +
- 2
- 2
1 1
![Page 29: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/29.jpg)
ReparameterizaJon
Va Vb
2
5
4
2
0
1 1
0
f(a) f(b) Q(f; θ)
0 0 7
0 1 10 - 3 + 3
1 0 5
1 1 6 - 3 + 3
- 3 + 3- 3
Q(f; θ’) = Q(f; θ)
Add a constant to one θb;k
Subtract that constant from θab;ik for all ‘i’
![Page 30: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/30.jpg)
ReparameterizaJon
Q(f; θ’) = Q(f; θ), for all f
θ’ is a reparameterization of θ, iff
θ’ ≡ θ
θ’b;k = θb;k
θ’a;i = θa;i
θ’ab;ik = θab;ik
+ Mab;k
- Mab;k
+ Mba;i
- Mba;i
Equivalently Kolmogorov, PAMI, 2006
Va Vb
2
5
4
2
0
0
2 +
2 +
- 2
- 2
1 1
![Page 31: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/31.jpg)
RecapMAP Estimation
f* = arg min Q(f; θ) Q(f; θ) = ∑a θa;f(a) + ∑(a,b) θab;f(a)f(b)
Min-marginals
qa;i = min Q(f; θ) s.t. f(a) = i
Q(f; θ’) = Q(f; θ), for all f θ’ ≡ θ Reparameterization
![Page 32: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/32.jpg)
Overview• Basics:problemformulaJon
– EnergyFuncJon– MAPEsJmaJon– CompuJngmin-marginals– ReparameterizaJon
• SoluJons
– BeliefPropagaJonandrelatedmethods[Lecture2]– Graphcuts[Lecture3]
![Page 33: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/33.jpg)
BeliefPropagaJon
• Belief Propagation gives exact MAP for chains
• Remember, some MAP problems are easy
• Exact MAP for trees
• Clever Reparameterization
![Page 34: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/34.jpg)
TwoVariables
Va Vb
2
5 2
1
0Va Vb
2
5
40
1
Choose the right constant θ’b;k = qb;k
Add a constant to one θb;k
Subtract that constant from θab;ik for all ‘i’
![Page 35: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/35.jpg)
Va Vb
2
5 2
1
0Va Vb
2
5
40
1
Choose the right constant θ’b;k = qb;k
θa;0 + θab;00 = 5 + 0
θa;1 + θab;10 = 2 + 1 min Mab;0 =
TwoVariables
![Page 36: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/36.jpg)
Va Vb
2
5 5
-2
-3Va Vb
2
5
40
1
Choose the right constant θ’b;k = qb;k
f(a) = 1
θ’b;0 = qb;0
TwoVariables
Potentials along the red path add up to 0
![Page 37: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/37.jpg)
Va Vb
2
5 5
-2
-3Va Vb
2
5
40
1
Choose the right constant θ’b;k = qb;k
θa;0 + θab;01 = 5 + 1
θa;1 + θab;11 = 2 + 0 min Mab;1 =
TwoVariables
![Page 38: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/38.jpg)
Va Vb
2
5 5
-2
-3Va Vb
2
5
6-2
-1
Choose the right constant θ’b;k = qb;k
f(a) = 1
θ’b;0 = qb;0
f(a) = 1
θ’b;1 = qb;1
Minimum of min-marginals = MAP estimate
TwoVariables
![Page 39: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/39.jpg)
Va Vb
2
5 5
-2
-3Va Vb
2
5
6-2
-1
Choose the right constant θ’b;k = qb;k
f(a) = 1
θ’b;0 = qb;0
f(a) = 1
θ’b;1 = qb;1
f*(b) = 0 f*(a) = 1
TwoVariables
![Page 40: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/40.jpg)
Va Vb
2
5 5
-2
-3Va Vb
2
5
6-2
-1
Choose the right constant θ’b;k = qb;k
f(a) = 1
θ’b;0 = qb;0
f(a) = 1
θ’b;1 = qb;1
We get all the min-marginals of Vb
TwoVariables
![Page 41: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/41.jpg)
RecapWe only need to know two sets of equations
General form of Reparameterization
θ’a;i = θa;i
θ’ab;ik = θab;ik
+ Mab;k
- Mab;k
+ Mba;i
- Mba;i
θ’b;k = θb;k
Reparameterization of (a,b) in Belief Propagation
Mab;k = mini { θa;i + θab;ik } Mba;i = 0
![Page 42: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/42.jpg)
Three Variables
Va Vb
2
5 2
1
0Vc
4 60
1
0
1
3
2 3
Reparameterize the edge (a,b) as before
l0
l1
![Page 43: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/43.jpg)
Va Vb
2
5 5-3Vc
6 60
1
-2
3
Reparameterize the edge (a,b) as before
f(a) = 1
f(a) = 1
Potentials along the red path add up to 0
-2 -1 2 3
Three Variables
l0
l1
![Page 44: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/44.jpg)
Va Vb
2
5 5-3Vc
6 60
1
-2
3
Reparameterize the edge (b,c) as before
f(a) = 1
f(a) = 1
Potentials along the red path add up to 0
-2 -1 2 3
Three Variables
l0
l1
![Page 45: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/45.jpg)
Va Vb
2
5 5-3Vc
6 12-6
-5
-2
9
Reparameterize the edge (b,c) as before
f(a) = 1
f(a) = 1
Potentials along the red path add up to 0
f(b) = 1
f(b) = 0
qc;0
qc;1 -2 -1 -4 -3
Three Variables
l0
l1
![Page 46: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/46.jpg)
Va Vb
2
5 5-3Vc
6 12-6
-5
-2
9
f(a) = 1
f(a) = 1
f(b) = 1
f(b) = 0
qc;0
qc;1
f*(c) = 0 f*(b) = 0 f*(a) = 1 Generalizes to any length chain
-2 -1 -4 -3
Three Variables
l0
l1
![Page 47: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/47.jpg)
Va Vb
2
5 5-3Vc
6 12-6
-5
-2
9
f(a) = 1
f(a) = 1
f(b) = 1
f(b) = 0
qc;0
qc;1
f*(c) = 0 f*(b) = 0 f*(a) = 1 Only Dynamic Programming
-2 -1 -4 -3
Three Variables
l0
l1
![Page 48: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/48.jpg)
Why Dynamic Programming?
3 variables ≡ 2 variables + book-keeping n variables ≡ (n-1) variables + book-keeping
Start from left, go to right
Reparameterize current edge (a,b) Mab;k = mini { θa;i + θab;ik }
θ’ab;ik = θab;ik + Mab;k - Mab;k θ’b;k = θb;k
Repeat
![Page 49: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/49.jpg)
Why Dynamic Programming?
Start from left, go to right
Reparameterize current edge (a,b) Mab;k = mini { θa;i + θab;ik }
θ’ab;ik = θab;ik + Mab;k - Mab;k θ’b;k = θb;k
Repeat
Messages Message Passing
Why stop at dynamic programming?
![Page 50: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/50.jpg)
Va Vb
2
5 9-3Vc
11 12-11
-9
-2
9
Reparameterize the edge (c,b) as before
-2 -1 -9 -7
θ’b;i = qb;i
Three Variables
l0
l1
![Page 51: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/51.jpg)
Va Vb
9
11 9-9Vc
11 12-11
-9
-9
9
Reparameterize the edge (b,a) as before
-9 -7 -9 -7
θ’a;i = qa;i
Three Variables
l0
l1
![Page 52: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/52.jpg)
Va Vb
9
11 9-9Vc
11 12-11
-9
-9
9
Forward Pass è ç Backward Pass
-9 -7 -9 -7
All min-marginals are computed
Three Variables
l0
l1
![Page 53: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/53.jpg)
Chains
X1 X2 X3 Xn……..
Reparameterizetheedge(1,2)
![Page 54: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/54.jpg)
Chains
X1 X2 X3 Xn……..
Reparameterizetheedge(2,3)
![Page 55: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/55.jpg)
Chains
X1 X2 X3 Xn……..
Reparameterizetheedge(n-1,n)
Min-marginalsen(i)foralllabels
![Page 56: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/56.jpg)
BeliefPropagaJononChains
Start from left, go to right
Reparameterize current edge (a,b) Mab;k = mini { θa;i + θab;ik }
θ’ab;ik = θab;ik + Mab;k - Mab;k θ’b;k = θb;k
Repeat till the end of the chain
Start from right, go to left
Repeat till the end of the chain
![Page 57: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/57.jpg)
BeliefPropagaJononChains
• A way of computing reparam constants
• Generalizes to chains of any length
• Forward Pass - Start to End • MAP estimate • Min-marginals of final variable
• Backward Pass - End to start • All other min-marginals
![Page 58: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/58.jpg)
ComputaJonalComplexity
NumberofreparameterizaJonconstants=(n-1)h
Complexityforeachconstant=O(h)
Totalcomplexity=O(nh2)
Be>erthanbrute-forceO(hn)
Totalcomplexity
![Page 59: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/59.jpg)
Trees
X2
X1
X3
X4 X5 X6 X7
Reparameterizetheedge(4,2)
![Page 60: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/60.jpg)
Trees
X2
X1
X3
X4 X5 X6 X7
Reparameterizetheedge(5,2)
![Page 61: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/61.jpg)
Trees
X2
X1
X3
X4 X5 X6 X7
Reparameterizetheedge(6,3)
![Page 62: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/62.jpg)
Trees
X2
X1
X3
X4 X5 X6 X7
Reparameterizetheedge(7,3)
![Page 63: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/63.jpg)
Trees
X2
X1
X3
X4 X5 X6 X7
Reparameterizetheedge(3,1)
Min-marginalse1(i)foralllabels
![Page 64: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/64.jpg)
Trees
X2
X1
X3
X4 X5 X6 X7
Startfromleavesandmovetowardsroot
Picktheminimumofmin-marginals
Backtracktofindthebestlabelingx
![Page 65: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/65.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
Where do we start? Arbitrarily
θa;0
θa;1
θb;0
θb;1
θd;0
θd;1
θc;0
θc;1
Reparameterize (a,b)
![Page 66: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/66.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θ’b;0
θ’b;1
θd;0
θd;1
θc;0
θc;1
Potentials along the red path add up to 0
![Page 67: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/67.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θ’b;0
θ’b;1
θd;0
θd;1
θ’c;0
θ’c;1
Potentials along the red path add up to 0
![Page 68: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/68.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Potentials along the red path add up to 0
![Page 69: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/69.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Potentials along the red path add up to 0
- θa;0
- θa;1
θ’a;0 - θa;0 = qa;0 θ’a;1 - θa;1 = qa;1
![Page 70: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/70.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Pick minimum min-marginal. Follow red path.
- θa;0
- θa;1
θ’a;0 - θa;0 = qa;0 θ’a;1 - θa;1 = qa;1
![Page 71: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/71.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θ’b;0
θ’b;1
θd;0
θd;1
θc;0
θc;1
Potentials along the red path add up to 0
![Page 72: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/72.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θ’b;0
θ’b;1
θd;0
θd;1
θ’c;0
θ’c;1
Potentials along the red path add up to 0
![Page 73: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/73.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Potentials along the red path add up to 0
![Page 74: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/74.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Potentials along the red path add up to 0
- θa;0
- θa;1
θ’a;1 - θa;1 = qa;1 θ’a;0 - θa;0 = qa;0 ≤
![Page 75: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/75.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Problem Solved
- θa;0
- θa;1
θ’a;1 - θa;1 = qa;1 θ’a;0 - θa;0 = qa;0 ≤
![Page 76: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/76.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’b;0
θ’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Problem Not Solved
- θa;0
- θa;1
θ’a;1 - θa;1 = qa;1 θ’a;0 - θa;0 = qa;0 ≥
![Page 77: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/77.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’’b;0
θ’’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Reparameterize (a,b) again
But doesn’t this overcount some potentials?
![Page 78: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/78.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’’b;0
θ’’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Reparameterize (a,b) again
Yes. But we will do it anyway
![Page 79: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/79.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θ’a;0
θ’a;1
θ’’b;0
θ’’b;1
θ’d;0
θ’d;1
θ’c;0
θ’c;1
Keep reparameterizing edges in some order
Hope for convergence and a good solution
![Page 80: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/80.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;0
θa;1
θb;0
θb;1
θd;0
θd;1
θc;0
θc;1
AnysuggesJons? FixVatolabell0
![Page 81: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/81.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
AnysuggesJons? FixVatolabell0
θa;0 θb;0
θb;1
θd;0
θd;1
θc;0
θc;1
Equivalenttoatree-structuredproblem
![Page 82: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/82.jpg)
BeliefPropagaJononCycles
Va Vb
Vd Vc
θa;1
θb;0
θb;1
θd;0
θd;1
θc;0
θc;1
AnysuggesJons? FixVatolabell1Equivalenttoatree-structuredproblem
![Page 83: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/83.jpg)
BeliefPropagaJononCycles
ChoosetheminimumenergysoluJon
Va Vb
Vd Vc
θa;0
θa;1
θb;0
θb;1
θd;0
θd;1
θc;0
θc;1
Thisapproachquicklybecomesinfeasible
![Page 84: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/84.jpg)
LoopyBeliefPropagaJon
V1 V2 V3
V4 V5 V6
V7 V8 V9
Keepreparameterizingedgesinsomeorder
HopeforconvergenceandagoodsoluJon
![Page 85: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/85.jpg)
Belief Propagation
• Generalizes to any arbitrary random field
• Complexity per iteration ?
O(nh2) • Memory required ?
O(nh)
![Page 86: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/86.jpg)
Computational Issues of BP Complexity per iteration O(nh2)
Special Pairwise Potentials θab;ik = wabd(|i-k|)
i - k
d
Potts i - k
d
Truncated Linear i - k
d
Truncated Quadratic
O(nh) Felzenszwalb & Huttenlocher, 2004
![Page 87: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/87.jpg)
SummaryofBP
Exact for chains
Exact for trees
Approximate MAP for general cases
Not even convergence guaranteed
So can we do something better?
![Page 88: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/88.jpg)
ResultsObjectDetecJon FelzenszwalbandHu>enlocher,2004
H
TA1 A2
L1 L2
Labels-Posesofparts
UnaryPotenJals:FracJonofforegroundpixels
PairwisePotenJals:FavourValidConfiguraJons
![Page 89: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/89.jpg)
ResultsObjectDetecJon FelzenszwalbandHu>enlocher,2004
![Page 90: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/90.jpg)
ResultsBinarySegmentaJon Szeliskietal.,2008
Labels-{foreground,background}
UnaryPotenJals:-log(likelihood)usinglearntfg/bgmodels
PairwisePotenJals:0,ifsamelabels1-λexp(|Da-Db|),ifdifferentlabels
![Page 91: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/91.jpg)
ResultsBinarySegmentaJon
Labels-{foreground,background}
UnaryPotenJals:-log(likelihood)usinglearntfg/bgmodels
Szeliskietal.,2008
PairwisePotenJals:0,ifsamelabels1-λexp(|Da-Db|),ifdifferentlabels
BeliefPropagaJon
![Page 92: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/92.jpg)
ResultsBinarySegmentaJon
Labels-{foreground,background}
UnaryPotenJals:-log(likelihood)usinglearntfg/bgmodels
Szeliskietal.,2008
GlobalopJmum
PairwisePotenJals:0,ifsamelabels1-λexp(|Da-Db|),ifdifferentlabels
![Page 93: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/93.jpg)
ResultsSzeliskietal.,2008
Labels-{dispariJes}
UnaryPotenJals:Similarityofpixelcolours
PairwisePotenJals:0,ifsamelabels1-λexp(|Da-Db|),ifdifferentlabels
StereoCorrespondence
![Page 94: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/94.jpg)
ResultsSzeliskietal.,2008
Labels-{dispariJes}
UnaryPotenJals:Similarityofpixelcolours
PairwisePotenJals:0,ifsamelabels1-λexp(|Da-Db|),ifdifferentlabels
BeliefPropagaJon
StereoCorrespondence
![Page 95: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/95.jpg)
ResultsSzeliskietal.,2008
Labels-{dispariJes}
UnaryPotenJals:Similarityofpixelcolours
GlobalopJmum
PairwisePotenJals:0,ifsamelabels1-λexp(|Da-Db|),ifdifferentlabels
StereoCorrespondence
![Page 96: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/96.jpg)
OtheralternaJves
• TRW, Dual decomposition methods
• Integer linear programming and relaxation
• Extensively studied - Schlesinger, 1976 - Koster et al., 1998, Chekuri et al., ’01, Archer et al., ’04 - Wainwright et al., 2001, Kolmogorov, 2006 - Globerson and Jaakkola, 2007, Komodakis et al., 2007 - Kumar et al., 2007, Sontag et al., 2008, Werner, 2008 - Batra et al., 2011, Werner, 2011, Zivny et al., 2014
![Page 97: Graphical Models Inference and Learning Lecture 2 · 2018-12-05 · Graphical Models Inference and Learning Lecture 2 MVA 2018 – 2019 h>p: ... • Graphical Models – Making global](https://reader035.vdocuments.mx/reader035/viewer/2022062920/5f0220e07e708231d402b64a/html5/thumbnails/97.jpg)
Wheredowestand?
Chain/Tree, 2-label: Use BP
Chain/Tree, multi-label: Use BP
Grid graph: Use TRW, dual decomposition, relaxation