NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Flow++: Improving Flow-Based Generative Models with Variational Dequantization and Architecture Design

Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, Pieter Abbeel

In the world of generative modeling, there has long been a trade-off between autoregressive models (like PixelCNN) and flow-based models (like Glow). Autoregressive models are the kings of density estimation—they are incredibly accurate at modeling the probability of data—but they are painfully slow to sample from because they generate data one pixel at a time. Flow-based models, on the other hand, offer lightning-fast, parallel sampling and exact likelihood calculation, but they have historically lagged behind in image quality and density modeling.

In their paper "Flow++: Improving Flow-Based Generative Models with Variational Dequantization and Architecture Design," Jonathan Ho and colleagues from UC Berkeley and OpenAI bridge this performance gap. By rethinking how we handle discrete data and upgrading the internal architecture of flow layers, they've created a model that rivals the accuracy of autoregressive models while maintaining the speed of flows.

The Problem with Traditional Flows

Flow-based models work by transforming a simple distribution (like a Gaussian) into a complex one (like the distribution of natural images) using a series of invertible transformations. However, three main issues have historically held them back:

  1. Dequantization: Images are discrete (pixel values 0-255), but flow models are continuous. Adding "flat" uniform noise to make them continuous is a common fix, but it's "unnatural" for neural networks to model and limits performance.
  2. Inexpressive Transformations: Most flows use "affine" coupling layers—essentially just scaling and shifting ($y = ax + b$). This is mathematically convenient but lacks the power to model complex data distributions efficiently.
  3. Weak Conditioning: The internal neural networks that determine the flow parameters usually rely on simple convolutions, which struggle to capture long-range dependencies in an image.

The Flow++ Solution

The authors introduce three major innovations to solve these problems and build Flow++:

  • Variational Dequantization: Instead of adding random uniform noise to pixels, Flow++ uses a small, secondary flow model to learn a better noise distribution. This "variational" approach provides a tighter lower bound on the log-likelihood and makes the modeling task much easier for the main network.
  • Logistic Mixture CDF Couplings: They move beyond simple linear transformations. Flow++ uses the Cumulative Distribution Function (CDF) of a mixture of logistics. This is a highly non-linear, yet still invertible, transformation that allows the model to express much more complex relationships in a single layer.
  • Self-Attention Architecture: Borrowing from the Transformer's success, they replace standard convolutional blocks with a hybrid architecture. Each block uses 3x3 convolutions followed by multi-head self-attention, allowing the model to look at the "big picture" of the image when deciding how to transform local pixels.

Key Insights and Ideas

The "Uniform" Bottleneck: The most surprising finding was that variational dequantization was the single biggest contributor to performance. Forcing a smooth neural network to model a perfectly flat, "boxy" uniform distribution is fundamentally difficult. By letting the model learn how to "smooth" the discrete pixels, the authors unlocked significant gains.

Ablation study showing the impact of variational dequantization, attention, and coupling choices on bits/dim.

Inductive Bias vs. Parameter Count: Through ablation studies (seen above), the authors showed that their improvements weren't just because the model was "bigger." Even when matching the number of parameters, the Flow++ architecture outperformed standard flow models, proving that these specific design choices provide a better "inductive bias" for images. Switching from uniform to variational dequantization alone improved the score by 0.127 bits/dim, a massive jump in this field.

Speed without Sacrifice: Flow++ demonstrates that you don't have to choose between fast sampling and high-quality density estimation. It captures both local and global dependencies as well as PixelCNN but remains orders of magnitude faster to sample from.

Key Results

The model was evaluated on standard image modeling benchmarks, including CIFAR-10, ImageNet, and CelebA.

  • State-of-the-Art: At the time of publication, Flow++ became the SOTA non-autoregressive model for unconditional density estimation.
  • Density Estimation: On CIFAR-10, it achieved 3.08 bits/dim, outperforming previous flow models like Glow (3.35 bits/dim) and approaching the performance of early autoregressive models.
  • Sampling Speed: The model can generate a batch of 8 CIFAR-10 samples in just 0.32 seconds on a single GPU—significantly faster than the minutes required for high-end autoregressive models.
Image samples generated by the Flow++ model.

Limitations and Future Work

While Flow++ represents a massive leap forward, it is not without limitations:

  • Inversion Complexity: While the Logistic Mixture CDF is invertible, it doesn't have a simple analytical inverse. It requires a numerical method (bisection search), which adds a bit of computational overhead during the generation process.
  • The Gap Remains: While Flow++ closed the gap significantly, the very best autoregressive models (like PixelSNAIL) still hold a slight lead in pure bits-per-dimension scores.

The authors suggest that further improvements in the conditioning architecture and exploring even more complex coupling transformations could eventually lead to flow models that fully surpass autoregressive benchmarks.

Summary updated

BibTeX
@inproceedings{ho2019flow,
  author = {Jonathan Ho and Xi Chen and Aravind Srinivas and Yan Duan and Pieter Abbeel},
  title = {{Flow++: Improving Flow-Based Generative Models with Variational Dequantization and Architecture Design}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure