Comparing different model structures to find the one that best explains data without overfitting is a foundational task in machine learning. In the Bayesian framework, this is achieved by calculating the marginal likelihood (or "evidence"). However, for Markov Random Fields (MRFs)—undirected graphical models used in domains ranging from computer vision to social network analysis—this calculation is notoriously difficult.
MRFs are considered "doubly intractable":
- The normalization constant (the partition function) is hard to compute.
- Integrating over the model parameters to find the evidence is even harder.
Because of these hurdles, researchers typically rely on the Bayesian Information Criterion (BIC), which is often too crude for small datasets, or Markov Chain Monte Carlo (MCMC) methods, which are computationally expensive. This paper introduces the "Bethe-Laplace" approximation, a fast, closed-form method for calculating the marginal likelihood of MRFs that significantly outperforms standard BIC methods on small datasets.
The Bethe-Laplace Approximation
To tackle the double intractability of MRFs, the authors propose a two-layered approximation strategy:
- The Laplace Approximation: The authors assume the posterior distribution of the parameters is approximately Gaussian (normal) around the Maximum A Posteriori (MAP) estimate. This assumption transforms a difficult integral into a formula involving the log-partition function and its second derivative (the covariance matrix of the features).
- The Bethe-Linear Response Layer: Because the partition function and covariance matrix remain intractable, the authors employ a suite of approximations:
- Belief Propagation (BP) to find the MAP parameters.
- Bethe Free Energy to approximate the log-partition function.
- Linear Response (LR) Theorem to approximate the covariance matrix (the Hessian of the log-partition function).
This combined approach yields a deterministic, closed-form estimate of the model score that is much faster than sampling-based methods.
Key Results: Superior Accuracy for Small Datasets
The authors evaluated their method using synthetic data (5-node Boltzmann machines) and real-world data (the Newsgroup FAQ dataset treated as a Conditional Random Field).
A critical insight from the paper is that the $O(1)$ terms—constant terms ignored by standard BIC because they don't scale with the number of data points ($N$)—are crucial for accuracy when datasets are small.
For small sample sizes (e.g., $N=50$), the Bethe-Laplace method (labeled BP-LR) tracks the exact Laplace results and the ground truth very closely. In contrast, the standard BIC-ML approach deviates significantly.
When looking at the absolute score difference compared to the Annealed Importance Sampling (AIS) ground truth, the Bethe-Laplace method is roughly two orders of magnitude more accurate than BIC-ML for small datasets. Furthermore, unlike MCMC methods that require thousands of samples, this method relies on deterministic message-passing, making it highly practical for tasks where many structures must be compared quickly.
The Bias-Variance Tradeoff at Large $N$
A surprising finding was that the method's accuracy actually deteriorates relative to BIC as the dataset size ($N$) grows.
The authors conjecture that as $N$ increases, the variance of the posterior distribution shrinks. Eventually, the inherent bias in the Belief Propagation estimate of the parameters becomes larger than the standard deviation of the posterior. At this "switch-over" point, the second-order Taylor expansion used in the Laplace approximation becomes unreliable, causing the BP-LR error to grow (as seen in the $N=10000$ charts).
Limitations and Future Directions
While the Bethe-Laplace approximation is a powerful tool for small datasets, it has limitations:
- The Large $N$ Problem: Due to the bias in BP, the method performs worse than BIC on large datasets. Using more accurate learning techniques (like contrastive divergence) to find the MAP estimate could mitigate this.
- Strong Interactions: Like all methods based on standard Belief Propagation, the approximation can break down in models with very strong correlations or many tight loops.
- Hidden Variables: The current study focused on fully observed MRFs. Extending this to models with latent variables remains an open area for empirical testing.
Future work may explore higher-order approximations, such as Kikuchi approximations (a more advanced version of the Bethe approximation), to further improve accuracy and robustness.
Summary updated