Bidirectional Helmholtz Machines

Jörg Bornschein, Samira Shabanian, Asja Fischer, Yoshua Bengio

Introduction

In the landscape of deep generative models, architectures typically rely on two directed models: a top-down generator ($p$) that transforms latent variables into data, and a bottom-up inference network ($q$) that estimates the latent variables given the data.

The fundamental challenge is that these two models often fall "out of sync." In standard Helmholtz Machines or Variational Autoencoders (VAEs), the inference model $q$ is merely an approximation of the true posterior of $p$. If $p$ becomes too complex, $q$ fails to provide useful gradients, and the model stops learning effectively. This disconnect often limits the depth of these models, particularly when using discrete (binary) latent variables, which are notoriously difficult to optimize compared to continuous ones.

The Bidirectional Helmholtz Machine (BiHM) addresses this by forcing the generator and encoder to be mathematically consistent, defining the true model as the geometric mean of both. This unique approach naturally regularizes the model, enabling the training of significantly deeper architectures and providing orders-of-magnitude more efficient likelihood estimation.

Methods: A Geometric Mean Approach

The authors propose a radical shift: instead of treating $q$ as a secondary helper for $p$, they define a new joint distribution $p^*$ that is the geometric mean of the two:

$$p^*(x, h) = \frac{1}{Z} \sqrt{p(x, h)q(x, h)}$$

Where $Z$ is a normalization constant. By doing this, they ensure that the top-down and bottom-up distributions must "invert" each other.

Key Technical Highlights: * Bhattacharyya Distance: Maximizing the lower bound of the log-likelihood for this model is equivalent to maximizing the likelihood while simultaneously minimizing the Bhattacharyya distance between $p$ and $q$. This acts as a powerful, built-in regularizer. * Importance Sampling: Training is performed using importance sampling (similar to the Reweighted Wake-Sleep algorithm). This avoids the need for backpropagation through stochastic layers, making it easier to handle discrete variables. * Partition Function Estimation: Unlike many undirected models, the authors derived an unbiased estimator for the normalization constant ($Z^2$), allowing for accurate monitoring of the training process.

Key Insights and Ideas

By defining the model as a bridge between $p$ and $q$, the system is forced to learn representations that are easy to infer. If the generator creates data that the encoder cannot understand, the model is heavily penalized. This "inferability" constraint leads to several surprising benefits:

  • A Preference for Depth: Most discrete generative models struggle as they get deeper. Surprisingly, BiHMs actually perform better with deeper, narrower architectures. For MNIST, their best model used 12 latent layers—significantly deeper than what is typical for VAEs or standard Helmholtz machines.
  • Sample Efficiency: Because $p$ and $q$ are so closely aligned, the model requires far fewer samples to get a reliable estimate of the log-likelihood. While other models might need 10,000 samples to converge on a metric, BiHM achieves similar accuracy with just 10 to 100 samples.
Generated samples and test set log-likelihood comparison showing BiHM's high sample efficiency.

Key Results

The model was evaluated on several standard benchmarks for discrete data, including Binarized MNIST, the Toronto Face Database (TFD), and a suite of 8 diverse UCI Binary Datasets.

  • State-of-the-Art Performance: On binarized MNIST, the BiHM achieved a test log-likelihood of $\approx -84.3$, outperforming several contemporary methods like NVIL and RWS, and matching the performance of powerful autoregressive models like DARN.
  • Crisp Generations: Qualitative results on MNIST and TFD show that the model generates "crisp" (non-blurry) samples, avoiding the smoothing effects common in standard VAEs.
  • Robust Inpainting: The model demonstrated strong performance in "inpainting" (reconstructing missing parts of an image) by using Gibbs sampling to move between the $p$ and $q$ distributions.
Inpainting results on binarized MNIST, demonstrating the model's ability to reconstruct missing data.

Limitations and Future Work

While highly effective for discrete data, this paper focuses almost exclusively on binary latent variables. The authors suggest the framework could extend to continuous variables, but they did not implement or test it in this work. Additionally, while likelihood estimation is efficient, the training process still relies on importance sampling, which can be computationally expensive as the number of layers increases. Finally, the symmetric nature of the BiHM makes it a prime candidate for semi-supervised learning, an avenue left open for future research.

Summary updated

BibTeX
@inproceedings{bornschein2016bidirectional,
  author = {Jörg Bornschein and Samira Shabanian and Asja Fischer and Yoshua Bengio},
  title = {{Bidirectional Helmholtz Machines}},
  booktitle = {International Conference on Machine Learning},
  year = {2016},
  url = {https://openreview.net/forum?id=SJ-wZj-ubr},
}
Figure