1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Approximate Inferenceのevidence lower boundとVariational Autoencodersのvariational lower boundの等価の証明

Last updated at Posted at 2019-09-01

Variational Autoencoders (VAE)の論文Auto-Encoding Variational Bayesを読んだ時、式(1)にあるp(z|x)が、式(3)の中にp(z)になったところに引っかかって、簡単ですが、この証明を記載したいと思います。
式(1)
Screen Shot 2019-09-01 at 19.00.40.png
式(3)
Screen Shot 2019-09-01 at 19.01.16.png

evidence lower bound (ELBO)

式(1)はevidence lower bound (ELBO)の定義です。Deep Learning本の第19章Approximate InferenceにELBOを結構利用しています。式(3)はVAEの実装に使っているlower bound。式(1)にあるp(z|x)はほとんど解けないので、p(z|x)がない方の式(3)で実装しやすいです。

ELBOとVAEのvariational lower boundが等価の証明

\begin{split}
\mathcal{L}

&= 
log p(x)-D_{KL}(q(z|x)\|p(z|x))
\\

&=
logp(x)-\mathbb{E}_{z\sim q}log\frac{q(z|x)}{p(z|x)}
\\

&=
logp(x)-\mathbb{E}_{z\sim q}log\frac{q(z|x)}{\frac{p(z,x)}{p(x)}}
\\

&=
logp(x)-\mathbb{E}_{z\sim q}log\frac{q(z|x)p(x)}{p(z,x)}
\\

&=
logp(x)-\mathbb{E}_{z\sim q}log\frac{q(z|x)p(x)}{p(z)p(x|z)}
\\

&=
-\mathbb{E}_{z\sim q}log\frac{q(z|x)}{p(z)p(x|z)}
\\

&=
\mathbb{E}_{z\sim q}logp(x|z)-\mathbb{E}_{z\sim q}log\frac{q(z|x)}{p(z)}
\\

&=
\mathbb{E}_{z\sim q}logp(x|z)-D_{KL}(q(z|x)\|p(z))

\end{split}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?