Unsure how kullback-leibler was invoked in derivation.

26 Views Asked by At

I am trying to understand how authors of the DDPM paper made the leap from equation 21 to equation 22 in appendix A.

Specifically, it is not clear to me how they managed to convert the first term of the first equation, into the kullback-leibler divergence (KLD) as the first term in the second equation, without "using up" the $\mathbb{E}_q$ on the outside of the brackets.

The definition of the KLD assumes a term that seems to be missing here.

\begin{equation} \mathbb{E}_q \left[ -\log \frac{p(X_T)}{q(X_T | X_0)} - \sum_{t>1} \log \frac{p_\theta(X_{t-1}|X_t)}{q(X_{t-1}|X_t, X_0)} - \log p_\theta(X_0|X_1) \right] \tag{21} \end{equation}

\begin{equation} = \mathbb{E}_q \left[ D_{KL}(q(X_T | X_0) || p(X_T)) + \sum_{t>1} D_{KL}(q(X_{t-1}|X_t, X_0) || p_\theta(X_{t-1}|X_t)) - \log p_\theta(X_0|X_1) \right] \tag{22} \end{equation}