I have been reading this (http://www.jting.net/pubs/2007/ting-ICRA2007.pdf) paper and attempting to derive the Variational EM update equations here. So, the model is given as follows:
$$ y_i \sim N(\beta x_i, \frac{w_i}{\sigma^2}) \\ \beta \sim N(\beta_0, \Sigma_0) \\ w_i \sim G(a, b) $$
So, here $y_i$ are the observations that depend on $x_i$ through the coefficients $\beta$. There are normal and gamma distributional assumptions on $\beta$ and $w_i$, which are the noise variances. The idea being every point is independent but not identically distributed.
Now, the joint model is written as:
$$ p(\beta) \prod_{i=1}^{N}P(y_i|x_i, w_i, \beta) \prod_{i=1}^{N} P(w_i) $$
Taking the log, we have:
$$ \log P(\beta) + \sum_{i=1}^{N} \log P(y_i|x_i, w_i, \beta) + \sum_{i=1}^{N} \log P(w_i) $$
Now, as in the paper, we use variational bayes and mean field approximation to do inference on $\beta$ and $W$. So, for the update on the distribution parameters for $\beta$, I need to take the expectation wrt to $Q(w)$. Doing that, I first expand the equations as follows. I am dropping the expression for $P(w_i)$ as it does not depend on $\beta$.
$$ \sum_{i=1}^{N} \bigg[\log (\frac{1}{\sigma} \sqrt{\frac{w_i}{2 \pi}}) - \frac{1}{2}(y_i -\beta^T x_i) \frac{w_i}{\sigma^2}(y_i - \beta^T x_i)\bigg] + \log \big[(2 \pi)^{-k/2} |\Sigma_0|^{-1/2}\big] - \frac{1}{2} \big[(\beta - \beta_0)^T \Sigma_0^{-1}(\beta - \beta_0)\big] $$
Here $k$ is the number of $\beta$ components. Now, dropping some constant terms wrt $\beta$, I have:
$$ \big[\frac{1}{2} \sum_{i=1}^{N} \log (w_i) - \frac{w_i}{\sigma^2}(y_i - \beta^T x_i)(y_i - \beta^T x_i)\big] - \frac{1}{2} \big[(\beta - \beta_0)^T \Sigma_0^{-1}(\beta - \beta_0)\big] $$
Now, in the paper the expectation for $\beta$ is given as:
$$ <\beta> = \Sigma_{\beta}\big(\Sigma_0^{-1}\beta_0 + \frac{1}{\sigma^2} \sum_{i=1}^{N} <w_i>y_ix_i \big) $$
Now, I am having a lot of trouble deriving this step from the expression that I got before. Any pointers would be greatly appreciated!