A Variational Approximation for Bayesian Networks with Discrete and Continuous Latent Variables

Kevin P. MurphyUAI 1999

Introduction

Probabilistic graphical models often need to handle "hybrid" scenarios where discrete and continuous variables interact. For instance, a continuous variable like "temperature" might influence a discrete outcome like "thermostat status." While exact inference is straightforward when continuous variables are Gaussian and have no discrete children, the presence of discrete nodes with continuous parents breaks standard analytical methods.

The Challenge of Hybrid Inference

Performing inference in these networks is notoriously difficult. Researchers typically choose between two suboptimal paths:

  1. Discretization: Converting continuous variables into bins, which is computationally expensive and inaccurate in high-dimensional spaces.
  2. Sampling (e.g., MCMC): Simulating the model repeatedly. While flexible, this is slow to converge and computationally demanding.

Kevin P. Murphy proposes a middle ground: a variational approximation that is faster than sampling while remaining more accurate and scalable than discretization.

The Variational Approximation Method

The core contribution is a technique to handle the logistic function, which commonly links continuous parents to discrete children.

The Logistic-to-Gaussian Trick

The method uses a quadratic lower bound to approximate the logistic sigmoid function. Since a quadratic in the exponent defines a Gaussian distribution, this approximation allows the system to treat the relationship as Gaussian. These "Variational Gaussian" (VG) potentials can then be integrated into the Junction Tree Algorithm, the standard for exact inference in discrete/Gaussian networks.

Iterative Refinement and Evidence Handling

The approximation relies on a variational parameter ($\xi$), adjusted through an EM-like iterative process to tighten the lower bound. Furthermore, Murphy introduces a more efficient way to handle evidence by creating clique potentials after observations arrive, avoiding the memory "blow-up" associated with large discrete state spaces.

Experimental Evaluation: The Crop Network

The method was evaluated using a synthetic "Crop Network," modeling the interplay between government subsidies, crop yield, market price, and consumer behavior.

The Crop Network structure used for evaluation, featuring both discrete (rectangles) and continuous (circles) nodes.

The variational approach was compared against Gibbs Sampling (using the BUGS package) as a ground truth for accuracy.

Key Results and Insights

The variational method demonstrated significant performance gains:

  • Speed: The approximation took approximately 2.5 minutes in Matlab, compared to 12–17 minutes for compiled Gibbs sampling.
  • Accuracy: For unimodal distributions, the results were nearly indistinguishable from sampling.
  • Convergence: Variational parameters typically converged within 2 to 9 iterations.
Comparison of the exact posterior distribution versus the variational approximation (w=4).

A critical insight is that while a quadratic is a poor fit for a sigmoid in isolation, the joint distribution of a Gaussian parent and a logistic child is often very close to Gaussian, explaining the high practical accuracy.

Limitations and Future Directions

The primary limitation is bimodality. If a posterior distribution has two distinct peaks, the Gaussian approximation may struggle or get trapped in a local maximum. Future work aims to extend this binary logistic approach to multi-valued discrete nodes using the softmax function and to apply these techniques to hybrid Dynamic Bayesian Networks, such as Switching Kalman Filters.

Summary updated

BibTeX
@inproceedings{murphy1999variational,
  author = {Kevin P. Murphy},
  title = {{A Variational Approximation for Bayesian Networks with Discrete and Continuous Latent Variables}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {1999},
}
Figure