Learning Discrete Distributions by Dequantization

Emiel Hoogeboom, Taco S. Cohen, Jakub M. Tomczak

TL;DR

This paper introduces a generalized latent variable framework for dequantization, the process of adding noise to discrete data (like digital images) so it can be modeled by continuous density functions. The authors propose two new training objectives—importance-weighted and R'enyi dequantization—alongside a highly flexible Autoregressive Dequantization (ARD) noise distribution, achieving state-of-the-art likelihood results on CIFAR10 for models that allow fast sampling.

What Problem Does This Paper Address?

Most digital media is discrete (e.g., 8-bit image pixels take values from 0 to 255). However, many powerful generative models, such as Normalizing Flows, are designed to model continuous probability densities.

If you naively train a continuous model on discrete data, the model can achieve "infinite" likelihood by placing extremely narrow, tall spikes of probability mass on the discrete data points. To prevent this, researchers typically "dequantize" the data by adding uniform noise, effectively spreading the probability mass over a small volume.

A discrete distribution is dequantized by adding noise. A flexible dequantizer (c) allows the model to better match the underlying continuous density compared to a simple uniform one (b).

While uniform noise works, it is often suboptimal. This paper explores whether we can learn better noise distributions and more sophisticated optimization objectives to improve model performance.

Methods

The authors frame dequantization as a latent variable problem where the discrete data $x$ is a "quantized" version of a hidden continuous variable $v$. They introduce several key innovations:

  1. New Objectives: Beyond standard Variational Inference (VI), they derive Importance-Weighted (IW) and R'enyi dequantization objectives. These provide tighter lower bounds on the true log-likelihood, especially when the noise distribution is simple.
  2. Autoregressive Dequantization (ARD): They propose using an autoregressive model to generate the dequantization noise. While autoregressive models are usually slow to invert, the authors point out that for dequantization, we only need to sample the noise during training, not invert it. This allows for a very flexible noise distribution without sacrificing the sampling speed of the final generative model.
  3. Generalized Framework: They show that existing methods (like uniform dequantization) are special cases of their latent variable framework.

Datasets

The methods were evaluated on:

  • 2D Binary Checkerboard: A synthetic 2D dataset used for qualitative visualization of how the model $p(v)$ and dequantizer $q(v|x)$ interact.
  • Binarized MNIST: A standard benchmark for discrete data modeling.
  • CIFAR10 (5-bit and 8-bit): A complex image dataset used to test the limits of the proposed ARD method.

Key Insights and Ideas

  • Flexibility Trade-offs: There is a symbiotic relationship between the dequantizer and the density model. If the density model is simple (like a Gaussian), a flexible dequantizer can "shape" the noise to compensate for the model's weaknesses.
  • Objective Impact: Advanced objectives like IW and R'enyi are most beneficial when the dequantization distribution is simple (e.g., uniform). If you use a highly flexible dequantizer like ARD, the standard VI objective is often sufficient.
  • Bit-Depth Sensitivity: Dequantization matters significantly more for low bit-depth data (like 1-bit or 5-bit images). In these cases, the "volume" of the noise is large relative to the range of the data, making the choice of noise distribution critical.
Visualizing different pairs of density models $p(v)$ and dequantizers $q(v|x)$ on a 2D checkerboard. The best performance (d) occurs when both are flexible.

Key Results

  • SOTA Likelihood: Using ARD, the authors achieved a negative log-likelihood of 3.06 bits per dimension (bpd) on 8-bit CIFAR10. This was state-of-the-art at the time for models that do not require slow autoregressive inverses for sampling.
  • Efficiency: ARD outperformed other flexible dequantizers (like bipartite flows) while maintaining the same computational complexity during the final sampling process.
  • 2D Analysis: Qualitative results on the checkerboard dataset clearly demonstrated that flexible dequantizers prevent the density model from "struggling" at the boundaries of discrete bins.

Limitations and Future Work

  • Computational Cost of IW/R'enyi: These objectives require multiple samples per data point during training, which increases the computational burden. The authors suggest a "finetuning" approach—training with VI first and then switching to IW/R'enyi—to mitigate this.
  • Posterior Divergence: Under IW and R'enyi objectives, the learned dequantizer $q(v|x)$ may diverge from the true posterior $p(v|x)$. This means a single sample might provide a poor approximation of the likelihood, requiring multiple samples for accurate evaluation.
  • Future Directions: The authors suggest exploring even more sophisticated optimization objectives and applying these techniques to other discrete domains beyond images, such as text or audio.

Summary updated

BibTeX
@misc{hoogeboom2020learning,
  author = {Emiel Hoogeboom and Taco S. Cohen and Jakub M. Tomczak},
  title = {{Learning Discrete Distributions by Dequantization}},
  year = {2020},
  eprint = {2001.11235},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.11235},
}
Figure