Sliced Iterative Normalizing Flows

Biwei Dai, Uros Seljak

Abstract We develop an iterative (greedy) deep learning algorithm which is able to transform an arbitrary probability distribution function (PDF) into the target PDF. The model is based on iterative Optimal Transport of a series of 1D slices, matching on each slice the marginal PDF to the target. As special cases of this algorithm, we introduce two sliced iterative Normalizing Flow (SINF) models, which map from the data to the latent space (GIS) and vice versa (SIG). We show that SIG is able to generate high quality samples of image datasets, which match the GAN benchmarks. GIS obtains competitive results on density estimation tasks compared to the density trained NFs. SINF has very few hyperparameters and is very stable during training. When trained on small training sets it is both faster and achieves higher $p(x)$ than current alternatives.

Introduction

Modern generative models, including Normalizing Flows (NFs), Generative Adversarial Networks (GANs), and Variational Autoencoders (VAEs), have achieved remarkable success in modeling complex data distributions. However, these models often face significant training challenges, such as sensitivity to hyperparameters, instability during optimization, and the computational burden of backpropagation. Normalizing Flows, which typically optimize for Maximum Likelihood, may not always produce high-quality visual samples. Furthermore, previous iterative approaches like Rotation-Based Iterative Gaussianization (RBIG) struggled to scale to high-dimensional data due to inefficient axis selection.

Sliced Iterative Normalizing Flows (SINF) addresses these issues by introducing a "greedy" iterative algorithm. Instead of end-to-end training of a deep network, SINF builds the transformation layer by layer through a sequence of simple 1D optimal transport problems, offering a stable and efficient alternative for both density estimation and image generation.

Methodology

SINF departs from the standard deep learning paradigm by employing an iterative, greedy optimization strategy. The core idea is to decompose a high-dimensional distribution matching problem into a series of 1D problems.

The SINF iterative process: finding axes of maximum difference and matching 1D marginals.

The algorithm proceeds in three main steps per iteration:

  1. Max K-Sliced Wasserstein Distance: It identifies $K$ orthogonal axes where the current and target distributions differ most by maximizing the Wasserstein distance along those projections.
  2. 1D Marginal Matching: The high-dimensional problem is reduced to $K$ independent 1D problems. Since 1D Optimal Transport has a closed-form solution—matching cumulative distribution functions—the algorithm precisely aligns the distributions along these axes using monotonic rational quadratic splines.
  3. Hierarchical Patching: For high-dimensional image data, SINF uses a hierarchical strategy, modeling the global image structure first and then refining local details through smaller patches.

The framework offers two variants: SIG (Sliced Iterative Generator), which maps a Normal distribution to the data for sample generation, and GIS (Gaussianizing Iterative Slicing), which maps data to a Normal distribution for robust density estimation.

Experimental Evaluation

The authors evaluated SINF across several benchmarks, including UCI tabular datasets (POWER, GAS, HEPMASS, MINIBOONE), BSDS300, and standard image datasets (MNIST, Fashion-MNIST, CIFAR-10, CelebA). They also tested its performance in Out-of-Distribution (OoD) detection scenarios.

Results and Discussion

SINF demonstrates several key advantages over traditional generative models:

Stability and Efficiency: By avoiding stochastic gradient descent (SGD) and adversarial training, SINF is remarkably stable. The authors reported zero training failures and high insensitivity to random seeds. In terms of speed, SINF is significantly faster on small datasets; for instance, on the POWER dataset ($N=100$), SINF trained in 0.53 seconds compared to over 1000 seconds for FFJORD.

Performance in Low-Data Regimes: A standout feature of SINF is its performance when training data is scarce. Traditional NFs often overfit in these scenarios, whereas GIS maintains high log-likelihoods.

Performance comparison on the BSDS300 (63D) dataset across different training set sizes.

Image Quality and OoD Detection: SIG achieved state-of-the-art FID scores for iterative models (e.g., 4.5 on MNIST), rivaling GANs. Furthermore, SINF excels at anomaly detection because its objective is sensitive to global structure. When trained on Fashion-MNIST, it achieved an AUROC of 0.980 for detecting MNIST, outperforming likelihood-based models like PixelCNN++.

Conclusion

SINF provides a mathematically transparent and stable framework for building deep generative models. While its greedy nature might theoretically miss some global optima, its empirical success in high-dimensional tasks and low-data regimes makes it a powerful tool. Future work may focus on scaling to ultra-high-resolution images and providing more rigorous convergence guarantees for the Max K-SWD objective.

Summary updated

BibTeX
@inproceedings{dai2021sliced,
  author = {Biwei Dai and Uros Seljak},
  title = {{Sliced Iterative Normalizing Flows}},
  booktitle = {INNF @ ICML},
  year = {2021},
  url = {https://openreview.net/forum?id=VmwEpdsvHZ9},
}
Figure