Model evidence from nonequilibrium simulations

Michael Habeck

Calculating the model evidence (or marginal likelihood) is a notoriously difficult problem in Bayesian machine learning. This metric is essential for comparing how well different models explain a given dataset, but computing it requires integrating over an enormous, often intractable, space of possible parameters.

Standard approaches, such as Markov Chain Monte Carlo (MCMC), frequently rely on Annealed Importance Sampling (AIS). AIS works by slowly "cooling" a system from a simple, tractable prior distribution to a complex posterior distribution. However, this method suffers from hysteresis: if the cooling schedule is too fast, the system lags behind and fails to reach equilibrium, resulting in biased estimates. Traditionally, researchers mitigate this by drastically slowing down the simulation, which incurs massive computational costs.

This paper proposes a paradigm shift: What if we could use that hysteresis to our advantage by running the simulation in reverse?

Bridging Physics and Machine Learning

To solve this, the author draws on nonequilibrium fluctuation theorems from statistical physics—specifically the Jarzynski equality and Crooks’ fluctuation theorem. In physics, these theorems relate the "work" done during a fast, nonequilibrium process to the change in "free energy." In the mathematical framework of machine learning, this change in free energy is exactly equivalent to the log-evidence.

By leveraging these theorems, the paper introduces two powerful bidirectional estimators that utilize both forward (prior to posterior) and reverse (posterior to prior) simulations:

  1. Bennett’s Acceptance Ratio (BAR): An algorithm that finds the evidence value that best reconciles the results of the forward and reverse simulations. It is mathematically proven to minimize mean squared error.
  2. Histogram Estimator: A non-parametric approach that combines all "work" values from both directions to reconstruct the underlying probability distributions. Crucially, this method also quantifies the uncertainty of the estimate.

Unlike standard AIS, which relies solely on forward paths and struggles with fast annealing schedules, these bidirectional methods are significantly more robust.

Work distributions and estimates demonstrating the intersection of forward and reverse simulations at the true log-evidence.

Key Insights and Experimental Results

The author evaluates these estimators across a range of complex models, including a Gaussian Toy Model, a 32 × 32 Ising Model, a Ten-state Potts Model, a Restricted Boltzmann Machine (RBM) trained on MNIST, and a Gaussian Mixture Model (GMM).

The experiments reveal several critical insights:

  • Hysteresis is Information: Instead of viewing the "lag" in fast simulations as a failure, the paper treats it as a measurable quantity. By comparing the forward lag to the reverse lag, the true evidence value can be effectively "sandwiched" and isolated.
  • The Power of Reverse: Reverse simulations often explore the "tails" of the distribution that forward simulations miss. These tails are exactly what the Jarzynski equality needs to provide an accurate estimate.
  • Superior Accuracy and Stability: On the Ising model, the BAR and Histogram estimators achieved a remarkable relative error of only $\sim 10^{-4}$, significantly outperforming both forward AIS and its reverse counterpart (RAISE). Furthermore, in the Potts model—which features a notoriously difficult "first-order" phase transition—the bidirectional estimators remained stable even under tight computational budgets.
  • Uncertainty Quantification: Unlike standard AIS, the Histogram estimator provides a full posterior distribution for the evidence itself, giving researchers a reliable confidence interval for their model comparisons.

Limitations and Future Directions

While highly effective, the bidirectional approach does have limitations. Running a reverse simulation requires the ability to sample from the posterior distribution. In highly complex models where the posterior is entirely unknown, obtaining that initial sample can be challenging (though using Maximum A Posteriori (MAP) or data-driven samples offers a practical starting point).

Additionally, running simulations in both directions effectively doubles the computation time per iteration. However, the author demonstrates that this is a small price to pay: the massive increase in accuracy and the ability to use much faster annealing schedules ultimately make these bidirectional estimators far more efficient than traditional methods.

Summary updated

BibTeX
@inproceedings{habeck2017model,
  author = {Michael Habeck},
  title = {{Model evidence from nonequilibrium simulations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
}
Figure