Arbitrary Conditional Distributions with Energy

Ryan Strauss, Junier Oliva

Introduction

In real-world machine learning, we rarely have "complete" data. A doctor might need to predict a patient's risk of heart disease based on a varying set of available test results, or a sensor array might have several units offline at any given time. This requires Arbitrary Conditional Density Estimation: the ability to model the relationship between any subset of unobserved variables ($x_u$) and observed variables ($x_o$).

The challenge is that there are an exponential number of possible subsets. A naive approach would require training a separate model for every combination, which is computationally impossible. Existing solutions often rely on restrictive assumptions—like Normalizing Flows, which require invertible transformations, or Gaussian Mixtures, which struggle with non-smooth or multi-modal data.

To address this, the authors introduce Arbitrary Conditioning with Energy (ACE), a novel framework that allows a single model to estimate any possible conditional distribution $p(x_u | x_o)$ across a set of variables. By decomposing complex multidimensional distributions into a series of one-dimensional energy-based conditionals, ACE achieves state-of-the-art performance in density estimation and data imputation while remaining simpler and more flexible than previous flow-based or variational methods.

The ACE Framework

ACE tackles the problem of arbitrary conditioning through three key design choices:

  1. 1D Decomposition: Using the chain rule of probability, the authors break down the task of estimating a high-dimensional conditional $p(x_u | x_o)$ into a product of one-dimensional conditionals. This significantly simplifies the learning process.
  2. Energy-Based Modeling (EBM): Instead of forcing the model to output a normalized probability (which is notoriously difficult), ACE uses an energy function $E(x)$ where the probability is proportional to $e^{-E(x)}$. This allows the use of any arbitrary neural network architecture without worrying about bijectivity or tractable Jacobians.
  3. Dual-Network Architecture:
    • The Proposal Network: A simple network that outputs parameters for a Mixture of Gaussians (MoG). This provides a "rough guess" of the distribution.
  4. The Energy Network: A more complex network that refines the proposal. It uses Importance Sampling to estimate the normalizer (partition function) for the 1D energy function, making the final density estimate highly accurate.
Overview of the Proposal and Energy networks used in ACE.

To handle different subsets of data with a single model, ACE uses a bitmask ($b$) to tell the networks which features are currently "observed" and which are "unobserved."

Experimental Validation

The authors evaluated ACE across a wide variety of benchmarks, including standard UCI Tabular Datasets (POWER, GAS, HEPMASS, MINIBOONE, and BSDS) for density estimation, MNIST for high-dimensional scaling (784 dimensions), and the UCI Adult Dataset to demonstrate handling of heterogeneous data (mixed continuous and discrete features).

ACE consistently outperformed previous state-of-the-art methods like ACFlow and VAEAC:

  • Log-Likelihood: On UCI datasets, ACE achieved higher log-likelihoods than all competitors across various "missingness" rates (0%, 10%, and 50% missing data).
  • Data Imputation: In terms of Normalized Root-Mean-Square Error (NRMSE), ACE proved superior at filling in missing values.
NRMSE of imputations generated by ACE compared to other methods. Lower is better.
  • High-Dimensional Scaling: On MNIST, ACE achieved a joint bits-per-dimension (BPD) of 1.42, which is competitive even with models designed only for joint density estimation, despite ACE being built for the much harder task of arbitrary conditioning.

Key Insights

  • Simplicity is a Feature: By reducing the problem to 1D conditionals, the authors made the intractable problem of calculating the "normalizer" (the $Z$ in $p(x) = \frac{1}{Z}e^{-E(x)}$) trivial. In 1D, importance sampling is highly efficient and accurate.
  • Energy Functions Avoid Bias: Unlike Normalizing Flows, which can be biased by their requirement for smooth, bijective transformations, energy functions can naturally represent non-smooth distributions with sharp edges or multiple isolated modes.
  • The "Proposal" is a Strong Baseline: Interestingly, the authors found that even their simple Proposal Network (using MoGs) often outperformed complex state-of-the-art flow models, suggesting that the 1D decomposition itself is a highly effective inductive bias.

Limitations and Future Directions

While ACE is highly expressive, it has a few limitations. Because it uses an autoregressive chain-rule approach during inference, it must process unobserved variables sequentially. While 1D conditionals can be batched, this may still be slower than "one-shot" generative models for very high-dimensional data.

Additionally, while the model is trained to be order-agnostic, it doesn't mathematically guarantee permutation consistency (i.e., $p(x_1, x_2 | x_o)$ might slightly differ depending on the calculation order). Finally, the current work assumes data is "Missing Completely At Random." Handling scenarios where the reason data is missing is related to the data itself (Missing Not At Random) remains an open challenge for future research.

Summary updated

BibTeX
@inproceedings{strauss2021arbitrary,
  author = {Ryan Strauss and Junier Oliva},
  title = {{Arbitrary Conditional Distributions with Energy}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=_idcJrecij},
}
Figure