[Paper Review] Categorical Normalizing Flows via Continuous Transformations
This paper proposes Categorical Normalizing Flows (CNF), a method that uses variational inference with a factorized decoder to learn continuous, non-overlapping representations of categorical data, enabling scalable normalizing flows for high-cardinality categories. By modeling complex dependencies through the flow prior and separating representation learning from interaction modeling, CNF enables efficient, permutation-invariant graph generation via GraphCNF, which outperforms state-of-the-art autoregressive and one-shot flow-based models on molecule generation.
Despite their popularity, to date, the application of normalizing flows on categorical data stays limited. The current practice of using dequantization to map discrete data to a continuous space is inapplicable as categorical data has no intrinsic order. Instead, categorical data have complex and latent relations that must be inferred, like the synonymy between words. In this paper, we investigate \emph{Categorical Normalizing Flows}, that is normalizing flows for categorical data. By casting the encoding of categorical data in continuous space as a variational inference problem, we jointly optimize the continuous representation and the model likelihood. Using a factorized decoder, we introduce an inductive bias to model any interactions in the normalizing flow. As a consequence, we do not only simplify the optimization compared to having a joint decoder, but also make it possible to scale up to a large number of categories that is currently impossible with discrete normalizing flows. Based on Categorical Normalizing Flows, we propose GraphCNF a permutation-invariant generative model on graphs. GraphCNF implements a three step approach modeling the nodes, edges and adjacency matrix stepwise to increase efficiency. On molecule generation, GraphCNF outperforms both one-shot and autoregressive flow-based state-of-the-art.
Motivation & Objective
- To address the limitation of existing normalizing flows in handling categorical data due to the absence of intrinsic order and complex latent relations.
- To overcome the scalability issues of discrete normalizing flows, especially for large vocabulary sizes and deep architectures.
- To develop a continuous, non-overlapping representation of categorical variables that avoids dequantization bias.
- To enable efficient, parallel generation of graphs and sequences by removing reliance on autoregressive ordering.
- To demonstrate the effectiveness of CNF across diverse tasks, including molecular generation, language modeling, and real-world tabular data.
Proposed method
- Casts the encoding of categorical data into continuous space as a variational inference problem, jointly optimizing the latent representation and model likelihood.
- Uses a factorized decoder that decouples representation learning from modeling interactions, forcing the normalizing flow to capture complex dependencies.
- Applies continuous, invertible transformations via normalizing flows on the learned continuous latent space to model the joint distribution.
- Introduces GraphCNF, a three-step flow-based model that sequentially encodes node attributes, edge attributes, and adjacency matrices in a permutation-invariant manner.
- Employs a mixture density network for the encoder to model the posterior distribution over continuous codes, with parameters determined by a small feedforward network.
- Uses a single coupling layer with an LSTM-based coupling network for all experiments, with hyperparameters tuned for stability and performance.
Experimental results
Research questions
- RQ1Can normalizing flows be effectively applied to categorical data without relying on dequantization, which imposes artificial order?
- RQ2How can we scale normalizing flows to high-cardinality categorical data, such as large vocabularies or complex graphs?
- RQ3Can we achieve better performance in graph generation by using a non-autoregressive, permutation-invariant flow-based model?
- RQ4Does separating representation learning from interaction modeling via a factorized decoder improve training stability and scalability?
- RQ5Can simple mixture models for encoding generalize across diverse categorical data types like language, sets, and graphs?
Key findings
- GraphCNF achieves state-of-the-art performance on molecule generation, outperforming both one-shot and autoregressive flow-based baselines.
- On the Penn Treebank dataset, Categorical Normalizing Flows achieve a test loss of 1.27 ± 0.01 bits per character, matching the LSTM baseline while enabling parallel sampling.
- On text8, Categorical Normalizing Flows achieve 1.45 ± 0.01 bits per character, outperforming the baseline LSTM and latent normalizing flow models.
- On Wikitext103, Categorical Normalizing Flows achieve 5.43 ± 0.09 bits per character, significantly outperforming the baseline LSTM and latent NF models.
- On the credit card risk dataset, Categorical Normalizing Flows achieve a likelihood of 1.37 ± 0.03 bits per dimension, comparable to the latent normalizing flow baseline with lower reconstruction error.
- The method scales effectively to large categorical spaces, enabling training on datasets with up to 10,000 word categories without degradation in performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.