Inference and Representation
David Sontag
New York University
Lecture 2, September 9, 2014
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 1 / 37
Inference and Representation David Sontag New York University - - PowerPoint PPT Presentation
Inference and Representation David Sontag New York University Lecture 2, September 9, 2014 David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 1 / 37 Todays lecture Markov random fields Factor graphs 1 Bayesian
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 1 / 37
1
2
3
3
4
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 2 / 37
1
2
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 3 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 4 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 5 / 37
Z1 Z2 Z3 Z4
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 6 / 37
x1,...,ˆ xn
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 7 / 37
x1,...,ˆ xn
B A C 10 1 1 10 A B 1 1
φA,B(a, b) =
10 1 1 10 B C 1 1
φB,C(b, c) = φA,C(a, c) =
10 1 1 10 A C 1 1
a,ˆ b,ˆ c∈{0,1}3
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 8 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 9 / 37
XA XB XC
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 10 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 11 / 37
X
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 12 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 13 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 14 / 37
= +1 = -1
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 15 / 37
= +1 = -1
i<j
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 16 / 37
A C B D
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 17 / 37
A C B D A C B D A C B D
Markov network Factor graphs
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 18 / 37
Y2 Y1 Y3 Y4 Y5 Y6
fA fB fC f1 f2 f3 f4 f5 f6
X2 X1 X3 X4 X5 X6
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 19 / 37
Y2 Y1 Y3 Y4 Y5 Y6
fA fB fC f1 f2 f3 f4 f5 f6
X2 X1 X3 X4 X5 X6
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 20 / 37
X1 X2 X3 X4 X5 X6 Y1 Y2 Y3 Y4 Y5 Y6
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 21 / 37
1
2
A C B D A C B D
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 22 / 37
1
A C B D A C B D
2
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 23 / 37
XA XB XC
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 24 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 25 / 37
1
2
3
3
4
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 26 / 37
Y X
Y X
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 27 / 37
Y X1 X2 X3 Xn
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 28 / 37
Y X
Y X
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 29 / 37
Generative Discriminative
Y X1 X2 X3 Xn
Y X1 X2 X3 Xn
1
2
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 30 / 37
1 In the generative model, how do we parameterize p(Xi | Xpa(i), Y )? 2 In the discriminative model, how do we parameterize p(Y | X)?
Generative Discriminative
Y X1 X2 X3 Xn
Y X1 X2 X3 Xn
1 For the generative model, assume that Xi ⊥ X−i | Y (naive Bayes) 2 For the discriminative model, assume that
i=1 αixi
(To simplify the story, we assume Xi ∈ {0, 1}) David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 31 / 37
1 For the generative model, assume that Xi ⊥ X−i | Y (naive Bayes)
Y X1 X2 X3 Xn
Y X1 X2 X3 Xn
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 32 / 37
2 For the discriminative model, assume that
i=1 αixi
i=1 αixi =
i=1 αixi
Y X1 X2 X3 Xn
z
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 33 / 37
1 For the generative model, assume that Xi ⊥ X−i | Y (naive Bayes) 2 For the discriminative model, assume that
i=1 αixi
i=1 αixi =
i=1 αixi
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 34 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 35 / 37
y
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 36 / 37
David Sontag (NYU) Inference and Representation Lecture 2, September 9, 2014 37 / 37