English

The continuous Bernoulli: fixing a pervasive error in variational autoencoders

Machine Learning 2020-01-01 v5 Machine Learning

Abstract

Variational autoencoders (VAE) have quickly become a central tool in machine learning, applicable to a broad range of data types and latent variable models. By far the most common first step, taken by seminal papers and by core software libraries alike, is to model MNIST data using a deep network parameterizing a Bernoulli likelihood. This practice contains what appears to be and what is often set aside as a minor inconvenience: the pixel data is [0,1] valued, not {0,1} as supported by the Bernoulli likelihood. Here we show that, far from being a triviality or nuisance that is convenient to ignore, this error has profound importance to VAE, both qualitative and quantitative. We introduce and fully characterize a new [0,1]-supported, single parameter distribution: the continuous Bernoulli, which patches this pervasive bug in VAE. This distribution is not nitpicking; it produces meaningful performance improvements across a range of metrics and datasets, including sharper image samples, and suggests a broader class of performant VAE.

Keywords

Cite

@article{arxiv.1907.06845,
  title  = {The continuous Bernoulli: fixing a pervasive error in variational autoencoders},
  author = {Gabriel Loaiza-Ganem and John P. Cunningham},
  journal= {arXiv preprint arXiv:1907.06845},
  year   = {2020}
}

Comments

Accepted at NeurIPS 2019

R2 v1 2026-06-23T10:21:52.425Z