Abstract
We propose a black-box algorithm called Adversarial Variational Inference and Learning (AdVIL) to perform inference and learning on a general Markov random field (MRF). AdVIL employs two variational distributions to approximately infer the latent variables and estimate the partition function of an MRF, respectively. The two variational distributions provide an estimate of the negative log-likelihood of the MRF as a minimax optimization problem, which is solved by stochastic gradient descent. AdVIL is proven convergent under certain conditions. On one hand, compared with contrastive divergence, AdVIL requires a minimal assumption about the model structure and can deal with a broader family of MRFs. On the other hand, compared with existing black-box methods, AdVIL provides a tighter estimate of the log partition function and achieves much better empirical results.
Introduction
Markov Random Fields (MRFs) are powerful tools for modeling dependencies in data, but they come with a significant computational challenge: the partition function. In an undirected model, the probability of a state is defined by an energy function. To ensure these probabilities sum to one, the energy must be divided by a global normalizing constant, the partition function $Z$. Calculating $Z$ is often intractable for complex models as it requires summing over every possible configuration of the system.
Traditional solutions like Contrastive Divergence (CD) rely on MCMC sampling, which is slow and highly dependent on specific model structures. Recent "black-box" attempts, such as NVIL, utilize variational bounds but often suffer from high variance and a tendency to underestimate the partition function, leading to poor performance on high-dimensional data.
Methodology: The AdVIL Framework
AdVIL introduces a "double variational trick" to bypass the partition function problem by framing it as a minimax optimization problem. The framework utilizes two distinct neural networks:
- Variational Encoder ($Q$): This network approximates the posterior distribution of latent variables, providing an upper bound on the "free energy" (the positive phase of training).
- Variational Decoder ($q$): This network acts as an approximate sampler for the MRF, providing a lower bound on the log partition function (the negative phase).
The training objective is formulated as a minimax game where the model parameters ($\theta$) and the encoder ($\phi$) minimize the objective, while the decoder ($\psi$) maximizes it to provide the tightest possible bound on the partition function. To enhance the decoder's flexibility in tracking complex, multi-modal distributions, the authors introduce an auxiliary variable ($z$).
Experimental Setup
The authors evaluated AdVIL across several standard benchmarks for generative modeling:
- Digits: Handwritten digits (64 dimensions).
- UCI Binary Databases: Eight datasets including Adult, Connect4, DNA, Mushrooms, NIPS-0-12, Ocr-letters, and RCV1.
- Frey Faces: Continuous face images used to test the model's ability to handle non-binary data.
Results and Discussion
AdVIL demonstrates several key advantages over existing methods. By turning a sampling problem into an optimization problem, it achieves structural independence, allowing it to be applied to Restricted Boltzmann Machines (RBMs), Deep Boltzmann Machines (DBMs), and continuous models (GRBMs) without new sampling derivations.
Key empirical results include:
- Superior Log-Likelihood: In RBM experiments on UCI datasets, AdVIL consistently outperformed NVIL in Annealed Importance Sampling (AIS) scores (e.g., -19.59 vs -29.28 on Mushrooms).
- Handling Complexity: AdVIL successfully trained DBMs, outperforming Variational Contrastive Divergence (VCD) on five out of eight datasets.
- Stability: On the Frey Faces dataset, AdVIL learned meaningful feature detectors and generated realistic samples, proving its efficacy on continuous data.
Conclusion and Future Work
While AdVIL offers significant flexibility and tighter bounds, it can be slower than specialized methods like VCD due to the decoder requiring multiple updates. Future work may involve utilizing advanced non-convex optimization techniques to accelerate the "inner loop" of decoder updates. Additionally, scaling the estimation of global partition functions for very high-dimensional spaces remains an ongoing challenge in the field.
Summary updated