# A question on notation in variational message passing

This paper introduces variational message passing. Formula (8) is based on Fig 1.

Formula (a) is $\ln Q^*_j(H_j)=\langle\ln P(H_j\mid\vec{pa_j})\rangle_{\sim Q(H_j)}+\sum_{k\in ch_j}\langle\ln P(X_k\mid pa_k)\rangle_{\sim Q(H_j)}+\text{const}$

$\langle\cdot\rangle$ is said to be an expectation. But I don't know what exactly the first term on RHS look like.

Is the first term $=\sum_{\vec{pa_j}}P(\vec{pa_j})\ln P(H_j\mid\vec{pa_j})$ or $\sum_{\vec{pa_j}}\ln P(H_j\mid\vec{pa_j})$? I think the first guess is more reasonable. However, if that is the case, what if the parents nodes have their parents? Do we still use $\sum_{\vec{pa_j}}P(\vec{pa_j})\ln P(H_j\mid\vec{pa_j})$ or $\sum_{\vec{pa_j}}P(\vec{pa_j}\mid\vec{ppa_j})\ln P(H_j\mid\vec{pa_j})$? where $ppa_j$ denotes the parents of parents.

And, my understanding for the second term on RHS is $\sum_{k\in ch_j}\sum_{\vec{cp_k^{(j)}}}P(\vec{cp_k^{(j)}})\ln P(X_k\mid\vec{pa_k})$.

Are my understandings correct? Thanks!