ELBO surgery: yet another way to carve up the variational evidence lower bound

Hoffman M. & Johnson M. ELBO surgery: yet another way to carve up the variational evidence lower bound. NIPS, 2016.

这篇文章主要介绍了一种ELBO一种新的改写, 以及可以从中获得的一些启发.

主要内容

\[\log p_{\theta}(\bm{x}) = \log \int p_{\theta}(\bm{z}, \bm{x}) \mathrm{d}\bm{z} =\log \int q_{\phi}(\bm{z}|\bm{x}) \frac{p_{\theta}(\bm{z}, \bm{x})}{q_{\phi}(\bm{z}|\bm{x})} \mathrm{d}\bm{z} \ge \mathbb{E}_{q_{\phi}(\bm{z}|\bm{x})}\log \frac{p_{\theta}(\bm{z}, \bm{x})}{q_{\phi}(\bm{z}|\bm{x})} \mathrm{d}\bm{z} := \mathcal{L}(\theta, \phi). \]

上式是一般的ELBO的推导, 我们的目的就是通过最大化\(\mathcal{L}\)以期望相应的似然函数足够大.

ELBO有下列的表示:

Evidence minus posterior KL

\[\mathcal{L}(\theta, \phi) = \log p_{\theta}(\bm{x}) - \mathrm{KL} (q_{\phi}(\bm{z|x})\| p_{\theta}(\bm{z}|\bm{x})). \]

最大化\(\mathcal{L}\), 且后验分布拟合的足够好的话, 我们可以期望相应的(对数)似然也足够大.

Average negative energy plus entropy

\[\mathcal{L}(\theta, \phi) = \mathbb{E}_{q_{\phi}(\bm{z}|\bm{x})}[\log p_{\theta}(\bm{z}, \bm{x})] + \mathbb{H}[q_{\phi}(\bm{z|x})]. \]

这里\(\mathbb{H}\)代表熵.

就是一个好的(拟合的)后验分布应该集中于分布的最大值, 但尽量让自己本身的熵也足够大(如果没有第二项, 那拟合的后验分布就会退化成一个点).

Average term-by-term reconstruction minus KL to prior

\[\mathcal{L}(\theta, \phi) =\frac{1}{N}\sum_{n=1}^N \mathbb{E}_{q_{\phi}(z_n|x_n)}[\log p_{\theta}(x_n|z_n)] - \mathrm{KL}(q_{\phi}(z_n|x_n) \| p(z_n)). \]

这个就是我们比较常见的ELBO的一种表达方式, 也就是一个重构误差减去后验分布和先验分布的一个KL散度.

本文的思路

假设\(q(x_n) = \frac{1}{N}, n=1,\cdots, N\).

\[\mathcal{L}(\theta, \phi) =\mathbb{E}_{q(x)} \mathbb{E}_{q_{\phi}(z|x)}\log \frac{p_{\theta}(x, z)}{q_{\phi}(z|x)} =\mathbb{E}_{q(x)} \mathbb{E}_{q_{\phi}(z|x)}\log p_{\theta}(x|z) + \mathbb{E}_{q_{\phi}(z)}\log p(z) + \mathbb{E}_{q(x)}[\mathbb{H}(q_{\phi}(z|x))]. \]

其可以进一步表示为:

\[\mathcal{L}(\theta, \phi) =\mathbb{E}_{q(x)} \mathbb{E}_{q_{\phi}(z|x)}\log p_{\theta}(x|z) -(\log N - \mathbb{E}_{q_{\phi}(z)}[\mathbb{H}[q(x|z)]]) -\mathrm{KL}(q_{\phi}(z)\| p(z)). \]

注: 这里\(q_{\phi}(z) = \frac{1}{n} \sum_{n=1}^N q_{\phi}(z|x_n)\).

注意到上面只有最后一项与先验分布有关, 所以为了提高ELBO, 这要求我们选择一个合适的先验分布\(p(z)\).
当然, 最好就是\(q_{\phi}(z)\), 但是这个计算量太大.

posted @ 2021-03-19 17:24  馒头and花卷  阅读(195)  评论(0编辑  收藏  举报