Semi-Discrete Normalizing Flows through Differentiable Tessellation

Ricky T. Q. Chen, Brandon Amos, Maximilian Nickel

Normalizing flows (NFs) are powerful generative models that transform simple distributions into complex ones using invertible mappings. However, because they are natively designed for continuous variables, applying them to discrete data (like pixel values or categorical features) requires "dequantization"—typically by adding noise.

Existing dequantization methods have major drawbacks: they often rely on fixed, heuristic boundaries or force the dimensionality of the continuous space to scale linearly with the number of discrete categories. Furthermore, when researchers use standard mixture models to add expressivity to NFs, the computational cost scales linearly with the number of components, as every component must be evaluated for every data point.

This paper introduces a novel way to bridge the gap between discrete and continuous distributions in normalizing flows using differentiable Voronoi tessellations. By partitioning continuous space into learnable convex polytopes, the authors enable more flexible dequantization of discrete data and create mixture models that scale to many components without increasing computational cost.

Differentiable Tessellation and Homeomorphism

The core proposal is to use Voronoi Tessellation to partition the continuous domain into disjoint convex polytopes (cells). Each cell is defined by an "anchor point," and any point in space belongs to the cell of its nearest anchor.

To integrate this into normalizing flows, the authors designed a specific invertible mapping (a homeomorphism) that squashes the entire unbounded space ($\mathbb{R}^D$) into a single bounded convex polytope.

Mapping between unbounded space and a convex polytope

Crucially, this mapping is differentiable, allowing the boundaries of the cells (the anchor points) to be learned via gradient descent. Calculating the "log-determinant Jacobian" required for normalizing flows is usually a slow $O(D^3)$ operation. The authors derived a rank-2 update formula that reduces this to $O(D)$, making the method highly scalable to high-dimensional data.

Two Application Frameworks

The authors apply this differentiable tessellation to two primary settings:

1. Voronoi Dequantization This framework maps discrete values to specific Voronoi cells, allowing the model to learn the "shape" and "distance" between categories in an embedding space. Unlike previous methods (like Argmax flows), Voronoi dequantization decouples the embedding dimension from the number of categories. You can embed 1,000 discrete categories into a low-dimensional space (e.g., 2D or 10D) while still learning optimal boundaries.

Comparison of dequantization partitioning schemes

Because anchor points are learnable, the model naturally clusters similar discrete values together. The spatial arrangement of the Voronoi cells captures semantic similarities between categories.

2. Voronoi Mixture Models In this setup, each cell acts as the support for one component of a mixture. Because the cells are disjoint, the model only needs to evaluate the single component where a point resides. This leads to an $O(1)$ likelihood evaluation with respect to the number of components $K$. You can have a mixture of 1,000 flows that costs nearly the same to evaluate as a single flow.

Key Results

The authors evaluated their approach across several modalities, including synthetic 2D data, discrete UCI datasets, itemset modeling, language modeling, and continuous density estimation.

  • Superior Dequantization: On the large-scale USCensus90 dataset (2.7 million samples), Voronoi Dequantization achieved a negative log-likelihood (NLL) of 24.19, significantly outperforming Simplex Dequantization (28.09) and Discrete Flows (55.62).
  • Language Modeling: In text8 and enwik8 tasks, increasing the embedding dimension $D$ for the Voronoi cells consistently improved bits-per-character (bpc), outperforming previous state-of-the-art dequantization baselines.
  • Efficient Mixtures: For continuous density estimation (e.g., the GAS dataset), the Voronoi Disjoint Mixture achieved an NLL of -12.63, outperforming standard Real NVP (-8.33) and the computationally heavier FFJORD (-8.59) while maintaining low compute overhead.

Limitations and Future Work

While powerful, the approach has a few limitations. The current homeomorphism forces the probability density to go to zero at the boundaries of the cells, which might be undesirable for distributions where density should be continuous across boundaries. Additionally, the resulting density function is continuous but not smooth (its derivative is discontinuous at cell boundaries), which can sometimes make optimization tricky. Finally, in very high dimensions, Euclidean distances behave strangely, which might limit the effectiveness of simple Voronoi cells. The authors suggest exploring more flexible tessellations, like Laguerre tessellations, in future work.

Summary updated

BibTeX
@inproceedings{chen2022semi,
  author = {Ricky T. Q. Chen and Brandon Amos and Maximilian Nickel},
  title = {{Semi-Discrete Normalizing Flows through Differentiable Tessellation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=NMTSIY6ykw7},
}
Figure