Oops I Took A Gradient: Scalable Sampling for Discrete Distributions

Will Grathwohl, Kevin Swersky, Milad Hashemi, David Duvenaud, Chris J. Maddison
2/8/2021
cs.LG

Official code: wgrathwohl/GWG_release (61 stars, Python, last commit 2023-07-04).

Abstract

We propose a general and scalable approximate sampling strategy for probabilistic models with discrete variables. Our approach uses gradients of the likelihood function with respect to its discrete inputs to propose updates in a Metropolis-Hastings sampler.

Show full abstract

We show empirically that this approach outperforms generic samplers in a number of difficult settings including Ising models, Potts models, restricted Boltzmann machines, and factorial hidden Markov models. We also demonstrate the use of our improved sampler for training deep energy-based models on high dimensional discrete data. This approach outperforms variational auto-encoders and existing energy-based models. Finally, we give bounds showing that our approach is near-optimal in the class of samplers which propose local updates.

View on arXivView PDF

Code Implementations(1)

Official release of code for "Oops I Took A Gradient: Scalable Sampling for Discrete Distributions"

6113Python, ShellMay 11, 20213 years ago

Similar Papers

Cite this paper

@article{grathwohl2021oops,
  title  = {Oops I Took A Gradient: Scalable Sampling for Discrete Distributions},
  author = {Will Grathwohl and Kevin Swersky and Milad Hashemi and David Duvenaud and Chris J. Maddison},
  year   = {2021},
  eprint = {2102.04509},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.04509}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.04509.svg)](https://codeofpaper.com/paper/2102.04509)

Discussion