Md. Asif Uddin
    I.13.X03

    A factorised encoder misreports its uncertainty

    counterexample▲▲△

    A two-dimensional posterior is N(0,Σ)\mathcal N(\vec 0,\mat\Sigma) with unit variances and correlation ρ=0.9\rho=0.9. The encoder’s family is factorised: q=N(m,diag⁡(v1,v2))q=\mathcal N(\vec m,\operatorname{diag}(v_1,v_2)). Find the member of the family that minimises KL⁡(q ∥ p)\KL(q\,\|\,p), the variance it reports for each coordinate, and the gap that remains.

    Hint

    For Gaussians in dd dimensions,

    KL⁡(q ∥ p)=12(tr⁡(Σ−1Σq)+mTΣ−1m−d+log⁡det⁡Σ−log⁡det⁡Σq),\begin{aligned} &\KL(q\,\|\,p)=\tfrac12\big(\operatorname{tr}(\mat\Sigma^{-1}\mat\Sigma_q)\\ &\quad+\vec m^{\mathsf T}\mat\Sigma^{-1}\vec m-d\\ &\quad+\log\det\mat\Sigma-\log\det\mat\Sigma_q\big), \end{aligned}

    and the diagonal of Σ−1\mat\Sigma^{-1} is 1/(1−ρ2)1/(1-\rho^2).

    Solution

    The mean term is minimised at m=0\vec m=\vec 0. With Σq\mat\Sigma_q diagonal, only the diagonal of Σ−1\mat\Sigma^{-1} enters the trace:

    KL⁡=12(v1+v21−ρ2−2+log⁡(1−ρ2)−log⁡v1−log⁡v2).\begin{aligned} &\KL=\tfrac12\Big(\frac{v_1+v_2}{1-\rho^2}-2\\ &\quad+\log(1-\rho^2)\\ &\quad-\log v_1-\log v_2\Big). \end{aligned}

    Each viv_i appears in its own term. Setting 1/(1−ρ2)−1/vi=01/(1-\rho^2)-1/v_i=0 gives vi=1−ρ2=0.19v_i=1-\rho^2=0.19. Substituting, the trace term becomes 22 and cancels the −2-2:

    KL⁡=12(log⁡0.19−2log⁡0.19)=−12log⁡0.19=0.830366.\begin{aligned} \KL&=\tfrac12\big(\log0.19-2\log0.19\big)\\ &=-\tfrac12\log0.19\\ &=0.830366. \end{aligned}

    So the best factorised encoder reports a variance of 0.190.19 for each coordinate, whose true posterior variance is 11. It matches the conditional variance of one coordinate given the other, not the marginal one, and so understates the uncertainty more than fivefold.

    The claim this breaks is that a trained encoder’s variance measures how uncertain the code is. The gap of 0.8303660.830366 nats is the approximation gap: it does not shrink with training, because no member of the family is closer. Only a richer family, one with correlations, can remove it.

    Draws on