A slick expectation calculation: how was it done? $\newcommand{\Cov}{\mathrm{Cov}}$
We have that 
$$
\Delta_{\lambda} KL(\lambda) = \mathbb{E}_{\theta\sim q_{\lambda}(\theta),z\sim g_{N}(z|\theta)}(\Delta_{\lambda}[\log \: q_{\lambda}(\theta)](\log \: q_{\lambda}(\theta)-\hat{h}(\theta,z)))
$$
We also have that $$q_{\lambda}(\theta)=\exp (T(\theta)'\lambda - Z(\lambda))$$
where $T(\theta)$ is vector of sufficient statistics and $\lambda$ is vector of natural parameters, so that $q_{\lambda}(\theta)$ has an exponential family form.  Then $\Delta_{\lambda}Z(\lambda)=\mathbb{E}_{q_{\lambda}}[T(\theta)]$.  Then, $\Delta_{\lambda} KL(\lambda)$ becomes
$$
\begin{eqnarray}
\Delta_{\lambda} KL(\lambda) &=& \mathbb{E_{\theta}} [(T(\theta)-\mathbb{E}_{\theta}[T(\theta)])(T(\theta)'\lambda-\mathbb{E}_{z}\hat{h}(\theta,z))]\\
&=& \mathbb{E_{\theta}} [(T(\theta)-\mathbb{E}_{\theta}[T(\theta)])T(\theta)']\lambda-\mathbb{E}_{\theta}[(T(\theta)-\mathbb{E}_{\theta})\mathbb{E}_{z}\hat{h}(\theta,z)]\\
&=& \Cov _{q_{\lambda}}(T(\theta),T(\theta))\lambda - \mathbb{E}_{\theta}[(T(\theta)-\mathbb{E}_{\theta})\mathbb{E}_{z}\hat{h}(\theta,z)]
\end{eqnarray}
$$
I have three questions:


*

*Why is $\Delta_{\lambda}Z(\lambda)=\mathbb{E}_{q_{\lambda}}[T(\theta)]$ true?

*In $\Delta_{\lambda} KL(\lambda) = \mathbb{E_{\theta}} [(T(\theta)-\mathbb{E}_{\theta}[T(\theta)])(T(\theta)'\lambda-\mathbb{E}_{z}\hat{h}(\theta,z))]$, how did we get rid of $Z(\lambda)$?

*Why is $\mathbb{E_{\theta}} [(T(\theta)-\mathbb{E}_{\theta}[T(\theta)])T(\theta)']=\Cov _{q_{\lambda}}(T(\theta),T(\theta))$?  Shouldn't it be $\mathbb{E_{\theta}} [(T(\theta)-\mathbb{E}_{\theta}[T(\theta)])(T(\theta)-\mathbb{E}_{\theta}[T(\theta)])']=\Cov _{q_{\lambda}}(T(\theta),T(\theta))$


Note: taken from the top of p. 09 on http://xxx.tau.ac.il/pdf/1503.08621v1.pdf
 A: All it involves is a little bit of calculation:


*

*Take the equation $q_{\lambda}(\theta) = \exp(T(\theta)'\lambda -Z(\lambda)$) and differentate both sides with respect to $\lambda$. The derivative of the exponential function is itself, and by the chain rule we obtain 
$$ \Delta_\lambda q_{\lambda}(\theta) = T(\theta)q_{\lambda}(\theta) - \Delta_\lambda Z(\lambda)q_{\lambda}(\theta)$$


Solving for $\Delta_\lambda Z(\lambda)$ we get
$$ \Delta_\lambda Z(\lambda) = T(\theta) - \Delta_\lambda (\log q_{\lambda}(\theta))$$. 
The paper notes on page 5 that $E_\theta(\Delta_\lambda (\log q_{\lambda}(\theta))) = 0$, hence taking expected values in the above equation we arrive at 
$$ \Delta_\lambda Z(\lambda) = E_\theta(\Delta_\lambda Z(\lambda)) = E_\theta T(\theta) - E_\theta(\Delta_\lambda (\log q_{\lambda}(\theta))) = E_\theta T(\theta) .$$


*$Z(\lambda)$ does not depend on $\theta$, so it's a constant when taking expected values over $\theta$ an $z$:
$$ E_{\theta,z}( (T(\theta) - \Delta_\lambda Z(\lambda))Z(\lambda)) = Z(\lambda)  E_{\theta,z}( (T(\theta) - \Delta_\lambda Z(\lambda)) = Z(\lambda)  E_{\theta,z}( (T(\theta) - E_\theta T(\theta)) = 0  $$

*Yes, since $E_\theta ( (T(\theta) - E_\theta T(\theta)) E_\theta (T(\theta)')) = 0$, the two expressions are the same.
A: I think that I have the answer for part (1): check out section 4 on this pdf. It's a result of being an exponential family. 
