Handle complex graphs and high-dimensional variables with approximation methods. Learn MCMC sampling and variational inference for intractable probability computations.
Exact inference becomes intractable (computationally infeasible) in several scenarios:
Belief propagation may not converge or give incorrect results. Variable elimination can have exponential complexity.
Large state spaces make exact marginalization computationally expensive or impossible.
Non-standard or multi-modal distributions may not have closed-form solutions.
Use Monte Carlo sampling to approximate probabilities by drawing samples from the distribution.
Approximate the true distribution with a simpler distribution from a tractable family.
Markov Chain Monte Carlo (MCMC) methods construct a Markov chain whose stationary distribution is the target distribution. By sampling from the chain, we approximate the true distribution.
General-purpose MCMC algorithm that can sample from any distribution with known unnormalized density.
Algorithm Steps:
Special case of Metropolis-Hastings where we update one variable at a time, sampling from its conditional distribution given all other variables.
Algorithm Steps:
Advantages:
Variational inference approximates the true posterior with a simpler distribution from a tractable family. The goal is to find that minimizes the KL divergence from to .
Minimizing KL divergence is equivalent to maximizing the ELBO:
ELBO is a lower bound on the log evidence . Maximizing ELBO minimizes KL divergence.
KL divergence measures the difference between distributions:
KL divergence is always ≥ 0, and equals 0 only when .
The simplest variational family assumes variables are independent:
Each is optimized independently. This simplifies computation but may lose important dependencies.
Optimization:
Use coordinate ascent: iteratively optimize each while fixing others, until convergence.