CSC2541: Differentiable Inference and Generative Models
Lecture 2: Variational autoencoders
CSC2541: Differentiable Inference and Generative Models Lecture - - PowerPoint PPT Presentation
CSC2541: Differentiable Inference and Generative Models Lecture 2: Variational autoencoders Admin: TAs: Tony Wu (ywu@cs.toronto.edu) Kamal Rai (kamal.rai@mail.utoronto.ca) Extra seminar: Model-based Reinforcement learning
Lecture 2: Variational autoencoders
learning
papers covered
each
future directions
with a deep net:
y = fθ(x) p(y|x) = N(y|µ = fθ(x), Σ = gθ(x)) p(y|x) = Z fθ(x)p(θ)dθ p(y = c|x) = 1 Zθ exp([fθ(x)]c)
θ = SGD(θinit, ˆ grad(J)) ≈ argminθ(J) Ep(x) [grad(J)(θ, x)] = rθJ(θ)
function using reverse-mode automatic differentiation (backprop)
evaluating function
integrals given samples
posterior and Simple Monte Carlo! p(x|θ) = Z p(z)p(z|x, θ)dz p(x2|x1, θ) = Z p(x2|z)p(z|x1, θ)dz Ep(z|x,θ) [f(z|x, θ)] p(z|x, θ) = p(x|z, θ)p(z) R p(x|z0, θ)p(z0)dz0
Variational Inference
28
= Z q(z) log p(y|z) − Z q(z) log q(z) p(z)
= Eq(z)[log p(y|z)] KL[q(z)kp(z)]
Variational lower bound Jensen’s inequality
log p(y) ≥ Z q(z) log ✓ p(y|z)p(z) q(z) ◆ dz
log Z p(x)g(x)dx ≥ Z p(x) log g(x)dx
Integral problem
log p(y) = log Z p(y|z)p(z)dz
Importance Weight
log p(y) = log Z p(y|z)p(z) q(z)q(z)dz
Proposal
log p(y) = log Z p(y|z)p(z)q(z) q(z)dz
[from Shakir Mohamed]
parameters
theta, then each
p(x|θ) =
N
Y
i=1
(xi|zi, θ)p(zi)dθ q(zi|xi, θ)
specified by a neural network
usually specified by a neural network
estimate of Variational lower bound
with automatic differentiation for gradients
posterior
‘encoder’ and ‘decoder’ together
inference