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

ACFlow: Flow Models for Arbitrary Conditional Likelihoods

Yang Li, Shoaib Akbar, Junier Oliva

TL;DR

ACFlow is a novel generative flow model designed to compute arbitrary conditional likelihoods—meaning it can estimate the probability of any subset of features given any other subset. By combining a clever masking mechanism with adaptive flow transformations, it provides a unified, tractable framework for data imputation and marginalization that outperforms existing variational and autoregressive baselines.

What Problem Does This Paper Address?

In the world of generative modeling, we usually care about the joint distribution $p(x)$ (how likely is this whole data point?) or a fixed conditional distribution $p(y|x)$ (given this image, what is the label?). However, real-world data is messy. You might have a dataset where different features are missing for different entries.

Standard flow models—which are prized for providing exact, tractable likelihoods—struggle here because they typically require a fixed input dimensionality and a fixed relationship between variables. If you wanted to model every possible conditional distribution $p(x_{unobserved} | x_{observed})$, you would theoretically need an exponential number of models. Existing workarounds, like VAEAC (a Variational Autoencoder approach), often produce blurry results or lack an analytically normalized likelihood. ACFlow aims to bring the precision and tractability of flow models to this "arbitrary conditioning" problem.

Methods

The core innovation of ACFlow is its ability to handle varying subsets of observed ($x_o$) and unobserved ($x_u$) features using a single architecture.

ACFlow Architecture Components
  1. The Masking Mechanism: The authors use a binary mask $b$ to indicate which dimensions are observed. They introduce a "zero-imputing function" that pads unobserved dimensions with zeros, allowing a standard neural network to process a fixed-length vector regardless of which features are actually present.
  2. Conditional Flow Transformations: They adapt standard flow building blocks to be "conditioning-aware":
  3. Affine Coupling: Splits the unobserved features into two groups and uses the observed features (and the mask) to determine the scaling and shifting.
  4. Linear Transformations: Uses a Deep Neural Network (DNN) to generate an adaptive weight matrix $W$ and bias $t$ based on the current mask.
  5. RNN Coupling: To handle the sequential dependencies and arbitrary dimensionality of the unobserved set, they use a Recurrent Neural Network to parameterize the flow.
  6. Best Guess Objective: Flow models naturally output a distribution of possible values. To provide a single "best guess" for imputation (like a mean), the authors introduce an auxiliary Mean Squared Error (MSE) loss. This encourages the model to ensure that the center of its latent distribution maps back to a high-quality point estimate in the original data space.

Datasets

The authors evaluated ACFlow across three distinct types of data:

  • Synthetic 2D Data: Used to visualize the model's ability to capture highly multi-modal conditional distributions (e.g., spirals).
  • Image Datasets: MNIST, Omniglot, and CelebA. These were used for "inpainting" tasks, where arbitrary patches of the image are removed and must be predicted.
  • UCI Tabular Datasets: Five standard benchmarks (bsds, gas, hepmass, miniboone, and power) used to test feature imputation in high-dimensional, real-valued spaces.

Key Insights and Ideas

  • Unified Marginalization: ACFlow can perform arbitrary marginalization (calculating $p(x_u)$) simply by conditioning on an empty set of observed features. This was previously a major pain point for flow-based and autoregressive models.
  • Flows vs. VAEs: The paper highlights that while VAEs (like VAEAC) tend to "average" across modes—resulting in blurry imputations—ACFlow's exact likelihood formulation allows it to represent distinct, sharp modes in the distribution.
ACFlow vs VAEAC on Synthetic Data
  • Weight Tying as Regularization: Interestingly, training one model to handle many different conditional tasks (by varying the masks during training) seems to act as a form of regularization, sometimes leading to better joint likelihoods than models trained only on the joint distribution.

Key Results

  • Likelihood Superiority: On image datasets, ACFlow achieved significantly lower Negative Log-Likelihood (NLL) than VAEAC and PixelCNN. For example, on CelebA, ACFlow reached an NLL of ~8387 compared to VAEAC’s ~17638.
  • State-of-the-Art Imputation: In tabular data experiments, ACFlow consistently outperformed classic methods like MICE and MissForest, as well as deep learning competitors like GAIN and MisGAN, particularly when the percentage of missing data was high (50%).
  • High-Quality Inpainting: Qualitative results on CelebA show that ACFlow generates much sharper and more diverse facial completions than VAEAC, which often produced "ghostly" or blurred averages.

Limitations and Future Work

  • Sampling Speed: Because ACFlow uses autoregressive components (like RNNs or PixelCNNs) in its latent space to maintain flexibility, drawing samples can be computationally expensive for very high-dimensional data.
  • Missingness Assumptions: The study primarily focuses on data that is "Missing Completely At Random" (MCAR). Handling "Missing Not At Random" (MNAR) scenarios—where the fact that data is missing is itself informative—remains a more difficult challenge.
  • Causal Reasoning: The authors suggest that being able to model arbitrary conditionals is a stepping stone toward learning underlying graphical structures and reasoning about causality.

Summary updated

BibTeX
@inproceedings{li2020acflow,
  author = {Yang Li and Shoaib Akbar and Junier Oliva},
  title = {{ACFlow: Flow Models for Arbitrary Conditional Likelihoods}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=IBEe4bPPAv},
}
Figure