Created
July 4, 2018 01:10
-
-
Save fehiepsi/7916400d8380cb05d21e859681b7a694 to your computer and use it in GitHub Desktop.
Renyi elbo derivation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Renyi variational bound\n", | |
"$$ \\mathcal{L} = \\frac{1}{1-\\alpha} \\log \\mathbb{E}_q \\left(\\frac{p}{q}\\right)^{1-\\alpha}. $$" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Putting $f = \\log(p) - \\log(q)$, we have\n", | |
"$$\n", | |
" \\mathcal{L} = \\frac{1}{1 - \\alpha} \\log{\\mathbb{E}_q\\left(e^{(1-\\alpha)f}\\right)}\n", | |
"$$\n", | |
"and\n", | |
"$$\n", | |
"\\nabla \\mathcal{L} = \\frac{1}{1 - \\alpha} \\frac{\\nabla \\mathbb{E}_q \\left(e^{(1-\\alpha)f}\\right)}{\\mathbb{E}_q\\left(e^{(1-\\alpha)f}\\right)}.\n", | |
"$$" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Reparameterizable\n", | |
"$$\n", | |
"\\nabla \\mathcal{L} = \\frac{\\mathbb{E}_q \\left(e^{(1-\\alpha)f}\\nabla f\\right)}{\\mathbb{E}_q\\left(e^{(1-\\alpha)f}\\right)} = \\mathbb{E}_q \\frac{e^{(1-\\alpha)f}}{\\mathbb{E}_q\\left(e^{(1-\\alpha)f}\\right)} \\nabla f = \\mathbb{E}_q \\left(w\\nabla f\\right),\n", | |
"$$\n", | |
"where $w$ is the weight with\n", | |
"$$\\log w = (1- \\alpha)f - \\log \\mathbb{E}_q\\left(e^{(1-\\alpha)f}\\right).$$" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Non-reparameterizable\n", | |
"Though have not been discussed in literature, similar to Pyro's [SVI Part III](http://pyro.ai/examples/svi_part_iii.html), we have\n", | |
"$$\n", | |
"\\nabla \\mathcal{L} = \\mathbb{E}_q \\left(w\\nabla f\\right) + \\frac{1}{1-\\alpha} \\frac{\\mathbb{E}_q \\left(e^{(1-\\alpha)f} \\nabla \\log q\\right)}{\\mathbb{E}_q\\left(e^{(1-\\alpha)f}\\right)} = \\mathbb{E}_q (w\\nabla f) + \\mathbb{E}_q \\left(\\frac{w}{1 - \\alpha}\\nabla \\log q\\right) .\n", | |
"$$" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python (pyro)", | |
"language": "python", | |
"name": "pyro" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment