Where's wrong in my reasoning behind upper bound for reconstruction error? In the paper Mutual Information Neural Estimation, the authors derive the reconstruction error in BiGAN as 
$$
\mathcal R=E_{x\sim q(x)}E_{z\sim q(z|x)}\left[-\log p(x|z)\right]
$$
where $q(z|x)$ is the encoder and $p(x|z)$ is the generator/decoder. Here's the derivation I derive following the paper
$$
\begin{align}
\mathcal R&=E_{x\sim q(x)}E_{z\sim q(z|x)}\left[-\log p(x|z)\right]\\
&=E_{x,z\sim q(x,z)}\left[\log {p(z)\over p(x, z)}\right]\\
&=E_{x,z\sim q(x, z)}\left[\log {q(x,z)\over p(x,z)}-\log q(x,z)+\log p(z) \right]\\
&=D_{KL}(q(x,z)\Vert p(x,z))+H_q(x,z)+ E_{z\sim q}\left[\log p(z)\right]\\
&=D_{KL}(q(x,z)\Vert p(x,z))+H_q(x,z)-D_{KL}(q(z)\Vert p(z))-H_q(z)\\
&=D_{KL}(q(x,z)\Vert p(x,z))-D_{KL}(q(z)\Vert p(z))+H_q(x|z)\\
&=D_{KL}(q(x,z)\Vert p(x,z))-D_{KL}(q(z)\Vert p(z))-I_q(x,z)+H_q(x)\\
&\le D_{KL}(q(x,z)\Vert p(x,z))-I_q(x,z)+H_q(x)
\end{align}
$$
There're two things confusing me:


*

*I think $H_q(x,z)-H_q(z)=H_q(x|z)$, but the authors wrote $H_q(x,z)-H_q(z):=H_q(z|x)$. I searched $:=$ and found that this symbol means "is defined to be". Why are $H_q(x,z)-H_q(z)$ defined to be $H_q(z|x)$?

*In the above derivation or in the proof from the paper, $q$ concerns the encoder and $p$ the generator. However, in section 5.2 of the paper, $q$ represents the generator and $p$ the encoder. The mystery is that both use $I_q$ in the upper bound. I can make sense of the reconstruction error if $q$ is the encoder, but not the generator. However, assuming $q$ is associated with the encoder and $p$ the generator, I think maximizing the mutual information $I_p(x,y)$ is more intuitive than maximizing $I_q(x,z)$ since we want to have a better generator rather an encoder. So I now don't know which one is right.

 A: *

*This is a general fact from information theory. In the continuous case, the conditional (differential) entropy can be rewritten via:
\begin{align}
\mathbb{H}[Z|X] &= \mathbb{E}_x\left[ \mathbb{H}[Z|X=x] \right] \\
&= \int \mathbb{H}[Z|X=x] \,dx \\ 
&= \int\left[-\int p(z|x) \log p(z|x) \,dz\right] p(x) \,dx \\ 
&= -\iint p(x,z) \log p(z|x)\, dz\,dx \\
&= -\iint p(x,z)\log\frac{p(x,z)}{p(x)}\,dz\,dx\\
&= \underbrace{-\iint p(x,z)\log p(x,z)\,dx\,dz}_{\mathbb{H}[X,Z]} + \iint p(x,z) \log p(x) \,dx\,dz \\
&= \mathbb{H}[X,Z] + \int \log p(x)  \underbrace{\left[\int p(x,z) \,dz\right]}_{p(x)}  dx \\
&= \mathbb{H}[X,Z] - \underbrace{\left( -\int p(x) \log p(x) \, dx \right)}_{\mathbb{H}[X]}\\ &= \mathbb{H}[X,Z] - \mathbb{H}[X]
\end{align}
The discrete analogue is discussed here.

*I suppose it is somewhat debatable what makes the most sense. One thing to note is that we are minimizing $D_{\text{KL}}[q(x,z)\mid\mid p(x,z)]$ (or the JS rather), which means that maximizing $\mathcal{I}_q[x,z]$ should also be maximizing $\mathcal{I}_p[x,z]$. So in that sense, perhaps it does not matter (since ideally $p(x,z)$ and $q(x,z)$ should be matched).
As they note in 5.2, the adversarial losses enforce matching of the joint distributions (term 1 in eq 18; and as term 1 shrinks, term 3 converges to a constant), so by adding the $\beta \mathcal{I}_q[x,z]$ term, we ensure that we are minimizing an upper bound on the reconstruction error.
Also it's worth recalling from the paper that they say (section 5.1)

We propose to palliate mode collapse by maximizing the mutual information between the samples and the code.

which was written with regards to regularizing the GAN generator. This 
$\beta \mathcal{I}_q[x,z]$ can be viewed as such as well.
