SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\boldsymbol {\Sigma} _ {B} (\mathbf {H}) := \frac {1}{C} \sum_ {c = 1} ^ {C} \left(\overline {{\mathbf {h}}} _ {c} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {c} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top}.
$$
Here, the class means  $\overline{\mathbf{h}}_c$ ,  $\forall c \in [C]$  and the global mean  $\overline{\mathbf{h}}_G$  of  $\mathbf{H}$  are given as follows:
$$
\overline {{\mathbf {h}}} _ {c} := \frac {1}{n} \sum_ {i = 1} ^ {n} \mathbf {h} _ {c, i}, \forall c \in [ C ], \qquad \overline {{\mathbf {h}}} _ {G} := \frac {1}{C n} \sum_ {c = 1} ^ {C} \sum_ {i = 1} ^ {n} \mathbf {h} _ {c, i}.
$$
F.2.1 Relating  $\widetilde{\Sigma}_B(\mathbf{H}),\Sigma_B(\mathbf{H})$
Since  $C = 2$  in our analysis and  $\overline{\mathbf{h}}_G = \frac{\overline{\mathbf{h}}_1 + \overline{\mathbf{h}}_2}{2}$  due to balanced communities, note that:
$$
\begin{array}{l} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) = \frac {1}{2} \sum_ {c = 1} ^ {2} \left(\overline {{\mathbf {h}}} _ {c} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {c} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top} \\ = \frac {1}{2} \left(\left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top} + \left(\overline {{\mathbf {h}}} _ {2} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {2} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top}\right) \\ = \frac {1}{4} \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) ^ {\top} \\ = \frac {1}{4} \left(\overline {{\mathbf {h}}} _ {1} \overline {{\mathbf {h}}} _ {1} ^ {\top} + \overline {{\mathbf {h}}} _ {2} \overline {{\mathbf {h}}} _ {2} ^ {\top} - \overline {{\mathbf {h}}} _ {1} \overline {{\mathbf {h}}} _ {2} ^ {\top} - \overline {{\mathbf {h}}} _ {2} \overline {{\mathbf {h}}} _ {1} ^ {\top}\right) \\ = \frac {1}{4} \left(2 \tilde {\Sigma} _ {B} (\mathbf {H}) - \overline {{\mathbf {h}}} _ {1} \overline {{\mathbf {h}}} _ {2} ^ {\top} - \overline {{\mathbf {h}}} _ {2} \overline {{\mathbf {h}}} _ {1} ^ {\top}\right) \\ \end{array}
$$
Thus, we get the following relation between  $\bar{\Sigma}_B(\mathbf{H}),\Sigma_B(\mathbf{H})$  ..
$$
2 \tilde {\Sigma} _ {B} (\mathbf {H}) - 4 \Sigma_ {B} (\mathbf {H}) = \bar {\mathbf {h}} _ {1} \bar {\mathbf {h}} _ {2} ^ {\top} + \bar {\mathbf {h}} _ {2} \bar {\mathbf {h}} _ {1} ^ {\top} \tag {86}
$$
Additionally, we can extend this result to the following:
$$
\begin{array}{l} 2 \tilde {\Sigma} _ {B} (\mathbf {H}) - 4 \Sigma_ {B} (\mathbf {H}) = \overline {{\mathbf {h}}} _ {1} \overline {{\mathbf {h}}} _ {2} ^ {\top} + \overline {{\mathbf {h}}} _ {2} \overline {{\mathbf {h}}} _ {1} ^ {\top} \\ = \left(2 \bar {\mathbf {h}} _ {G} - \bar {\mathbf {h}} _ {2}\right) \bar {\mathbf {h}} _ {2} ^ {\top} + \left(2 \bar {\mathbf {h}} _ {G} - \bar {\mathbf {h}} _ {1}\right) \bar {\mathbf {h}} _ {1} ^ {\top} \\ = 2 \bar {\mathbf {h}} _ {G} \left(\bar {\mathbf {h}} _ {1} ^ {\top} + \bar {\mathbf {h}} _ {2} ^ {\top}\right) - \bar {\mathbf {h}} _ {1} \bar {\mathbf {h}} _ {1} ^ {\top} - \bar {\mathbf {h}} _ {2} \bar {\mathbf {h}} _ {2} ^ {\top} \\ = 4 \boldsymbol {\Sigma} _ {G} (\mathbf {H}) - 2 \tilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) \\ \end{array}
$$
Where  $\Sigma_G = \overline{\mathbf{h}}_G\overline{\mathbf{h}}_G^\top$  . This gives us:
$$
\tilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \boldsymbol {\Sigma} _ {G} (\mathbf {H}) = \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \tag {87}
$$
F.2.2 Expanding  $\hat{\mathbf{H}}\hat{\mathbf{A}}\mathbf{H}^{\top}$
Based on the perturbed representation of  $\hat{\mathbf{A}} = \mathbb{E}\hat{\mathbf{A}} +\mathbf{E}$  , we can modify  $\mathbf{H}\hat{\mathbf{A}}\mathbf{H}^{\top}$  and  $\mathbf{H}\hat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$  as:
$$
\begin{array}{l} \mathbf {H} \widehat {\mathbf {A}} \mathbf {H} ^ {\top} = \mathbf {H} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] \mathbf {H} ^ {\top} + \mathbf {H} \mathbf {E} \mathbf {H} ^ {\top} \\ = [ \mathbf {H Q} ] [ \mathbf {H Q} ] ^ {\top} + \mathbf {H E H} ^ {\top} \\ \mathbf {H} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} = \mathbf {H} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] ^ {\top} \mathbf {H} ^ {\top} + \mathbf {H} \mathbf {E} ^ {\top} \mathbf {H} ^ {\top} \\ = \mathbf {H} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] \mathbf {H} ^ {\top} + \mathbf {H} \mathbf {E} ^ {\top} \mathbf {H} ^ {\top} \\ = [ \mathbf {H Q} ] [ \mathbf {H Q} ] ^ {\top} + \mathbf {H E} ^ {\top} \mathbf {H} ^ {\top} \\ \end{array}
$$
Observe that  $\mathbf{HQ}$  can be broken down in terms of  $\mathbf{h}_{c,i}, c \in [C], i \in [n]$  as follows:
$$
\begin{array}{l} \mathbf {H Q} = \left[ \begin{array}{c c c c c c} \mathbf {h} _ {1, 1} & \dots & \mathbf {h} _ {1, n} & \mathbf {h} _ {2, 1} & \dots & \mathbf {h} _ {2, n} \end{array} \right] _ {d _ {L - 1} \times N} \left[ \begin{array}{c} \mathbf {1} _ {N} \\ \mathbf {c c c c c c} \end{array} \right] _ {N \times 2} \left[ \begin{array}{c c} \sqrt {\alpha_ {1}} & 0 \\ 0 & \sqrt {\alpha_ {2}} \end{array} \right] _ {2 \times 2} \\ = \left[ \sqrt {\alpha_ {1}} \sum_ {c = 1} ^ {2} \sum_ {i = 1} ^ {n} \mathbf {h} _ {c, i} \quad \sqrt {\alpha_ {2}} \left(\sum_ {i = 1} ^ {n} \mathbf {h} _ {1, i} - \sum_ {i = 1} ^ {n} \mathbf {h} _ {2, i}\right) \right] \\ = \left[ 2 n \sqrt {\alpha_ {1}} \overline {{\mathbf {h}}} _ {G} \quad n \sqrt {\alpha_ {2}} \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) \right] \\ \end{array}
$$
This leads to the following expansion of  $[\mathbf{HQ}][\mathbf{HQ}]^\top$  ..
$$
\begin{array}{l} \left[ \mathbf {H Q} \right] \left[ \mathbf {H Q} \right] ^ {\top} = \left[ 2 n \sqrt {\alpha_ {1}} \bar {\mathbf {h}} _ {G} \quad n \sqrt {\alpha_ {2}} \left(\bar {\mathbf {h}} _ {1} - \bar {\mathbf {h}} _ {2}\right) \right] \left[ \begin{array}{c} 2 n \sqrt {\alpha_ {1}} \bar {\mathbf {h}} _ {G} ^ {\top} \\ n \sqrt {\alpha_ {2}} \left(\bar {\mathbf {h}} _ {1} - \bar {\mathbf {h}} _ {2}\right) ^ {\top} \end{array} \right] \tag {88} \\ = 4 n ^ {2} \alpha_ {1} \overline {{\mathbf {h}}} _ {G} \overline {{\mathbf {h}}} _ {G} ^ {\top} + n ^ {2} \alpha_ {2} \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) ^ {\top} \\ = 4 n ^ {2} \alpha_ {1} \overline {{\mathbf {h}}} _ {G} \overline {{\mathbf {h}}} _ {G} ^ {\top} + 4 n ^ {2} \alpha_ {2} \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top} \\ \end{array}
$$
Since  $\overline{\mathbf{h}}_G = \frac{\overline{\mathbf{h}}_1 + \overline{\mathbf{h}}_2}{2}$  (due to balanced classes). This also implies that:
$$
\left[ \mathbf {H Q} \right] \left[ \mathbf {H Q} \right] ^ {\top} = 4 n ^ {2} \alpha_ {1} \overline {{\mathbf {h}}} _ {G} \overline {{\mathbf {h}}} _ {G} ^ {\top} + 4 n ^ {2} \alpha_ {2} \left(\overline {{\mathbf {h}}} _ {2} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {2} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top} \tag {89}
$$
Thus, by taking the average of values in equation 88, 89, we get:
$$
\begin{array}{l} [ \mathbf {H Q} ] [ \mathbf {H Q} ] ^ {\top} = 4 n ^ {2} \alpha_ {1} \Sigma_ {G} (\mathbf {H}) + 4 n ^ {2} \alpha_ {2} \Sigma_ {B} (\mathbf {H}) \\ = 4 n ^ {2} \left[ \frac {1}{N} \boldsymbol {\Sigma} _ {G} (\mathbf {H}) + \frac {(p - q)}{(p + q) N} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] \\ = 2 n \left[ \widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \boldsymbol {\Sigma} _ {B} (\mathbf {H}) + \frac {(p - q)}{(p + q)} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] \\ = 2 n \left[ \tilde {\Sigma} _ {B} (\mathbf {H}) - \frac {2 q}{(p + q)} \Sigma_ {B} (\mathbf {H}) \right] \\ \end{array}
$$
Finally,  $\mathbf{H}\hat{\mathbf{A}}\mathbf{H}^{\top}$  can be simplified to:
$$
\mathbf {H} \widehat {\mathbf {A}} \mathbf {H} ^ {\top} = 2 n \left[ \widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \frac {2 q}{(p + q)} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] + \Delta_ {1} \tag {90}
$$
Where  $\Delta_1 = \mathbf{HEH}^\top$  corresponds to the first order perturbation term. Similarly,
$$
\mathbf {H} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} = 2 n \left[ \widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \frac {2 q}{(p + q)} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] + \Delta_ {1} ^ {\top} \tag {91}
$$
F.2.3 Expanding  $\mathbf{H}\widehat{\mathbf{A}}\widehat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$
Expanding  $\widehat{\mathbf{A}}\widehat{\mathbf{A}}^{\top}$  can be done along the same lines:
$$
\widehat {\mathbf {A}} \widehat {\mathbf {A}} ^ {\top} = \left[ \mathbb {E} \widehat {\mathbf {A}} + \mathbf {E} \right] \left[ \mathbb {E} \widehat {\mathbf {A}} + \mathbf {E} \right] ^ {\top} = \left[ \mathbb {E} \widehat {\mathbf {A}} \right] ^ {2} + \mathbf {E} \mathbf {E} ^ {\top} + \mathbf {E} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] + \left[ \mathbb {E} \widehat {\mathbf {A}} \right] \mathbf {E} ^ {\top}
$$
$$
\begin{array}{l} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] ^ {2} = \left[ \mathbf {1} _ {N} \quad \mathbf {c} \right] \left[ \begin{array}{c c} \alpha_ {1} & 0 \\ 0 & \alpha_ {2} \end{array} \right] \left[ \begin{array}{c c} \mathbf {1} _ {N} & \mathbf {c} \end{array} \right] ^ {\top} \left[ \begin{array}{c c} \mathbf {1} _ {N} & \mathbf {c} \end{array} \right] \left[ \begin{array}{c c} \alpha_ {1} & 0 \\ 0 & \alpha_ {2} \end{array} \right] \left[ \begin{array}{c c} \mathbf {1} _ {N} & \mathbf {c} \end{array} \right] ^ {\top} \\ = \left[ \begin{array}{c c} \mathbf {1} _ {N} & \mathbf {c c} \end{array} \right] \left[ \begin{array}{c c} \alpha_ {1} & 0 \\ 0 & \alpha_ {2} \end{array} \right] \left[ \begin{array}{c c} N \alpha_ {1} & 0 \\ 0 & N \alpha_ {2} \end{array} \right] \left[ \begin{array}{c c} \mathbf {1} _ {N} & \mathbf {c c} \end{array} \right] ^ {\top} \\ = \mathbf {Q} \left[ \begin{array}{c c} \sqrt {\alpha_ {1} N} & 0 \\ 0 & \sqrt {\alpha_ {2} N} \end{array} \right] \left[ \begin{array}{c c} \sqrt {\alpha_ {1} N} & 0 \\ 0 & \sqrt {\alpha_ {2} N} \end{array} \right] ^ {\top} \mathbf {Q} ^ {\top} \\ \end{array}
$$
Based on the formulations above,  $\mathbf{H}\left[\mathbb{E}\widehat{\mathbf{A}}\right]^2\mathbf{H}^\top$  can be given by:
$$
\begin{array}{l} \mathbf {H} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] ^ {2} \mathbf {H} ^ {\top} = \left[ \mathbf {H Q} \left[ \begin{array}{c c} \sqrt {\alpha_ {1} N} & 0 \\ 0 & \sqrt {\alpha_ {2} N} \end{array} \right] \right] \left[ \mathbf {H Q} \left[ \begin{array}{c c} \sqrt {\alpha_ {1} N} & 0 \\ 0 & \sqrt {\alpha_ {2} N} \end{array} \right] \right] ^ {\top} \\ = \left[ 2 n \alpha_ {1} \sqrt {N \mathbf {h}} _ {G} \quad n \alpha_ {2} \sqrt {N} \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) \right] \left[ \begin{array}{c} 2 n \alpha_ {1} \sqrt {N \mathbf {h}} _ {G} ^ {\top} \\ n \alpha_ {2} \sqrt {N} \left(\overline {{\mathbf {h}}} _ {1} - \overline {{\mathbf {h}}} _ {2}\right) ^ {\top} \end{array} \right] \tag {92} \\ = 4 n ^ {2} \alpha_ {1} ^ {2} N \bar {\mathbf {h}} _ {G} \bar {\mathbf {h}} _ {G} ^ {\top} + n ^ {2} \alpha_ {2} ^ {2} N \left(\bar {\mathbf {h}} _ {1} - \bar {\mathbf {h}} _ {2}\right) \left(\bar {\mathbf {h}} _ {1} - \bar {\mathbf {h}} _ {2}\right) ^ {\top} \\ = 4 n ^ {2} \alpha_ {1} ^ {2} N \bar {\mathbf {h}} _ {G} \bar {\mathbf {h}} _ {G} ^ {\top} + 4 n ^ {2} \alpha_ {2} ^ {2} N \left(\bar {\mathbf {h}} _ {1} - \bar {\mathbf {h}} _ {G}\right) \left(\bar {\mathbf {h}} _ {1} - \bar {\mathbf {h}} _ {G}\right) ^ {\top} \\ \end{array}
$$
$$
\mathbf {H} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] ^ {2} \mathbf {H} ^ {\top} = 4 n ^ {2} \alpha_ {1} ^ {2} N \overline {{\mathbf {h}}} _ {G} \overline {{\mathbf {h}}} _ {G} ^ {\top} + 4 n ^ {2} \alpha_ {2} ^ {2} N \left(\overline {{\mathbf {h}}} _ {2} - \overline {{\mathbf {h}}} _ {G}\right) \left(\overline {{\mathbf {h}}} _ {2} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top} \tag {93}
$$
Thus, based on taking the average of values in equation 92, 93, we get:
$$
\begin{array}{l} \mathbf {H} \left[ \mathbb {E} \hat {\mathbf {A}} \right] ^ {2} \mathbf {H} ^ {\top} = 4 n ^ {2} \alpha_ {1} ^ {2} N \boldsymbol {\Sigma} _ {G} (\mathbf {H}) + 4 n ^ {2} \alpha_ {2} ^ {2} N \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \\ = 8 n ^ {3} \left[ \frac {1}{N ^ {2}} \boldsymbol {\Sigma} _ {G} (\mathbf {H}) + \frac {(p - q) ^ {2}}{N ^ {2} (p + q) ^ {2}} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] \\ = 2 n \left[ \tilde {\Sigma} _ {B} (\mathbf {H}) - \frac {4 p q}{(p + q) ^ {2}} \Sigma_ {B} (\mathbf {H}) \right] \\ \end{array}
$$
Finally,  $\mathbf{H}\widehat{\mathbf{A}}\widehat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$  can be simplified to:
$$
\mathbf {H} \widehat {\mathbf {A}} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} = 2 n \left[ \widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \frac {4 p q}{(p + q) ^ {2}} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] + \Delta_ {2} \tag {94}
$$
Where  $\Delta_2 = \mathbf{H}\left[\mathbf{E}\mathbf{E}^\top +\mathbf{E}\left[\mathbb{E}\widehat{\mathbf{A}}\right] + \left[\mathbb{E}\widehat{\mathbf{A}}\right]\mathbf{E}^\top \right]\mathbf{H}^\top$  is a symmetric matrix corresponding to the first and second order perturbation terms.
F.2.4 Expanding  $\mathbf{Y}\widehat{\mathbf{A}}^{\top}\mathbf{H}^{\top},\mathbf{Y}\mathbf{H}^{\top}$
We follow similar line of expansions for  $\mathbf{Y}\hat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$  to get:
$$
\begin{array}{l} \mathbf {Y} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} = \mathbf {Y} \left[ \mathbb {E} \widehat {\mathbf {A}} \right] \mathbf {H} ^ {\top} + \mathbf {Y} \mathbf {E} ^ {\top} \mathbf {H} ^ {\top} = \left(\mathbf {I} _ {2} \otimes \mathbf {1} _ {n} ^ {\top}\right) \left[ \mathbb {E} \widehat {\mathbf {A}} \right] \mathbf {H} ^ {\top} + \mathbf {Y} \mathbf {E} ^ {\top} \mathbf {H} ^ {\top} \\ = \left(\mathbf {I} _ {2} \otimes \mathbf {1} _ {n} ^ {\top}\right) \frac {1}{n p + n q} \left[ \begin{array}{c} n p \overline {{\mathbf {h}}} _ {1} ^ {\top} + n q \overline {{\mathbf {h}}} _ {2} ^ {\top} \\ \vdots \\ n q \overline {{\mathbf {h}}} _ {1} ^ {\top} + n p \overline {{\mathbf {h}}} _ {2} ^ {\top} \\ \vdots \end{array} \right] + \mathbf {Y} \mathbf {E} ^ {\top} \mathbf {H} ^ {\top} \tag {95} \\ = \frac {n}{p + q} \left[ \begin{array}{c} p \overline {{\mathbf {h}}} _ {1} ^ {\top} + q \overline {{\mathbf {h}}} _ {2} ^ {\top} \\ q \overline {{\mathbf {h}}} _ {1} ^ {\top} + p \overline {{\mathbf {h}}} _ {2} ^ {\top} \end{array} \right] + \Delta_ {3} \\ \end{array}
$$
Where  $\Delta_3 = \mathbf{Y}\mathbf{E}^\top \mathbf{H}^\top$  is the first order perturbation term. Next, observe that:
$$
\mathbf {Y} \mathbf {H} ^ {\top} = \left(\mathbf {I} _ {2} \otimes \mathbf {1} _ {n} ^ {\top}\right) \mathbf {H} ^ {\top} = n \overline {{\mathbf {H}}} ^ {\top} \tag {96}
$$
F2.5 Expanding  $\mathbf{H}\hat{\mathbf{A}}\mathbf{Y}^{\top}\mathbf{Y}\hat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$
$$
\begin{array}{l} \mathbf {H} \widehat {\mathbf {A}} \mathbf {Y} ^ {\top} \mathbf {Y} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} = \mathbf {H} \left[ \mathbb {E} \widehat {\mathbf {A}} + \mathbf {E} \right] \mathbf {Y} ^ {\top} \mathbf {Y} \left[ \mathbb {E} \widehat {\mathbf {A}} + \mathbf {E} \right] ^ {\top} \mathbf {H} ^ {\top} \\ = \left(\frac {n}{p + q} \left[ \begin{array}{l} p \overline {{\mathbf {h}}} _ {1} ^ {\top} + q \overline {{\mathbf {h}}} _ {2} ^ {\top} \\ q \overline {{\mathbf {h}}} _ {1} ^ {\top} + p \overline {{\mathbf {h}}} _ {2} ^ {\top} \end{array} \right] ^ {\top} + \Delta_ {3} ^ {\top}\right) \left(\frac {n}{p + q} \left[ \begin{array}{l} p \overline {{\mathbf {h}}} _ {1} ^ {\top} + q \overline {{\mathbf {h}}} _ {2} ^ {\top} \\ q \overline {{\mathbf {h}}} _ {1} ^ {\top} + p \overline {{\mathbf {h}}} _ {2} ^ {\top}. \end{array} \right] + \Delta_ {3}\right) \\ = \frac {n ^ {2}}{(p + q) ^ {2}} \left[ p \overline {{\mathbf {h}}} _ {1} + q \overline {{\mathbf {h}}} _ {2} \quad q \overline {{\mathbf {h}}} _ {1} + p \overline {{\mathbf {h}}} _ {2} \right] \left[ \begin{array}{c} p \overline {{\mathbf {h}}} _ {1} ^ {\top} + q \overline {{\mathbf {h}}} _ {2} ^ {\top} \\ q \overline {{\mathbf {h}}} _ {1} ^ {\top} + p \overline {{\mathbf {h}}} _ {2} ^ {\top} \end{array} \right] + \widetilde {\Delta} _ {3} \\ = \frac {n ^ {2}}{(p + q) ^ {2}} \left[ (p ^ {2} + q ^ {2}) (\overline {{\mathbf {h}}} _ {1} \overline {{\mathbf {h}}} _ {1} ^ {\top} + \overline {{\mathbf {h}}} _ {2} \overline {{\mathbf {h}}} _ {2} ^ {\top}) + (2 p q) (\overline {{\mathbf {h}}} _ {1} \overline {{\mathbf {h}}} _ {2} ^ {\top} + \overline {{\mathbf {h}}} _ {2} \overline {{\mathbf {h}}} _ {1} ^ {\top}) \right] + \widetilde {\Delta} _ {3} \\ \stackrel {(a)} {=} \frac {n ^ {2}}{(p + q) ^ {2}} \left[ 2 (p ^ {2} + q ^ {2}) \widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) + (2 p q) \left(2 \widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - 4 \boldsymbol {\Sigma} _ {B} (\mathbf {H})\right) \right] + \widetilde {\Delta} _ {3} \\ = 2 n ^ {2} \left[ \tilde {\Sigma} _ {B} (\mathbf {H}) - \frac {4 p q}{(p + q) ^ {2}} \boldsymbol {\Sigma} _ {B} (\mathbf {H}) \right] + \tilde {\Delta} _ {3} \tag {97} \\ \end{array}
$$
Where  $\widetilde{\Delta}_{3} = \mathbf{H}\left(\mathbf{E}\mathbf{Y}^{\top}\mathbf{Y}\mathbf{E}^{\top} + \left[\mathbb{E}\widehat{\mathbf{A}}\right]\mathbf{Y}^{\top}\mathbf{Y}\mathbf{E}^{\top} + \mathbf{E}\mathbf{Y}^{\top}\mathbf{Y}\left[\mathbb{E}\widehat{\mathbf{A}}\right]\right)\mathbf{H}^{\top}$  and the equality  $(a)$  is based on equation 86.
F.3 Trace formulation of risk
Now, note that the risk can be formulated in terms of matrix traces as follows:
$$
\begin{array}{l} \widehat {\mathcal {R}} ^ {\mathcal {F} ^ {\prime}} (\mathbf {H}) = \frac {1}{2 N} \operatorname {T r} \left\{\left(\mathbf {W} _ {2} ^ {*} \mathbf {H} \widehat {\mathbf {A}} - \mathbf {Y}\right) \left(\mathbf {W} _ {2} ^ {*} \mathbf {H} \widehat {\mathbf {A}} - \mathbf {Y}\right) ^ {\top} \right\} + \frac {\lambda_ {W _ {2}}}{2} \operatorname {T r} \left\{\mathbf {W} _ {2} ^ {*} \mathbf {W} _ {2} ^ {* \top} \right\} + \tag {98} \\ \frac {\lambda_ {H}}{2} \operatorname {T r} \left\{\mathbf {H} \mathbf {H} ^ {\top} \right\} \\ \end{array}
$$
Where the term  $\left(\mathbf{W}_2^*\mathbf{H}\widehat{\mathbf{A}} -\mathbf{Y}\right)\left(\mathbf{W}_2^*\mathbf{H}\widehat{\mathbf{A}} -\mathbf{Y}\right)^\top$  can be expanded as follows:
$$
\begin{array}{l} \left(\mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} - \mathbf {Y}\right) \left(\mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} - \mathbf {Y}\right) ^ {\top} = \mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} \hat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} \mathbf {W} _ {2} ^ {* \top} - \mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} \mathbf {Y} ^ {\top} \\ - \mathbf {Y} \hat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} \mathbf {W} _ {2} ^ {* \top} + \mathbf {Y} \mathbf {Y} ^ {\top} \\ \end{array}
$$
Since  $\mathbf{W}_2^*\left[\mathbf{H}\widehat{\mathbf{A}}\widehat{\mathbf{A}}^\top \mathbf{H}^\top +\lambda_{W_2}N\mathbf{I}\right] = \mathbf{Y}\widehat{\mathbf{A}}^\top \mathbf{H}^\top$ , we can multiply  $\mathbf{W}_2^{* \top}$  on both sides and get:
$$
\mathbf {W} _ {2} ^ {*} \mathbf {H} \widehat {\mathbf {A}} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} \mathbf {W} _ {2} ^ {* \top} = \mathbf {Y} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} \mathbf {W} _ {2} ^ {* \top} - \lambda_ {W _ {2}} N \mathbf {W} _ {2} ^ {*} \mathbf {W} _ {2} ^ {* \top}
$$
Using these simplifications and matrix trace properties, the risk can be modified as:
$$
\begin{array}{l} = \frac {1}{2 N} \operatorname {T r} \left\{\left(\mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} - \mathbf {Y}\right) \left(\mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} - \mathbf {Y}\right) ^ {\top} \right\} + \frac {\lambda_ {W _ {2}}}{2} \operatorname {T r} \left\{\mathbf {W} _ {2} ^ {*} \mathbf {W} _ {2} ^ {* \top} \right\} + \frac {\lambda_ {H}}{2} \operatorname {T r} \left\{\mathbf {H} \mathbf {H} ^ {\top} \right\} \\ = \frac {1}{2 N} \operatorname {T r} \left\{- \mathbf {W} _ {2} ^ {*} \mathbf {H} \hat {\mathbf {A}} \mathbf {Y} ^ {\top} + \mathbf {Y} \mathbf {Y} ^ {\top} \right\} + \frac {\lambda_ {H}}{2} \operatorname {T r} \left\{\mathbf {H} \mathbf {H} ^ {\top} \right\} \\ = \frac {1}{2 N} \operatorname {T r} \left\{- \mathbf {Y} \hat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} \left[ \mathbf {H} \hat {\mathbf {A}} \hat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} + \lambda_ {W _ {2}} N \mathbf {I} \right] ^ {- 1} \mathbf {H} \hat {\mathbf {A}} \mathbf {Y} ^ {\top} + \mathbf {Y} \mathbf {Y} ^ {\top} \right\} + \frac {\lambda_ {H}}{2} \operatorname {T r} \left\{\mathbf {H} \mathbf {H} ^ {\top} \right\} \\ = \frac {1}{2 N} \operatorname {T r} \left\{- \mathbf {H} \widehat {\mathbf {A}} \mathbf {Y} ^ {\top} \mathbf {Y} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} \left[ \mathbf {H} \widehat {\mathbf {A}} \widehat {\mathbf {A}} ^ {\top} \mathbf {H} ^ {\top} + \lambda_ {W _ {2}} N \mathbf {I} \right] ^ {- 1} \right\} \\ + \frac {1}{2 N} \operatorname {T r} \left\{\mathbf {Y} \mathbf {Y} ^ {\top} \right\} + \frac {\lambda_ {H}}{2} \operatorname {T r} \left\{\mathbf {H} \mathbf {H} ^ {\top} \right\} \\ \end{array}
$$
Where the covariance matrix formulations for  $\mathbf{H}\hat{\mathbf{A}}\hat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$ ,  $\mathbf{H}\hat{\mathbf{Y}}^{\top}\mathbf{Y}\hat{\mathbf{A}}^{\top}\mathbf{H}^{\top}$  can be leveraged to formulate the risk as:
$$
\begin{array}{l} \widehat {\mathcal {R}} ^ {\mathcal {F} ^ {\prime}} (\mathbf {H}) = - \frac {1}{2 N} \operatorname {T r} \left\{\left[ 2 n ^ {2} \left(\widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \frac {4 p q}{(p + q) ^ {2}} \boldsymbol {\Sigma} _ {B} (\mathbf {H})\right) + \widetilde {\Delta} _ {3} \right] \right. \\ \left. \left[ 2 n \left(\widetilde {\boldsymbol {\Sigma}} _ {B} (\mathbf {H}) - \frac {4 p q}{(p + q) ^ {2}} \boldsymbol {\Sigma} _ {B} (\mathbf {H})\right) + \Delta_ {2} + \lambda_ {W _ {2}} N \mathbf {I} \right] ^ {- 1} \right\} + \frac {1}{2} \tag {99} \\ + \frac {\lambda_ {H}}{2} \operatorname {T r} \left\{N \widetilde {\boldsymbol {\Sigma}} _ {T} (\mathbf {H}) \right\} \\ \end{array}
$$
F.4 Trace evolution of covariance matrices
Now, we analyze the traces of  $\frac{d\pmb{\Sigma}_W}{dt}$ ,  $\frac{d\pmb{\Sigma}_B}{dt}$  along the gradient flow:
$$
\frac {d \mathbf {H} _ {t}}{d t} = - \nabla \widehat {\mathcal {R}} ^ {\mathcal {F} ^ {\prime}} \left(\mathbf {H} _ {t}\right). \tag {100}
$$
Let  $\partial_{kjl}$  represent the derivative of  $l^{th}$  entry of  $\mathbf{h}_{k,j}$ . For notational simplicity, we also consider  $\pmb{\Sigma}_W = \pmb{\Sigma}_W(\mathbf{H}), \pmb{\Sigma}_B = \pmb{\Sigma}_B(\mathbf{H}), \widetilde{\pmb{\Sigma}}_B = \widetilde{\pmb{\Sigma}}_B(\mathbf{H}), \widetilde{\pmb{\Sigma}}_T = \widetilde{\pmb{\Sigma}}_T(\mathbf{H})$ . This leads to:
$$
\partial_ {k j l} \boldsymbol {\Sigma} _ {B} = \frac {1}{2 n} \left(\mathbf {e} _ {l} \left(\overline {{\mathbf {h}}} _ {k} - \overline {{\mathbf {h}}} _ {G}\right) ^ {\top} + \left(\overline {{\mathbf {h}}} _ {k} - \overline {{\mathbf {h}}} _ {G}\right) \mathbf {e} _ {l} ^ {\top}\right)
$$
$$
\partial_ {k j l} \widetilde {\boldsymbol {\Sigma}} _ {B} = \frac {1}{2 n} \left(\mathbf {e} _ {l} \overline {{\mathbf {h}}} _ {k} ^ {\top} + \overline {{\mathbf {h}}} _ {k} \mathbf {e} _ {l} ^ {\top}\right) \tag {101}
$$
$$
\partial_ {k j l} \boldsymbol {\Sigma} _ {W} = \frac {1}{2 n} \left(\mathbf {e} _ {l} \left(\mathbf {h} _ {k, j} - \overline {{\mathbf {h}}} _ {k}\right) ^ {\top} + \left(\mathbf {h} _ {k, j} - \overline {{\mathbf {h}}} _ {k}\right) \mathbf {e} _ {l} ^ {\top}\right) \tag {101}
$$
$$
\partial_ {k j l} \widetilde {\boldsymbol {\Sigma}} _ {T} = \frac {1}{2 n} \left(\mathbf {e} _ {l} \mathbf {h} _ {k, j} ^ {\top} + \mathbf {h} _ {k, j} \mathbf {e} _ {l} ^ {\top}\right)
$$