Categorical Reparameterization with Gumbel-Softmax

Eric Jang, Shixiang Gu, Ben Poole
2016
4 references

Abstract

Categorical variables are a natural choice for representing discrete structure in the world. However, stochastic neural networks rarely use categorical latent variables due to the inability to backpropagate through samples. In this work, we present an efficient gradient estimator that replaces the non-differentiable sample from a categorical distribution with a differentiable sample from a novel Gumbel-Softmax distribution. This distribution has the essential property that it can be smoothly annealed into a categorical distribution. We show that our Gumbel-Softmax estimator outperforms state-of-the-art gradient estimators on structured output prediction and unsupervised generative modeling tasks with categorical latent variables, and enables large speedups on semi-supervised classification.

1 repository
2 references

Code References

â–¶ pytorch/pytorch
2 files
â–¶ docs/source/nn.functional.rst
1
L115 .. _Link 2: https://arxiv.org/abs/1611.01144
â–¶ torch/nn/functional.py
1
L2207 https://arxiv.org/abs/1611.01144
Link copied to clipboard!