Ordering Dimensions with Nested Dropout Normalizing Flows

Artur Bekasov, Iain MurrayarXiv 2020

TL;DR

This paper introduces a method to impose a hierarchical ordering on the latent dimensions of Normalizing Flows using Nested Dropout. By adding a reconstruction-based loss term, the authors enable flows to learn low-dimensional, semantically meaningful representations (similar to PCA) while maintaining a tractable probability density across the entire data space.

What Problem Does This Paper Address?

Normalizing Flows (NFs) are powerful generative models that provide exact likelihoods by transforming a simple base distribution through a sequence of invertible mappings. However, they come with a strict constraint: the latent space must have the exact same dimensionality as the input data.

This is a problem for representation learning. Usually, we want our models to compress high-dimensional data (like images) into a much smaller set of "meaningful" variables. While some researchers have tried fitting flows to lower-dimensional manifolds, these models typically lose the ability to define a valid probability density for data points that fall slightly off that manifold. The authors ask: Can we keep the full-dimensional flow but force it to prioritize information in a specific order, so the first few dimensions capture the most important features?

Methods

The authors combine the standard maximum likelihood objective of Normalizing Flows with a technique called Nested Dropout (ND).

  1. Nested Dropout: Instead of dropping features independently (like standard dropout), ND samples an index $k$ from a distribution and "zeros out" all dimensions from $k+1$ to the maximum dimension $K$.
  2. The Objective Function: The training loss becomes a multi-objective task: $$L(\theta) = \text{Negative Log-Likelihood} + \lambda \cdot \mathbb{E}_{k \sim p_k} [d(x, \tilde{x}_{\downarrow k})]$$ Here, $\tilde{x}_{\downarrow k}$ is the reconstruction of the input $x$ using only the first $k$ latent dimensions. The flow $f_\theta$ acts as the encoder, and its inverse $f_\theta^{-1}$ acts as the decoder.

  3. Linear Case: The authors show that for a linear flow, this objective successfully implements Principal Component Analysis (PCA).

  4. Architectural Considerations: They explore how different flow parameterizations (like LU vs. QR decompositions) and multi-scale architectures (which naturally split variables) interact with this ordering objective.

Datasets

  • Synthetic 3D Dataset: A 3D normal distribution scaled and rotated to resemble a "fuzzy elliptical disc." This served as a proof-of-concept to see if the flow could recover PCA-like ordering.
  • Fashion-MNIST: A dataset of 70,000 grayscale images of clothing items. The images were padded to $32 \times 32$ (1024 dimensions) to test the method on high-dimensional, complex data.

Key Insights and Ideas

  • Ordering is not Automatic: In standard flows, the base distribution (usually a spherical Gaussian) is rotationally invariant. This means the model has no inherent reason to prefer one dimension over another. ND provides the necessary "nudge" to create a hierarchy.
  • Architecture Matters: The way a flow is parameterized significantly impacts its ability to order dimensions. For instance, QR-based linear flows matched PCA's optimal representation perfectly, whereas LU-based flows showed higher variance.
  • Multi-scale Synergy: Modern image flows (like RQ-NSF) often use multi-scale architectures that already induce a partial ordering. The authors found that ND can significantly enhance this existing structure.
  • The Likelihood-Compactness Trade-off: There is a "no free lunch" aspect here. Forcing a flow to be a good compressor (low reconstruction error for few dimensions) often leads to a slight decrease in the total log-likelihood.

Key Results

  • Synthetic Success: On the 3D dataset, flows trained with ND (QR*) achieved reconstruction errors identical to PCA, whereas standard flows had much higher errors when projecting to 1 or 2 dimensions. 2D projections of the 3D synthetic dataset
2D projections of the 3D synthetic dataset
  • Fashion-MNIST Compression: For image data, ND drastically improved the reconstruction curve. As seen in Figure 3, the Mean Squared Error (MSE) for low-dimensional projections is significantly lower than the baseline. MSE vs retained dimensions for Fashion-MNIST
Figure 3. Mean squared error of Fashion-MNIST reconstructions for RQ-NSF (C) flow against the number of retained dimensions. Comparing a flow trained with nested dropout to the baseline without the additional loss. bpd is the negative test log-likelihood in bits per dimension (lower is better).
  • Qualitative Quality: Even with a small reduction in likelihood (~4%), the visual quality of samples remained high. Figure 4 shows that as more latent dimensions are retained, the reconstructions transition from generic, blurry shapes to sharp, detailed items. Samples and reconstructions with varying latent dimensions
Figure 4. Top: samples from the flow. Bottom: reconstructions for an input image in the top left, decaying the latent dimension from 510 to 1 (left-to-right, top-to-bottom). Left: RQ-NSF (C) baseline. Right: RQ-NSF (C) with nested dropout.

Limitations and Future Work

  • Computational Overhead: Training with ND requires evaluating the flow in both directions (forward for encoding, inverse for reconstruction) on every iteration. For architectures where one direction is significantly slower (like some auto-regressive flows), this could be impractical.
  • Hyper-parameter Sensitivity: The balance between likelihood and reconstruction ($\lambda$) and the dropout rate ($p$) require careful tuning. While the authors performed a grid search (Figure 6), the optimal values may vary by task.
  • Inductive Bias: The small reduction in likelihood suggests that current flow architectures might have an inherent bias against ordered latent spaces, pointing toward a need for new architectures that represent low-dimensional structures more naturally.

Summary updated

BibTeX
@misc{bekasov2020ordering,
  author = {Artur Bekasov and Iain Murray},
  title = {{Ordering Dimensions with Nested Dropout Normalizing Flows}},
  year = {2020},
  eprint = {2006.08777},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.08777},
}
Figure