139 words
1 minutes
[CS5340] Variational Inference

Approximate Inference#

  • Goal: find the posterior p(ZX)p(Z|X) (intractable)
  • Stochastic approximation: MCMC
  • Deterministic approximation: Variational approach

Variational Approach#

  • Given p(X,Z)p(X,Z), find approximation q(Z)q(Z) for p(ZX)p(Z|X)
  • minimize KL-divergence
    • KL(zp)=q(z)lnp(ZXq(Z)dZ0KL(z||p) = - \int q(z) ln \frac {p(Z|X} {q(Z)} dZ \geq 0
    • but p(ZX)p(Z|X) is intractable
  • \Rightarrow we maximize lower-bound of log likelihood
    • argmaxL(q)=q(Z)lnp(X,Z)q(Z)dZargmax L(q) = \int q(Z) ln \frac {p(X,Z)}{q(Z)} dZ

Mean-Field Approximation#

  • q(Z)=i=1Mqi(Zi)q(Z) = \prod_{i=1}^M q_i(Z_i)
  • L(q)=infiqi(lnp(X,Z)ilnqi)dZ =...=KL(qjp~(x,zj))+constantL(q) = \inf \prod_i q_i (ln p(X,Z) - \sum_i ln q_i) dZ \ = ... = -KL(q_j || \tilde p(x, z_j)) + constant
  • lnQj(Zj)=Eij[lnp(X,Z)]+constant\Rightarrow ln Q^*_j(Z_j) = E_{i \neq j} [ln p(X,Z)] + constant
  • KL(q||p) \neq KL(p||q)
  • See the examples in the slides

Loopy Belief Propogation#

  • belief propagation in graphs with cycles
  • initialized all messages and beliefs to 11
    • mst(xt)=1m_{s \rightarrow t} (x_t) =1, belS(xs)=1bel_S(x_s) = 1
  • every iteration update belief for each node
  • send message on each node
    • asychronous: define a hierachical order given by the tree
    • synchronous: all current messages are updated with messages from previous step
[CS5340] Variational Inference
https://itsjeremyhsieh.github.io/posts/cs5340-10-variational-inference/
Author
Jeremy H
Published at
2024-10-28