A Variational Baysian Framework for Graphical Models

Hagai AttiasNeurIPS 1999

In the world of machine learning, we often face a classic dilemma: do we want a model that fits our training data perfectly, or one that generalizes well to new data? Standard techniques like Maximum Likelihood (ML) are notorious for "overfitting"—memorizing the noise in a dataset rather than learning the underlying signal. Furthermore, ML inherently prefers more complex models, making it difficult to perform automatic model selection.

While the Bayesian framework offers a theoretical cure for these issues by integrating over all possible parameters, it has historically been too computationally expensive for complex, real-world problems. In this seminal paper, Hagai Attias introduces Variational Bayes (VB), a practical framework that brings Bayesian rigor to graphical models without the crushing computational cost of traditional methods.

The Variational Approach

Most researchers use ML to train graphical models, looking for a single "best" set of parameters. The "pure" Bayesian approach solves overfitting by integrating over all possible parameters, but this is usually intractable. Existing shortcuts like Markov chain Monte Carlo (MCMC) are too slow, and large-sample approximations often make the dangerous assumption that every distribution is Gaussian.

Attias proposes a Variational approach. Instead of trying to calculate the true, messy posterior distribution, the framework looks for a simpler, "variational" distribution $q$ that is as close to the truth as possible. Key innovations include:

  • Factorization: The framework assumes that, given the data, the hidden variables and the parameters are independent in the approximating distribution.
  • The VB-EM Algorithm: The paper derives an iterative algorithm similar to Expectation-Maximization (EM). In the "E-step," the distribution over hidden variables is updated; in the "M-step," the distribution over the parameters is updated.
  • Conjugate Priors: By using specific types of prior distributions (like Dirichlet for proportions or Wishart for matrices), the updates remain analytical, avoiding heavy numerical simulation.
  • Free-form Optimization: Unlike other methods, VB doesn't force the posteriors to be Gaussian. They emerge in their natural functional forms from the optimization process.

This approach naturally includes a complexity penalty in the objective function, allowing for direct model selection (e.g., determining the number of sources in a signal). Furthermore, because the full distribution of parameters is maintained, predictive densities can be calculated analytically, resulting in robust distributions like the Student-t.

Experimental Results

The author demonstrates the framework on three distinct tasks, comparing the Variational Bayesian Mixture of Gaussians (VB-MOG) to standard EM and ML approaches.

Regression: Boston Housing

On the classic Boston Housing dataset (predicting house prices from 13 features), VB-MOG achieved a Mean Squared Error (MSE) of 11.9, significantly outperforming standard EM (14.6) and rivaling sophisticated ensemble techniques like Bagging.

Classification: Digit Recognition

The framework was tested on the Buffalo Post Office Digits dataset, involving $8 \times 8$ gray-level pixel arrays of handwritten digits (0-9). VB-MOG achieved a 1.8% misclassification rate, compared to 2.5% for standard EM.

Buffalo digits and misclassification histogram

Blind Source Separation (BSS)

In a synthetic BSS experiment, 11-dimensional data was generated by mixing 5 distinct speech and music signals with added Gaussian noise. The VB framework correctly identified that there were exactly 5 sources from a range of possibilities (1 to 12), as shown by the peak in the log probability. It also demonstrated a much lower reconstruction error than ML, which suffered from overfitting the mixing matrix.

Model selection and reconstruction error for BSS

Limitations and Future Directions

While powerful, the VB framework has limitations. The core factorization assumption—that parameters and hidden variables are independent in the posterior—might ignore complex correlations. Additionally, for highly complex models like the BSS example, the author had to specify a parametric form for the hidden variable posterior because a totally "free-form" version was intractable.

Future work suggests integrating VB with the junction tree algorithm to create a truly general-purpose Bayesian inference engine for any graphical model.

Reference: Attias, H. (2000). A Variational Bayesian Framework for Graphical Models. Advances in Neural Information Processing Systems (NIPS).

Summary updated

BibTeX
@inproceedings{attias1999variational,
  author = {Hagai Attias},
  title = {{A Variational Baysian Framework for Graphical Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1999},
}
Figure