Flows Succeed Where GANs Fail: Lessons from Low-Dimensional Data

Tianci Liu, Jeffrey Regier

Abstract: Generative adversarial networks (GANs) and normalizing flows are both approaches to density estimation that use deep neural networks to transform samples from an uninformative prior distribution to an approximation of the data distribution. There is great interest in both for general-purpose statistical modeling, but the two approaches have seldom been compared to each other for modeling non-image data. The difficulty of computing likelihoods with GANs, which are implicit models, makes conducting such a comparison challenging. We work around this difficulty by considering several low-dimensional synthetic datasets. An extensive grid search over GAN architectures, hyperparameters, and training procedures suggests that no GAN is capable of modeling our simple low-dimensional data well, a task we view as a prerequisite for an approach to be considered suitable for general-purpose statistical modeling. Several normalizing flows, on the other hand, excelled at these tasks, even substantially outperforming WGAN in terms of Wasserstein distance -- the metric that WGAN alone targets. Scientists and other practitioners should be wary of relying on WGAN for applications that require accurate density estimation.

Introduction

In the landscape of generative modeling, Generative Adversarial Networks (GANs) are often celebrated for their ability to produce high-fidelity images. However, scientific applications—ranging from cosmology to healthcare—demand more than just visual plausibility. They require accurate density estimation, or "recall," ensuring the model captures the full breadth and structure of the underlying distribution.

Because GANs are implicit models, they lack a tractable likelihood function, making it difficult to assess their coverage of the data distribution. This paper addresses a fundamental concern: if a model cannot learn a simple one-dimensional distribution, can it be trusted with complex, high-dimensional scientific data? By subjecting GANs and Normalizing Flows to a "stress test" on 1D synthetic data, the authors reveal significant limitations in the GAN framework for general-purpose statistical modeling.

Methodology and Experimental Setup

The researchers conducted a rigorous head-to-head comparison between Wasserstein GANs (WGAN) and two classes of Normalizing Flows:

  1. FFJORD: A continuous-time flow based on ordinary differential equations.
  2. Gaussianization Flows (GF): A model that utilizes iterative linear rotations and non-linear transformations to map data to a Gaussian distribution.

To ensure the comparison was not biased by poor optimization, the authors performed an exhaustive grid search for the WGANs using the Asynchronous Successive Halving Algorithm (ASHA). This search explored various architectures, learning rates, and regularization techniques, including spectral normalization and gradient penalties. The models were tested on two univariate datasets: a Unimodal Dataset (a mixture of Uniform and Gaussian distributions) and a Multimodal Dataset (eight distinct components). To eliminate data scarcity as a factor, the models were trained on an effectively infinite stream of fresh samples.

Results: Qualitative and Quantitative Failure

Despite the extensive hyperparameter tuning, WGANs consistently struggled to recover the basic geometry of the 1D distributions. As shown in the density plots below, WGANs often "smeared" probability mass into regions where no data existed and failed to maintain the sharp boundaries or symmetry of the target modes.

Density estimation performance on unimodal (top) and multimodal (bottom) datasets. WGAN (b, f) fails to capture sharp boundaries and mode separation compared to FFJORD (c, g) and Gaussianization Flows (d, h).

Quantitatively, the results were even more striking. Although WGANs are explicitly designed to minimize the Wasserstein-1 distance, Normalizing Flows achieved significantly lower scores on this very metric. In the multimodal task, Gaussianization Flows achieved a Wasserstein-1 distance of 0.138, whereas the best-tuned WGAN trailed significantly at 0.4814.

Wasserstein-1 distance comparison across models. Gaussianization Flows significantly outperform WGAN even on the metric WGAN is designed to optimize.

Key Insights

The "Target Metric" Irony

The most surprising finding is that Normalizing Flows beat WGANs at their own game. The fact that a flow-based model, which typically optimizes for log-likelihood, can outperform a WGAN on Wasserstein distance suggests fundamental issues with the GAN training objective or the stability of the adversarial game in low dimensions.

The Critic's Blind Spot

Analysis of the WGAN "critic" (the network responsible for estimating the distance between distributions) revealed that it often severely underestimated the true distance. In some instances, the critic produced negative distance estimates, providing a broken or misleading signal to the generator, which explains the poor convergence observed in the density plots.

Efficiency and Robustness

Beyond accuracy, there was a massive gap in computational efficiency. Gaussianization Flows were trained in approximately 1.5 hours and worked "out of the box" with standard settings. In contrast, finding even a mediocre WGAN configuration required weeks of compute time and hundreds of experimental runs.

Conclusion

The authors argue that success in 1D is a necessary, though not sufficient, condition for a model to be considered reliable for general-purpose statistics. The failure of WGANs to master these simple tasks—even with exhaustive tuning—serves as a warning to practitioners. For applications where accurate density estimation and distributional recall are paramount, Normalizing Flows represent a more robust and efficient alternative to GANs.

Summary updated

BibTeX
@misc{liu2020flows,
  author = {Tianci Liu and Jeffrey Regier},
  title = {{Flows Succeed Where GANs Fail: Lessons from Low-Dimensional Data}},
  year = {2020},
  eprint = {2006.10175},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.10175},
}
Figure