Mehmet Emre Tiryaki
Back to Notes

Undirected Graphical Models

Definition

Eθ:Ω→RE_\theta : \Omega \to \mathbb{R} is an energy function, and

Pθ(x)∝e−Eθ(x)P_\theta(x) \propto e^{-E_\theta(x)}

Scaling EθE_\theta controls sharpness, Pθ(x)∝e−βEθ(x)P_\theta(x) \propto e^{-\beta E_\theta(x)} with β=1/T\beta = 1/T. In terms of potentials, −Eθ(x)=⟨θ,ϕ(x)⟩-E_\theta(x) = \langle \theta, \phi(x) \rangle, where each ϕ\phi is a function of some of the random variables.

Example For x∈{−1,1}nx \in \{-1, 1\}^n,

P(x)∝e⟨h,x⟩+12⟨x,Ax⟩=exp⁡(∑i=1nhixi+12∑i,j=1nAijxixj)P(x) \propto e^{\langle h, x \rangle + \frac{1}{2}\langle x, Ax \rangle} = \exp\Big(\sum_{i=1}^{n} h_i x_i + \frac{1}{2}\sum_{i,j=1}^{n} A_{ij} x_i x_j\Big)

with AA symmetric. If Aij=0A_{ij} = 0 there is no direct relation between xix_i and xjx_j. Not easy to sample, but the conditionals are simple. Only the terms with xix_i survive in

P(xi=1∣x−i)=P(xi=1,x−i)P(xi=1,x−i)+P(xi=−1,x−i)=eaieai+e−ai,ai=hi+∑j≠iAijxjP(x_i = 1 | x_{-i}) = \frac{P(x_i = 1, x_{-i})}{P(x_i = 1, x_{-i}) + P(x_i = -1, x_{-i})} = \frac{e^{a_i}}{e^{a_i} + e^{-a_i}}, \qquad a_i = h_i + \sum_{j \neq i} A_{ij} x_j

which only depends on the neighbours of ii. So Xi⊥X({i}∪N(i))c∣XN(i)X_i \perp X_{(\{i\} \cup N(i))^c} \mid X_{N(i)}.

Factorization

With C\mathcal{C} the maximal cliques of GG, PP factorizes with respect to GG if

P(x)∝e−E(x),−E(x)=∑c∈Cϕc(xc),P(x)∝∏c∈Cψc(xc),ψc=eϕc(xc)P(x) \propto e^{-E(x)}, \qquad -E(x) = \sum_{c \in \mathcal{C}} \phi_c(x_c), \qquad P(x) \propto \prod_{c \in \mathcal{C}} \psi_c(x_c), \quad \psi_c = e^{\phi_c(x_c)}

Independences

  • Global Markov For all A,B,CA, B, C such that CC separates AA and BB, XA⊥XB∣XCX_A \perp X_B \mid X_C.
  • Local Markov Xv⊥X({v}∪Nv)c∣XNvX_v \perp X_{(\{v\} \cup N_v)^c} \mid X_{N_v}.
  • Pairwise Markov For nonadjacent v,wv, w, Xv⊥Xw∣X{v,w}cX_v \perp X_w \mid X_{\{v, w\}^c}.

Belief Propagation

For P(x)∝∏iϕi(xi)∏(i,j)∈Eϕij(xi,xj)P(x) \propto \prod_i \phi_i(x_i) \prod_{(i,j) \in E} \phi_{ij}(x_i, x_j), the message from XkX_k to its neighbour XmX_m is

ϕXmXk→Xm(xm)=∑xkϕXk(xk) ϕXk,Xm(xk,xm)∏Xi∈N(Xk)∖{Xm}ϕXkXi→Xk(xk)\phi_{X_m}^{X_k \to X_m}(x_m) = \sum_{x_k} \phi_{X_k}(x_k)\, \phi_{X_k, X_m}(x_k, x_m) \prod_{X_i \in N(X_k) \setminus \{X_m\}} \phi_{X_k}^{X_i \to X_k}(x_k)