Adversarially-learned Inference via an Ensemble of Discrete Undirected Graphical Models

Adarsh K. Jeewajee, Leslie Pack Kaelbling

Probabilistic graphical models (PGMs) are powerful tools for representing joint distributions and performing structured conditional reasoning. However, they face a major hurdle: the trade-off between generality and performance. Standard training via Maximum Likelihood is often computationally intractable. To bypass this, researchers frequently use Empirical Risk Minimization (EGM), which optimizes the model for a specific "inference task" (e.g., predicting the bottom half of an image given the top). Unfortunately, EGM models are brittle; if tasked with an unseen query, their performance often collapses.

Conversely, deep generative models like VAEs or GANs excel at generating data but struggle to provide the interpretable, structured conditional reasoning inherent to PGMs. To bridge this gap, researchers have introduced Adversarially-learned Graphical Models (AGMs), an inference-agnostic framework that trains an infinite ensemble of discrete undirected graphical models using a GAN objective.

The AGM Framework

The core innovation of AGMs is combining the structural benefits of PGMs with the generative power of GANs. Instead of learning a single set of parameters for one graph, the framework utilizes a hypernetwork.

The AGM framework uses a hypernetwork to map noise vectors to an ensemble of graphical models.
  1. The Hypernetwork ($L_\theta$): A neural network generator maps a random noise vector $z$ to a set of UGM parameters $\Psi$. Because $z$ is continuous, this effectively creates an uncountably infinite ensemble of graphical models.
  2. Adversarial Training: The system is trained using the WGAN-GP (Wasserstein GAN with Gradient Penalty) objective. The generator produces marginal probability distributions via Belief Propagation (BP), and the discriminator tries to distinguish these from the one-hot encodings of real data. Crucially, no specific inference tasks are "baked in" during training.
  3. Ensemble Inference: At test time, a finite subset of models is sampled from the ensemble. To answer a query, BP is performed on each model, and the results are aggregated using log-linear pooling. This consensus mechanism is more robust to the approximate nature of loopy BP than simple linear averaging.
  4. One-Shot Sampling: Because the generator maps $z$ directly to parameters that yield marginals, AGMs can generate data samples in a single forward pass, bypassing the need for iterative Markov Chain Monte Carlo (MCMC) methods like Gibbs sampling.

Key Insights

  • Ensembles as Regularizers: A single UGM might be mis-specified or struggle with loopy BP approximations. By learning a distribution over parameters, the AGM covers the true data distribution more effectively, with different models in the ensemble acting as "local experts."
  • Inference-Agnosticism: By training purely to generate the joint distribution via the GAN objective, the model naturally learns the underlying dependencies required for any conditional query, rather than overfitting to one.

Experimental Results

The authors evaluated AGMs across a diverse range of datasets, including UCI Binary benchmarks, binarized images (MNIST, Caltech-101), discrete structured images (Stanford Background), and RGB images (SVHN).

Superior Generalization: In cross-task experiments, AGMs significantly outperformed EGM models. While EGMs were slightly better at the specific tasks they were trained for, they failed on unseen tasks. AGMs maintained high accuracy across all task types (fractional, corrupt, window, and quadrant).

Cross-task generalization results comparing EGM, VAEAC, GibbsNet, and AGM.

Competitive with Deep Learning: As shown in the generalization benchmarks, AGMs performed comparably to, or better than, state-of-the-art neural architectures designed for arbitrary conditioning, such as GibbsNet and VAEAC.

Faster, Better Sampling: AGMs produced higher-quality samples in "one shot" than Gibbs samplers did on EGM models, even after the Gibbs samplers were given 10 burn-in cycles. This makes AGMs a highly viable alternative for fast generative modeling.

Limitations and Future Work

While promising, the AGM framework has a few limitations. The current implementation assumes a fixed, pre-defined graph structure (e.g., a grid for images); learning the graph structure itself as part of the ensemble is a logical next step. Additionally, the framework is primarily designed for discrete variables. Extending this natively to high-dimensional continuous spaces remains a challenge. Finally, the reliance on loopy Belief Propagation means the underlying marginals are still approximations, suggesting that integrating more exact inference methods could further improve performance.

Summary updated

Abstract

Undirected graphical models are compact representations of joint probability distributions over random variables. To solve inference tasks of interest, graphical models of arbitrary topology can be trained using empirical risk minimization. However, to solve inference tasks that were not seen during training, these models (EGMs) often need to be re-trained. Instead, we propose an inference-agnostic adversarial training framework which produces an infinitely-large ensemble of graphical models (AGMs). The ensemble is optimized to generate data within the GAN framework, and inference is performed using a finite subset of these models. AGMs perform comparably with EGMs on inference tasks that the latter were specifically optimized for. Most importantly, AGMs show significantly better generalization to unseen inference tasks compared to EGMs, as well as deep neural architectures like GibbsNet and VAEAC which allow arbitrary conditioning. Finally, AGMs allow fast data sampling, competitive with Gibbs sampling from EGMs.
BibTeX
@inproceedings{jeewajee2020adversarially,
  author = {Adarsh K. Jeewajee and Leslie Pack Kaelbling},
  title = {{Adversarially-learned Inference via an Ensemble of Discrete Undirected Graphical Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=MFl-5sIjlO3},
}

Loading related content...

Figure