4
$\begingroup$

I am reading this and am puzzled by equation 8. I don't understand the last bit: why can we move the gradient out of the expectation? $$E_Q[\nabla_\phi\log Q_\phi(h|x)] = E_Q[\frac{\nabla_\phi Q_\phi(h|x)}{Q_\phi(h|x)}]=\nabla_\phi E_Q[1]=0.$$

$\endgroup$
4
$\begingroup$

$$ E_Q\left[\frac{\nabla_\phi Q_\phi(h|x)}{Q_\phi(h|x)}\right] = \int\frac{\nabla_\phi Q_\phi(h|x)}{Q_\phi(h|x)} Q_\phi(h|x) = \int{\nabla_\phi Q_\phi(h|x)}$$

Assuming that you can exchange the integral and the gradient operators (deep waters)

$$ = \nabla_\phi\int{ Q_\phi(h|x)} = \nabla_\phi E_Q[1] = \nabla_\phi 1 =0$$

Since the distribution $Q$ is chosen by the user, you can say that this result is satisfied by those $Q$ that allow exchanging the integral and the gradient.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.