Inference and Representation
David Sontag
New York University
Lecture 1, September 2, 2014
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 1 / 47
Inference and Representation David Sontag New York University - - PowerPoint PPT Presentation
Inference and Representation David Sontag New York University Lecture 1, September 2, 2014 David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 1 / 47 One of the most exciting advances in machine learning (AI, signal
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 1 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 2 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 3 / 47
1 Represent the world as a collection of random variables X1, . . . , Xn
2 Learn the distribution from data 3 Perform “inference” (compute conditional distributions
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 4 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 5 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 6 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 7 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 8 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 9 / 47
1 Represent the world as a collection of random variables X1, . . . , Xn
2 Learn the distribution from data
3 Perform “inference” (compute conditional distributions
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 10 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 11 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 12 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 13 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 14 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 15 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 16 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 17 / 47
1
2
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 18 / 47
Grade Letter SAT Intelligence Difficulty d1 d0
0.6 0.4
i1 i0
0.7 0.3
i0 i1 s1 s0
0.95 0.2 0.05 0.8
g1 g2 g2 l1 l 0
0.1 0.4 0.99 0.9 0.6 0.01
i0,d0 i0,d1 i0,d0 i0,d1 g2 g3 g1
0.3 0.05 0.9 0.5 0.4 0.25 0.08 0.3 0.3 0.7 0.02 0.2
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 19 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 20 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 21 / 47
Y X1 X2 X3 Xn
Features Label
1
2
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 22 / 47
Grade Letter SAT Intelligence Difficulty
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 23 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 24 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 25 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 26 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 27 / 47
(a) (b)
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 28 / 47
1
2
3
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 29 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 30 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 31 / 47
Y (a) (b) (c) (d) X Z Z X Y X Z Y Z X Y
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 32 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 33 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 34 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 35 / 47
X1 X2 X3 X4 X5 X6 Y1 Y2 Y3 Y4 Y5 Y6
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 36 / 47
X1 X2 X3 X4 X5 X6 Y1 Y2 Y3 Y4 Y5 Y6
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 37 / 47
1
2
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 38 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 39 / 47
+"/,9#)1 +.&),3&'(1 "65%51 :5)2,'0("'1 .&/,0,"'1
2,'3$1 4$3,5)%1 &(2,#)1 6$332,)%1 )+".()1 65)&65//1 )"##&.1 65)7&(65//1 8""(65//1
Words+w1,+…,+wN+
Distribu6on+of+topics+
weather+ .50+ finance+ .49+ sports+ .01+
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 40 / 47
1 Sample the document’s topic distribution θ (aka topic vector)
2 For i = 1 to N, sample the topic zi of the i’th word
3 ... and then sample the actual word wi from the zi’th topic
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 41 / 47
1
t=1 are hyperparameters.The Dirichlet density, defined over
t=1 θt = 1}, is:
T
t
α1 = α2 = α3 =
θ1 θ2 log Pr(θ) θ1 θ2 log Pr(θ)
α1 = α2 = α3 = David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 42 / 47
3 ... and then sample the actual word wi from the zi’th topic
poli6cs+.0100+ president+.0095+
washington+.0085+ religion+.0060+
βt =
religion+.0500+ hindu+.0092+ judiasm+.0080+ ethics+.0075+ buddhism+.0016+ sports+.0105+ baseball+.0100+ soccer+.0055+ basketball+.0050+ football+.0045+
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 43 / 47
gene 0.04 dna 0.02 genetic 0.01 .,, life 0.02 evolve 0.01
.,, brain 0.04 neuron 0.02 nerve 0.01 ... data 0.02 number 0.02 computer 0.01 .,,
Topics Documents Topic proportions and assignments
(Blei, Introduction to Probabilistic Topic Models, 2011) David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 44 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 45 / 47
i = 1 to N d = 1 to D
wid
Prior distribution
Topic of doc d Word
β
Topic-word distributions
θ zd α
Dirichlet hyperparameters i = 1 to N d = 1 to D
θd wid zid
Topic distribution for document Topic of word i of doc d Word
β
Topic-word distributions
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 46 / 47
David Sontag (NYU) Inference and Representation Lecture 1, September 2, 2014 47 / 47