Overview
Flow models have recently made great progress at modeling ordinal discrete data such as images and audio. However, due to the continuous nature of flow models, a technique called dequantization is typically applied when using them for discrete data. This results in lower bound estimates of the likelihood, creating a performance gap.
This paper introduces subset flows, a new class of normalizing flows that can tractably transform finite volumes, allowing for the exact computation of likelihoods for discrete data. By re-framing popular autoregressive models (like PixelCNN) as single-layer subset flows, the authors "close the gap" created by traditional dequantization methods and achieve state-of-the-art results for flow models on CIFAR-10.
The Dequantization Problem
Generative models for images and audio usually deal with ordinal discrete data (e.g., pixel intensities ranging from 0 to 255). However, most "Normalizing Flows"—a powerful class of generative models—are continuous by nature.
To make flows work with discrete data, researchers typically use dequantization: adding a small amount of noise to "smear" discrete points into a continuous space. While effective, this creates a "dequantization gap." The model optimizes a lower bound of the true discrete likelihood rather than the exact likelihood itself. This gap leads to sub-optimal performance compared to pure autoregressive models (like PixelCNN), which handle discrete data naturally but lack the flexible latent space and compositionality of flows.
Methods: Bridging the Divide
The authors bridge this divide with two key mathematical innovations:
1. Subset Flows
Unlike standard flows that map individual points to points, subset flows map regions (subsets) of the input space to regions in the latent space.
If you use a uniform base distribution, the probability of a discrete value is simply the volume of its corresponding region in the latent space. This allows the model to natively handle discrete bins of data without artificial noise.
2. Bin Conditioning
To keep the math tractable in high dimensions, the authors must ensure that "hyperrectangles" in the input space remain "hyperrectangles" in the latent space. They achieve this by conditioning the transformation of a variable on the bin (the discrete interval) of previous variables, rather than their exact continuous values.
Using these tools, the authors mathematically prove that PixelCNN, PixelCNN++, and WaveNet are actually specific types of single-layer subset flows. This realization allows them to build PixelFlow, a multi-layer architecture that stacks PixelCNN-style layers with non-autoregressive coupling layers (like those found in Glow).
Key Insights and Results
- The "Aha!" Moment for PixelCNN: The authors show that the Discretized Mixture of Logistics (DMOL) used in PixelCNN++ is mathematically equivalent to a subset flow. This means PixelCNN isn't just a discrete model; it's a flow model that has been "hidden in plain sight."
- Quantifying the Gap: By treating PixelCNN as a flow, the authors could finally measure exactly how much performance is lost to dequantization. For PixelCNN++, the gap between the variational lower bound (ELBO) and the exact likelihood is approximately 0.049 bits/dim.
- Exact is Better: Experiments on the CIFAR-10 dataset demonstrate that training on the exact discrete likelihood consistently outperforms training on dequantized lower bounds.
- State-of-the-Art (SOTA): Their hybrid model, PixelFlow++, achieved a test performance of 2.92 bits/dim on CIFAR-10. At the time of publication, this was the best result for any flow-based model trained with dequantization.
- Latent Space Interpolation: Because these autoregressive models are now formally flows, they possess a latent space. The authors demonstrated that you can perform smooth interpolations between images in the latent space of a PixelCNN, a feature previously unavailable for that architecture.
Limitations and Future Work
While the paper successfully integrates autoregressive models into the flow framework, it doesn't solve their inherent sequential nature. Sampling from the PixelCNN layers remains slow compared to fully non-autoregressive flows like RealNVP or Glow. Additionally, implementing subset flows with bin conditioning requires careful bookkeeping of boundaries, which is more complex than standard point-wise flow transformations.
Ultimately, this framework opens the door to designing entirely new types of subset flows and more sophisticated multi-layer architectures that could further push the boundaries of image and audio generation.
Summary updated