Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a GumbelSoftmaxReparam #2693

Merged
merged 1 commit into from
Nov 7, 2020
Merged

Implement a GumbelSoftmaxReparam #2693

merged 1 commit into from
Nov 7, 2020

Conversation

fritzo
Copy link
Member

@fritzo fritzo commented Nov 6, 2020

This adds a reparametrizer for the Gumbel-Softmax trick.

The reparametrizer replaces a d-dimensional RelaxedOneHotCategorical with a d-dimensional Uniform(0,1) distribution whose samples are first transformed to be Gumbel distributed and then passed through the softmax trick.

The motivation is that, when unimodal autoguides try to learn the posterior of a R.O.H.C. distribution they are only able to capture a single mode, i.e. a single category. By instead learning the posterior in pre-softmax space, a single mode can then be softmax-transformed to a multimodal posterior, with one mode per category. Thus this reparametrizer allows naive autoguides like AutoNormal to capture multimodal posteriors.

Tested

@martinjankowiak martinjankowiak merged commit 9e4380d into dev Nov 7, 2020
@fritzo
Copy link
Member Author

fritzo commented Nov 7, 2020

Thanks for reviewing!

@fritzo fritzo deleted the softmax-reparam branch September 27, 2021 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants