Latent Variable Models
Stefano Ermon, Aditya Grover
Stanford University
Lecture 5
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 1 / 28
Latent Variable Models Stefano Ermon, Aditya Grover Stanford - - PowerPoint PPT Presentation
Latent Variable Models Stefano Ermon, Aditya Grover Stanford University Lecture 5 Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 1 / 28 Recap of last lecture 1 Autoregressive models: Chain rule based factorization is
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 1 / 28
1 Autoregressive models:
2 Autoregressive models Pros:
3 Autoregressive models Cons:
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 2 / 28
1 Latent Variable Models
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 3 / 28
1 Lots of variability in images x due to gender, eye color, hair color,
2 Idea: explicitly model these factors using latent variables z Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 4 / 28
1 Only shaded variables x are observed in the data (pixel values) 2 Latent variables z correspond to high level features
3 Challenge: Very difficult to specify these conditionals by hand Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 5 / 28
1 z ∼ N(0, I) 2 p(x | z) = N (µθ(z), Σθ(z)) where µθ,Σθ are neural networks 3 Hope that after training, z will correspond to meaningful latent
4 As before, features can be computed via p(z | x) Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 6 / 28
1 z ∼ Categorical(1, · · · , K) 2 p(x | z = k) = N (µk, Σk)
1 Pick a mixture component k by sampling z 2 Generate a data point by sampling from that Gaussian Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 7 / 28
1 z ∼ Categorical(1, · · · , K) 2 p(x | z = k) = N (µk, Σk) 3 Clustering: The posterior p(z | x) identifies the mixture component 4 Unsupervised learning: We are hoping to learn from unlabeled data
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 8 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 9 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 10 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 11 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 12 / 28
1 z ∼ N(0, I) 2 p(x | z) = N (µθ(z), Σθ(z)) where µθ,Σθ are neural networks
exp(σ(b2z+d2))
3 Even though p(x | z) is simple, the marginal p(x) is very
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 13 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 14 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 15 / 28
1 z ∼ N(0, I) 2 p(x | z) = N (µθ(z), Σθ(z)) where µθ,Σθ are neural networks 3 Z are unobserved at train time (also called hidden or latent) 4 Suppose we have a model for the joint distribution. What is the
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 16 / 28
z p(x, z; θ) can be intractable. Suppose we have 30 binary
z p(x, z; θ) involves a sum with
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 17 / 28
1
2
k
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 18 / 28
1
2
k
k
q(z(1))
q(z(1))
Deep Generative Models Lecture 5 19 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 20 / 28
q(z)
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 21 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 22 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 23 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 24 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 25 / 28
i
i (1 − φi)(1−xtop i
)
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 26 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 27 / 28
Stefano Ermon, Aditya Grover (AI Lab) Deep Generative Models Lecture 5 28 / 28