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

Normalizing Flow with Variational Latent Representation

Hanze Dong, Shizhe Diao, Weizhong Zhang, Tong Zhang · DOI

Introduction

Normalizing Flows (NFs) are a powerful class of generative models that allow for exact likelihood calculation by learning an invertible transformation between complex data and a simple base distribution, typically a standard Gaussian. However, standard NFs face a significant "topological" hurdle when modeling multi-modal data—data that exists in several isolated clusters.

To map a single continuous Gaussian "blob" to multiple distant clusters, the transformation function must become extremely complex. Mathematically, the derivative of this function (the Jacobian) must explode or become discontinuous in the regions between clusters. This leads to unstable training and poor density estimation. This paper introduces Normalizing Variational Flow (NVF), a framework that bridges the gap by replacing the simple Gaussian base with a learned, variational latent representation.

Methods: Simplifying the Transformation

The core innovation of NVF is the introduction of a latent variable $u$ that captures "cluster" or "mode" information. Instead of forcing a single global mapping, the model jointly learns a latent variable and a conditional flow transformation $G_\theta(z, u)$.

Comparison of standard flows versus NVF with a latent factor. Without the latent factor, the flow must stretch across modes; with it, the transformation is simplified by conditioning on specific clusters.

By conditioning the flow on $u$, the transformation only needs to map a Gaussian to a single unimodal cluster at a time. This makes the function much smoother and easier to learn. The framework is flexible regarding the nature of $u$:

  • Discrete: Ideal for tabular data with distinct categories.
  • Continuous: Useful for data on smooth manifolds.
  • Sequential: For high-dimensional data like images, where $u$ is a sequence generated by a Transformer (e.g., GPT-2 style).

The model is optimized via the Evidence Lower Bound (ELBO), combining the exact density evaluation of NFs with the flexible latent modeling of Variational Autoencoders (VAEs).

Key Insights: The Jacobian Issue

A central contribution of the paper is the formalization of the "Jacobian Issue." When a standard NF attempts to model multi-modal data, the Jacobian of the transformation $G_\theta$ can become exponentially large. This isn't just a lack of model capacity; it is a mathematical consequence of choosing a unimodal base distribution for multi-modal data.

Visualization of the Jacobian issue. When the gradient of the transformation is constrained (bottom left), the model fails to capture the sharp peaks of the true distribution (top left). The mapping function G (bottom right) shows the steep slopes required to bridge modes.

As shown in the visualizations, when the gradient of the generator is constrained, standard NFs fail to represent the sharp peaks of the target distribution. NVF bypasses this by allowing the latent space itself to account for the multi-modality, ensuring the flow transformation remains well-behaved.

Experimental Results

The authors evaluated NVF across diverse benchmarks, demonstrating its versatility:

  • Tabular Data: NVF achieved state-of-the-art results (lowest negative log-likelihood) on all five UCI benchmarks, including POWER and MINIBOONE, outperforming established models like Neural Spline Flows (NSF).
  • Image Synthesis: On datasets like CIFAR-10 and ImageNet, NVF consistently outperformed standard flows (Glow, RealNVP). On MNIST, it achieved a test NLL of 0.78 bits/dim, a significant improvement over the 1.05 bits/dim of baseline flows.
  • Qualitative Quality: In CelebA experiments, NVF produced sharper and more detailed images than standard VAEs, achieving an FID score of 16.23 compared to 31.57 for a standard VAE.

Conclusion and Future Work

NVF effectively combines the strengths of Normalizing Flows and Variational Autoencoders. While it introduces some computational overhead—sampling is approximately 3.4x slower than baseline flows—it provides a robust solution to the topological limitations of standard NFs. Future work may focus on parallelizing the latent prior and flow training to mitigate these time costs and exploring more complex latent structures for video or 3D data.

Summary updated

BibTeX
@misc{dong2022normalizing,
  author = {Hanze Dong and Shizhe Diao and Weizhong Zhang and Tong Zhang},
  title = {{Normalizing Flow with Variational Latent Representation}},
  year = {2022},
  eprint = {2211.11638},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.11638},
}
Figure