SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\left\{ \begin{array}{l} \zeta_ {1} ^ {*} = \frac {1}{\alpha} \frac {\mathcal {C} _ {\mu_ {W}} ^ {(1 / \alpha)} \left(p _ {1} ^ {*} p _ {2} ^ {*}\right)}{p _ {1} ^ {*}}, \quad \zeta_ {2} ^ {*} = z - \frac {1}{\mathcal {G} _ {\bar {\mu} _ {S}} (z)}, \quad \zeta_ {3} ^ {*} = \frac {1}{\alpha} \frac {\mathcal {C} _ {\mu_ {Y}} ^ {(1 / \alpha)} \left(p _ {2} ^ {*} p _ {3} ^ {*}\right)}{p _ {3} ^ {*}} \\ p _ {1} ^ {*} = \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \left(1 - \frac {1}{\alpha}\right) \frac {1}{z}, \quad p _ {2} ^ {*} = \mathcal {G} _ {\bar {\mu} _ {S}} (z), \quad p _ {3} ^ {*} = \frac {z - \zeta_ {1} ^ {*}}{\alpha \zeta_ {3} ^ {*}} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \frac {z - \zeta_ {1} ^ {*}}{\zeta_ {3} ^ {*}} \left(1 - \frac {1}{\alpha}\right) \frac {1}{z} - \frac {1}{\zeta_ {3} ^ {*}} \end{array} \right. \tag {92}
$$
with  $\bar{\mu}_S$  the limiting ESD of non-trivial singular values of  $S$ . Note that  $\zeta_1^*$ ,  $\zeta_2^*$  can be computed from the observation matrix, and we only need to find  $\zeta_3^*$  satisfying the following equation:
$$
\left(z - \zeta_ {1} ^ {*}\right) \left[ \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \left(1 - \frac {1}{\alpha}\right) \frac {1}{z} \right] - 1 = \frac {1}{\alpha} \mathcal {C} _ {\mu_ {Y}} ^ {(1 / \alpha)} \left(\frac {1}{\zeta_ {3} ^ {*}} \mathcal {G} _ {\bar {\mu} _ {S}} (z) \left(z - \zeta_ {1} ^ {*}\right) \left[ \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \left(1 - \frac {1}{\alpha}\right) \frac {1}{z} \right]\right) \tag {93}
$$
Note that both sets of equations (90), (92) and (47), (45) match for  $\alpha = 1$ .
(b) Wishart,  $\alpha^{\prime} = 1 / 4$
Figure 23: Estimating  $\mathbf{X}$ . The MSE is normalized by the norm of the signal,  $\| \mathbf{X} \|_{\mathrm{F}}^2$ . Both  $\mathbf{Y}$  and  $\mathbf{W}$  are  $N \times M$  matrices with i.i.d. Gaussian entries of variance  $1/N$ , and aspect ratio  $N/M = 2$ . The RIE is applied to  $N = 2000$ ,  $M = 1000$ , and the results are averaged over 10 runs (error bars are invisible). Average relative error between RIE  $\widehat{\Xi_X^*}(S)$  and Oracle estimator is also reported.
F.1.3 Overlaps and optimal eigenvalues
From (90), (42), for  $\gamma$  a non-trivially zero singular value of  $S$  we find:
$$
\begin{array}{l} O _ {X} (\gamma , \lambda_ {i}) \approx \frac {\alpha}{\pi \bar {\mu} _ {S} (\gamma)} \operatorname {I m} \lim  _ {z \rightarrow \gamma - \mathrm {i} 0 ^ {+}} \boldsymbol {x} _ {i} ^ {\intercal} \zeta_ {3} ^ {* - 1} \boldsymbol {G} _ {X ^ {2}} \left(\frac {z - \zeta_ {1} ^ {*}}{\zeta_ {3} ^ {*}}\right) \boldsymbol {x} _ {i} \tag {94} \\ = \frac {\alpha}{\pi \bar {\mu} _ {S} (\gamma)} \operatorname {I m} \lim  _ {z \rightarrow \gamma - \mathrm {i} 0 ^ {+}} \frac {1}{z - \zeta_ {1} ^ {*} - \zeta_ {3} ^ {*} \lambda_ {i} ^ {2}} \\ \end{array}
$$
And, in the case of  $M > N$ , for zero singular values we have:
$$
\begin{array}{l} O _ {X} (0, \lambda_ {i}) \approx \frac {\alpha}{(\alpha - 1) \pi} \operatorname {I m} \lim  _ {z \rightarrow - \mathrm {i} 0 ^ {+}} \boldsymbol {x} _ {i} ^ {\intercal} \zeta_ {3} ^ {* - 1} \boldsymbol {G} _ {X ^ {2}} \left(\frac {z - \zeta_ {1} ^ {*}}{\zeta_ {3} ^ {*}}\right) \boldsymbol {x} _ {i} \tag {95} \\ = \frac {\alpha}{(\alpha - 1) \pi} \operatorname {I m} \lim  _ {z \rightarrow - \mathrm {i} 0 ^ {+}} \frac {1}{z - \zeta_ {1} ^ {*} - \zeta_ {3} ^ {*} \lambda_ {i} ^ {2}} \\ \end{array}
$$
Finally, the optimal eigenvalues can be derived in the same way as in (49). For  $1 \leq i \leq M$ , we have:
$$
\hat {\xi_ {x i} ^ {*}} = \frac {\alpha}{2 \kappa \pi \bar {\mu} _ {S} (\gamma_ {i})} \operatorname {I m} \lim  _ {z \rightarrow \gamma_ {i} - \mathrm {i} 0 ^ {+}} \left\{\frac {1}{\zeta_ {3} ^ {*}} \left[ \mathcal {G} _ {\rho_ {X}} \left(\sqrt {\frac {z - \zeta_ {1} ^ {*}}{\kappa \zeta_ {3} ^ {*}}}\right) + \mathcal {G} _ {\rho_ {X}} \left(- \sqrt {\frac {z - \zeta_ {1} ^ {*}}{\kappa \zeta_ {3} ^ {*}}}\right)\right]\right\} \tag {96}
$$
And, for all  $M + 1 \leq i \leq N$ :
$$
\hat {\xi} _ {x i} ^ {*} = \frac {\alpha}{2 \kappa (\alpha - 1) \pi} \operatorname {I m} \lim  _ {z \rightarrow - \mathrm {i} 0 ^ {+}} \left\{\frac {1}{\zeta_ {3} ^ {*}} \left[ \mathcal {G} _ {\rho_ {X}} \left(\sqrt {\frac {z - \zeta_ {1} ^ {*}}{\kappa \zeta_ {3} ^ {*}}}\right) + \mathcal {G} _ {\rho_ {X}} \left(- \sqrt {\frac {z - \zeta_ {1} ^ {*}}{\kappa \zeta_ {3} ^ {*}}}\right)\right]\right\} \tag {97}
$$
F.1.4 Numerical Examples
For matrices  $\mathbf{Y},\mathbf{W}\in \mathbb{R}^{N\times M}$  with i.i.d. Gaussian entries of variance  $1 / N$  and  $M > N$ , we have that  $\mathcal{C}_{\mu Y}^{(1 / \alpha)}(z) = \mathcal{C}_{\mu W}^{(1 / \alpha)}(z) = z$  which leads to a simplification of equations (92):
$$
\left\{ \begin{array}{l} \zeta_ {1} ^ {*} = \frac {1}{\alpha} p _ {2} ^ {*}, \quad \zeta_ {2} ^ {*} = z - \frac {1}{\mathcal {G} _ {\bar {\mu} _ {S}} (z)}, \quad \zeta_ {3} ^ {*} = \frac {1}{\alpha} p _ {2} ^ {*} \\ p _ {1} ^ {*} = \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \left(1 - \frac {1}{\alpha}\right) \frac {1}{z}, \quad p _ {2} ^ {*} = \mathcal {G} _ {\bar {\mu} _ {S}} (z), \quad p _ {3} ^ {*} = \frac {z - \zeta_ {1} ^ {*}}{\alpha \zeta_ {3} ^ {*}} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \frac {z - \zeta_ {1} ^ {*}}{\zeta_ {3} ^ {*}} \left(1 - \frac {1}{\alpha}\right) \frac {1}{z} - \frac {1}{\zeta_ {3} ^ {*}} \end{array} \right. \tag {98}
$$
Therefore,  $\zeta_1^* = \zeta_3^* = \frac{1}{\alpha}\mathcal{G}_{\bar{\mu}_S}(z)$
In Figure 23, the MSE of the Oracle estimator and the RIE (96), (97) is illustrated for shifted Wigner  $X$  with  $c = 3$ , and Wishart with aspect-ratio  $\alpha' = 1/4$ .
Effect of aspect-ratio  $\alpha$ . In Figure 24, we take  $\mathbf{X}$  to be a shifted Wigner matrix with  $c = 3$ , and the MSE is depicted for various values of the aspect-ratio  $\alpha > 1$ . We see that as  $M$  decreases ( $\alpha$  increases) the estimation error (of  $\mathbf{Y}$ ) increases.
Figure 24: MSE of estimating  $\mathbf{X}$  as a function of aspect-ratio  $\alpha >1$ , prior on  $\mathbf{X}$  is shifted Wigner with  $c = 3$  and  $\kappa = 5$ . MSE is normalized by the norm of the signal,  $\| \pmb {X}\|_{\mathrm{F}}^{2}$ . Both  $\pmb{Y}$  and  $\pmb{W}$  are  $N\times M$  matrices with i.i.d. Gaussian entries of variance  $1 / N$ . The RIE is applied to  $N = 2000$ ,  $M = 1 / \alpha N$ , and the results are averaged over 10 runs (error bars are invisible). Average relative error between RIE  $\Xi_X^* (\pmb {S})$  and Oracle estimator is also reported.
F.2 Estimating  $Y$
F.2.1 Relation between overlap and the resolvent
For the vectors  $\boldsymbol{r}_i = \left[ \begin{array}{c} \boldsymbol{0}_N \\ \boldsymbol{y}_i^{(r)} \end{array} \right]$ ,  $l_i = \left[ \begin{array}{c} \boldsymbol{y}_i^{(l)} \\ \boldsymbol{0}_M \end{array} \right]$  with  $\boldsymbol{y}_i^{(r)}, \boldsymbol{y}_i^{(l)}$  right/left singular vectors of  $Y$ , we have
$$
\boldsymbol {r} _ {i} ^ {\intercal} \left(\operatorname {I m} G _ {\mathcal {S}} (x - \mathrm {i} \epsilon)\right) \boldsymbol {l} _ {i} = \sum_ {k = 1} ^ {2 M} \frac {\epsilon}{(x - \tilde {\gamma} _ {k}) ^ {2} + \epsilon^ {2}} \left(\boldsymbol {r} _ {i} ^ {\intercal} \mathbf {s} _ {k}\right) \left(\boldsymbol {l} _ {i} ^ {\intercal} \mathbf {s} _ {k}\right) + \frac {\epsilon}{x ^ {2} + \epsilon^ {2}} \sum_ {k = 2 M + 1} ^ {M + N} \left(\boldsymbol {r} _ {i} ^ {\intercal} \mathbf {s} _ {k}\right) \left(\boldsymbol {l} _ {i} ^ {\intercal} \mathbf {s} _ {k}\right) \tag {99}
$$
$$
\left(\boldsymbol {r} _ {i} ^ {\intercal} \mathbf {s} _ {k}\right) \left(\boldsymbol {l} _ {i} ^ {\intercal} \mathbf {s} _ {k}\right) = \left\{ \begin{array}{l l} \frac {1}{2} \left(\boldsymbol {u} _ {k} ^ {\intercal} \boldsymbol {y} _ {i} ^ {(l)}\right) \left(\boldsymbol {v} _ {k} ^ {\intercal} \boldsymbol {y} _ {i} ^ {(r)}\right) & \text {f o r} 1 \leq k \leq M \\ - \frac {1}{2} \left(\boldsymbol {u} _ {k - M} ^ {\intercal} \boldsymbol {y} _ {i} ^ {(l)}\right) \left(\boldsymbol {v} _ {k - M} ^ {\intercal} \boldsymbol {y} _ {i} ^ {(r)}\right) & \text {f o r} M + 1 \leq k \leq 2 M \\ 0 & \text {f o r} 2 M + 1 \leq k \leq N + M \end{array} \right.
$$
Therefore, in the limit  $N\to \infty$  , we have:
$$
\boldsymbol {r} _ {i} ^ {\intercal} \left(\operatorname {I m} \boldsymbol {G} _ {\mathcal {S}} (x - \mathrm {i} \epsilon)\right) \boldsymbol {l} _ {i} \xrightarrow {N \rightarrow \infty} \frac {1}{\alpha} \int_ {\mathbb {R}} \frac {\epsilon}{(x - t) ^ {2} + \epsilon^ {2}} O _ {Y} (t, \sigma_ {i}) \bar {\mu} _ {S} (t) d t \tag {100}
$$
where the overlap function  $O_{Y}(t,\lambda_{i})$  is extended (continuously) to arbitrary values within the support of  $\bar{\mu}_{S}$  with the property that  $O_{Y}(-t,\lambda_{i}) = -O_{Y}(t,\lambda_{i})$  for  $t\in \mathrm{supp}(\mu_S)$ . Sending  $\epsilon \rightarrow 0$ , we find
$$
\boldsymbol {r} _ {i} ^ {\intercal} \left(\operatorname {I m} \boldsymbol {G} _ {\mathcal {S}} (x - \mathrm {i} \epsilon)\right) \boldsymbol {l} _ {i} \approx \frac {1}{\alpha} \pi \bar {\mu} _ {\mathcal {S}} (x) O _ {Y} (x, \sigma_ {i}) \tag {101}
$$
F.2.2 Resolvent relation
The resolvent relation for the model (60) with  $M < N$  is the same as in (72) with parameters satisfying:
$$
\left\{\begin{array}{l}\beta_ {1} ^ {*} = \frac {1}{\alpha} \frac {\mathcal {C} _ {\mu_ {W}} ^ {(\alpha)} \left(q _ {1} ^ {*} q _ {2} ^ {*}\right)}{q _ {1} ^ {*}} + \frac {1}{2} \sqrt {\frac {q _ {3} ^ {*}}{q _ {1} ^ {*}}} \left(\mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} + \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right) - \mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} - \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right)\right)\\\beta_ {2} ^ {*} = \frac {\mathcal {C} _ {\mu_ {W}} ^ {(\alpha)} \left(q _ {1} ^ {*} q _ {2} ^ {*}\right)}{q _ {2} ^ {*}}\\\beta_ {3} ^ {*} = \frac {1}{2} \sqrt {\frac {q _ {1} ^ {*}}{q _ {3} ^ {*}}} \left(\mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} + \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right) - \mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} - \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right)\right)\\\left. \right. \beta_ {4} ^ {*} = \frac {1}{2} \left(\mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} + \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right) + \mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} - \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right)\right) \quad \text {w i t h} \left\{\begin{array}{l l}Z _ {1} (z) = (z - \beta_ {1} ^ {*}) (z - \beta_ {2} ^ {*})\\Z _ {2} (z) = \beta_ {4} ^ {* 2} + \beta_ {3} ^ {*} (z - \beta_ {1} ^ {*})\end{array}\right.\\q _ {1} ^ {*} = \frac {1}{\alpha} \frac {(z - \beta_ {2} ^ {*}) \beta_ {4} ^ {* 2}}{Z _ {2} (z) ^ {2}} \mathcal {G} _ {\rho_ {Y}} \left(\frac {Z _ {1} (z)}{Z _ {2} (z)}\right) + \frac {1}{\alpha} \frac {\beta_ {3} ^ {*}}{Z _ {2} (z)} + \frac {\alpha - 1}{\alpha} \frac {1}{z - \beta_ {1} ^ {*}}\\q _ {2} ^ {*} = \frac {z - \beta_ {1} ^ {*}}{Z _ {2} (z)} \mathcal {G} _ {\rho_ {Y}} \left(\frac {Z _ {1} (z)}{Z _ {2} (z)}\right)\\q _ {3} ^ {*} = \frac {1}{\alpha} \frac {(z - \beta_ {1} ^ {*}) Z _ {1} (z)}{Z _ {2} (z) ^ {2}} \mathcal {G} _ {\rho_ {Y}} \left(\frac {Z _ {1} (z)}{Z _ {2} (z)}\right) - \frac {1}{\alpha} \frac {z - \beta_ {1} ^ {*}}{Z _ {2} (z)}\\q _ {4} ^ {*} = \frac {1}{\alpha} \frac {\beta_ {4} ^ {*} Z _ {1} (z)}{Z _ {2} (z) ^ {2}} \mathcal {G} _ {\rho_ {Y}} \left(\frac {Z _ {1} (z)}{Z _ {2} (z)}\right) - \frac {1}{\alpha} \frac {\beta_ {4} ^ {*}}{Z _ {2} (z)}\end{array}\right. \tag {102}
$$
With the same procedure as (73),(74), the saddle point equations (102) can be rewritten in a simplified form:
$$
\left\{ \begin{array}{l} \beta_ {1} ^ {*} = \frac {1}{\alpha} \frac {\mathcal {C} _ {\mu W} ^ {(\alpha)} \left(q _ {1} ^ {*} q _ {2} ^ {*}\right)}{q _ {1} ^ {*}} + \frac {1}{2} \sqrt {\frac {q _ {3} ^ {*}}{q _ {1} ^ {*}}} \left(\mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} + \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right) - \mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} - \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right)\right) \\ \beta_ {2} ^ {*} = \frac {\mathcal {C} _ {\mu W} ^ {(\alpha)} \left(q _ {1} ^ {*} q _ {2} ^ {*}\right)}{q _ {2} ^ {*}} \\ \beta_ {3} ^ {*} = \frac {1}{2} \sqrt {\frac {q _ {1} ^ {*}}{q _ {3} ^ {*}}} \left(\mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} + \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right) - \mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} - \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right)\right) \\ \left. \beta_ {4} ^ {*} = \frac {1}{2} \left(\mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} + \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right) + \mathcal {R} _ {\rho_ {X}} \left(q _ {4} ^ {*} - \sqrt {q _ {1} ^ {*} q _ {3} ^ {*}}\right)\right)\right) \\ q _ {1} ^ {*} = \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} S} (z) + \left(1 - \frac {1}{\alpha}\right) \frac {1}{z} \\ q _ {2} ^ {*} = \mathcal {G} _ {\bar {\mu} S} (z) \\ q _ {3} ^ {*} = \frac {(z - \beta_ {1} ^ {*}) ^ {2}}{\beta_ {4} ^ {* 2}} q _ {1} ^ {*} - \frac {z - \beta_ {1} ^ {*}}{\beta_ {4} ^ {* 2}} \\ q _ {4} ^ {*} = \frac {z - \beta_ {1} ^ {*}}{\beta_ {4} ^ {*}} q _ {1} ^ {*} - \frac {1}{\beta_ {4} ^ {*}} \end{array} \right. \tag {103}
$$
Note that both sets of equations (101), (103) and (59), (76) match for  $\alpha = 1$ .
F.2.3 Overlaps and optimal singular values
From (72), (101), we have:
$$
\begin{array}{l} O _ {Y} (\gamma , \sigma_ {i}) \approx \frac {\alpha}{\pi \bar {\mu} _ {S} (\gamma)} \operatorname {I m} \lim  _ {z \rightarrow \gamma - \mathrm {i} 0 ^ {+}} \frac {\beta_ {4} ^ {*}}{Z _ {2} (z)} \boldsymbol {y} _ {i} ^ {(r) \intercal} \boldsymbol {G} _ {Y \intercal Y} \left(\frac {Z _ {1} (z)}{Z _ {2} (z)}\right) \boldsymbol {Y} ^ {\intercal} \boldsymbol {y} _ {i} ^ {(l)} \tag {104} \\ = \frac {\alpha}{\pi \bar {\mu} _ {S} (\gamma)} \operatorname {I m} \lim _ {z \to \gamma - \mathrm {i} 0 ^ {+}} \beta_ {4} ^ {*} \frac {\sigma_ {i}}{Z _ {1} (z) - Z _ {2} (z) \sigma_ {i} ^ {2}} \\ \end{array}
$$
Similar to (78), we can compute the optimal singular values to be:
$$
\widehat {\xi_ {y _ {i}} ^ {*}} = \frac {\alpha}{\pi \bar {\mu} _ {S} (\gamma_ {i})} \operatorname {I m} \lim  _ {z \rightarrow \gamma_ {i} - \mathrm {i} 0 ^ {+}} q _ {4} ^ {*} \tag {105}
$$
F.2.4 Numerical examples
We consider the matrix  $W$  to have i.i.d. Gaussian entries with variance  $1 / N$ , so  $\mathcal{C}_{\mu W}^{(1 / \alpha)}(z) = z$ . And,  $\pmb {X} = \pmb {F} + c\pmb{I}$  where  $\pmb {F} = \pmb{F}^{\intercal}\in \mathbb{R}^{N\times N}$  has i.i.d. entries with variance  $1 / N$ , and  $c\neq 0$  is a real number, so  $\mathcal{R}_{\rho_X}(z) = z + c$ . With these choices, the solution (103) simplifies to:
$$
\left\{ \begin{array}{l} \beta_ {1} ^ {*} = \frac {1}{\alpha} q _ {2} ^ {*} + q _ {3} ^ {*}, \quad \beta_ {2} ^ {*} = q _ {1} ^ {*}, \quad \beta_ {3} ^ {*} = q _ {1} ^ {*}, \quad \beta_ {4} ^ {*} = q _ {4} ^ {*} + c \\ q _ {1} ^ {*} = \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \left(1 - \frac {1}{\alpha}\right) \frac {1}{z}, \quad q _ {2} ^ {*} = \mathcal {G} _ {\bar {\mu} _ {S}} (z) \\ q _ {3} ^ {*} = \frac {(z - \beta_ {1} ^ {*}) ^ {2}}{\beta_ {4} ^ {* 2}} q _ {1} ^ {*} - \frac {z - \beta_ {1} ^ {*}}{\beta_ {4} ^ {* 2}}, \quad q _ {4} ^ {*} = \frac {z - \beta_ {1} ^ {*}}{\beta_ {4} ^ {*}} q _ {1} ^ {*} - \frac {1}{\beta_ {4} ^ {*}} \end{array} \right. \tag {106}
$$
(b) Uniform spectral,  $\mathcal{U}([1,3])$
Figure 25: Estimating  $\mathbf{Y}$ . MSE is normalized by the norm of the signal,  $\| \mathbf{Y} \|_{\mathrm{F}}^2$ .  $\mathbf{X}$  is a shifted Wigner matrix with  $c = 3$ , and  $\mathbf{W}$  has i.i.d. Gaussian entries of variance  $1/N$ , and  $N/M = 2$ . The RIE is applied to  $N = 2000$ ,  $M = 1000$ , and the results are averaged over 10 runs (error bars are invisible).
Figure 26: MSE of estimating  $\mathbf{Y}$  as a function of aspect-ratio  $\alpha >1$ ,  $\mathbf{Y}$  has Gaussian entries of variance  $1 / N$  and  $\kappa = 5$ . MSE is normalized by the norm of the signal,  $\| \mathbf{Y}\|_{\mathrm{F}}^2$ .  $\mathbf{X}$  is a shifted Wigner matrix with  $c = 3$ , and  $\mathbf{W}$  has i.i.d. Gaussian entries of variance  $1 / N$ . The RIE is applied to  $N = 2000$ ,  $M = 1 / \alpha N$ , and the results are averaged over 10 runs (error bars are invisible). Average relative error between RIE  $\widehat{\Xi}_{\mathrm{Y}}^{*}(\mathbf{S})$  and Oracle estimator is also reported.
After a bit of algebra, we find that  $q_4^*$  is the solution to the following cubic equation:
$$
\begin{array}{l} 2 x ^ {3} + 3 c x ^ {2} + \left[ c ^ {2} + 2 - \left(z - \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z)\right) \left(\frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \frac {\alpha - 1}{\alpha z}\right) \right] x \tag {107} \\ - c \left[ \left(z - \frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z)\right) \left(\frac {1}{\alpha} \mathcal {G} _ {\bar {\mu} _ {S}} (z) + \frac {\alpha - 1}{\alpha z}\right) - 1 \right] = 0 \\ \end{array}
$$
In figure 25 the MSE of RIE and the oracle estimator is plotted for two cases of priors:  $Y$  with Gaussian entries and  $Y$  with uniform spectral density.
Effect of aspect-ratio  $\alpha$ . In Figure 26, we take  $\mathbf{Y}$  to have Gaussian entries (with variance  $\frac{1}{N}$ ), and the MSE is depicted for various values of the aspect-ratio  $\alpha > 1$ . We see that as  $M$  decreases ( $\alpha$  increases) the estimation error (of  $\mathbf{Y}$ ) increases.
G Details on numerical implementations
G.1 Numerical approximation of  $\mathcal{G}_{\bar{\mu}_S}(z)$
The first step to construct the RIEs is to compute the Stieltjes transform of the observation matrix  $S$ . In section 19.5 of [58], several approaches have been proposed to approximate the Stieltjes transform of the spectral density of a given matrix. In our implementations, we use the Cauchy kernel method in which for a given matrix  $\mathbf{A}$  with  $N$  singular values (or eigenvalues)  $(\sigma_i)_{1\leq i\leq N}$ ,  $\mathcal{G}_{\mu_A}(z)$
is approximated as:
$$
\mathcal {G} _ {\mu_ {A}} (z) \approx \frac {1}{N} \sum_ {i = 1} ^ {N} \frac {1}{z - \sigma_ {i} - \mathrm {i} \eta_ {i}}
$$
with  $\eta_{i}$ 's the "widths" of the kernel at each singular value (more precisely the imaginary part is a sum of Lorentzians with width  $\eta_{i}$  around peaks at  $\sigma_{i}$ ). The construction of the RIEs uses the Stieltjes transform of the limiting symmetrized measure of  $S$ . In the numerical experiments we approximate this quantity as:
$$
\mathcal {G} _ {\bar {\mu} _ {S}} (z) \approx \frac {1}{2 N} \sum_ {i = 1} ^ {N} \left(\frac {1}{z - \gamma_ {i} - \mathrm {i} \eta} + \frac {1}{z + \gamma_ {i} - \mathrm {i} \eta}\right) \tag {108}
$$
with a fixed width  $\eta = \sqrt{1 / 2N}$ . Note that for the case of  $\alpha > 1$  ( $M < N$ ),  $S$  has  $M$  non-trivially zero singular values, and in the approximation above  $N$  should be replaced by  $M$ .
G.2 Construction of the RIEs
In the RIEs derived in [14, 19], the final estimator for optimal singular values (eigenvalues) was rather simple and only required to compute the Stieltjes transform on the real line which can be easily and safely performed using the approximation above (see remark 2 in section 19.5.2 in [58]). However, in the RIEs of this work, we need to solve a system of equations in the limit  $\epsilon \to 0$  ( $z$  close to the real line). For this, to compute the optimal singular value  $\widehat{\xi}_{y_i}^*$  (or optimal eigenvalues  $\widehat{\xi}_{x_i}^*$ ), we evaluate  $\mathcal{G}_{\bar{\mu}_S}(z)$  for  $z = \gamma_i - \mathrm{i}\frac{\varepsilon}{\sqrt{2N}}$ . In this way, the other parameters (e.g.  $q_4^*$ ) are evaluated for  $z$  very close to the real line, and the theoretical limit  $\lim_{\epsilon \to 0}$  in (49), (78) can be estimated numerically. Moreover, as we considered a fixed width in our numerical approximation of Stieltjes transform (108),  $\varepsilon$  should be chosen to compensate the width for the cases where the support of  $\bar{\mu}_S$  is wider. For example, for fixed  $N$ , as we increase SNR (from 1 to 5) the support of  $\bar{\mu}_S$  grows, however we still have  $N$  singular values and the kernel's width in (108) is fixed, so  $\varepsilon$  should be larger for higher SNRs to get a more accurate approximation of  $\mathcal{G}_{\bar{\mu}_S}(z)$ .
G.3 Mismatch between RIEs and Oracle estimators
The RIEs are conjectured to have the same performance as the Oracle estimators in the limit  $N\to \infty$  Therefore, we believe that the mismatch between the proposed RIEs and the Oracle estimators is a finite size effect. Moreover, this finiteness affects the accuracy of estimated parameters, since  $\mathcal{G}_{\bar{\mu}_S}(z)$  is approximated numerically and we do not use random matrix theory to find its exact form.
Generically, the mismatch between the RIE and Oracle estimator is larger for the case of estimating  $\mathbf{X}$ . We expect that this is because of the extra approximation step in the derivation of the optimal eigenvalues. In the fifth line of (49), the sums are approximated by an integral which is the Stieltjes transform of  $\rho_{X}$ . This approximation does not appear in derivation of the optimal singular values for  $\mathbf{Y}$ , see (78).
All in all, the small relative error (less than  $1\%$ ) between RIEs and Oracle estimators in our numerical results validates our optimality conjecture and demonstrates that RIEs can be successfully used in practice.
H Spherical integrals and matrix lemmas
H.1 Spherical Integrals
For two symmetric matrices  $\mathbf{A}, \mathbf{B} \in \mathbb{R}^{N \times N}$ , the spherical integral is defined as:
$$
\mathcal {I} _ {N} (\boldsymbol {A}, \boldsymbol {B}) = \left\langle \exp \left\{\frac {N}{2} \operatorname {T r} \boldsymbol {A} \boldsymbol {U} \boldsymbol {B} \boldsymbol {U} ^ {\intercal} \right\} \right\rangle_ {\boldsymbol {U}}
$$
where the average is w.r.t. the Haar measure over the group of (real) orthogonal  $N\times N$  matrices. The spherical integrals can also be defined w.r.t. the unitary or symplectic group. These integrals are often referred to as Harish Chandra-Itzykson-Zuber (HCIZ) integrals in mathematical physics literature. The study of these objects dates back to the work of mathematician Harish Chandra [62]
and they have since been extensively studied and developed in both physics and mathematics. In particular, [21] studied the limit of the integral in the case where one of the matrices, say  $A$ , has finite rank.
Theorem 1 (Rank-one spherical integral, Guionnet and Mäida [21]). Let  $\theta$  be the only non-zero eigenvalue of  $A$  (so it is rank one), and the empirical eigenvalue distribution of  $B$  converge weakly towards  $\rho_{B}$ . Then, for  $\theta$  sufficiently small (see details in Theorem 2 in [21]), we have:
$$
\lim  _ {N \rightarrow \infty} \frac {1}{N} \ln \mathcal {I} _ {N} (\boldsymbol {A}, \boldsymbol {B}) = \frac {1}{2} \int_ {0} ^ {\theta} \mathcal {R} _ {\rho_ {B}} (t) d t \equiv \frac {1}{2} \mathcal {P} _ {\rho_ {B}} (\theta) \tag {109}
$$
When  $A$  has higher (but finite) rank, theorem 7 in [21] states that the limit is the sum over eigenvalues of the expression on the rhs of (109).
Non-symmetric case. In the non-symmetric case the rectangular spherical integral is defined, for the matrices  $\mathbf{A} \in \mathbb{R}^{M \times N}$ ,  $\mathbf{B} \in \mathbb{R}^{N \times M}$ , as:
$$
\mathcal {J} _ {N} (\boldsymbol {A}, \boldsymbol {B}) = \left\langle \exp \left\{\sqrt {N M} \operatorname {T r} \boldsymbol {A U B V} \right\} \right\rangle_ {\boldsymbol {U}, \boldsymbol {V}}
$$
where  $\pmb{U} \in \mathbb{R}^{N \times N}$ ,  $\pmb{V} \in \mathbb{R}^{M \times M}$ , and the expectation is w.r.t. the Haar measure over orthogonal matrices of size  $N \times N$  and  $M \times M$ .
Theorem 2 (Rank-one rectangular spherical integral, Benaych-Georges [22]). Let  $N / M\to \alpha \in$ $(0,1]$ , and  $\theta$  be the only non-zero singular value of  $\mathbf{A}$ , and the empirical singular value distribution of  $\mathbf{B}$  converges weakly towards  $\mu_B$ . Then, for  $\theta$  sufficiently small (see details in Theorem 2.2 in [22]), we have: