I have $d\times d$ real-valued matrices $A_1,\ldots,A_k$, $1000<d<4000$, $k\approx 50$, and need to estimate the trace of the following matrix product
$$t=\text{tr}(A_1 A_2\cdots A_k A_k^T \cdots A_2^T A_1^T)$$
$\|u\|^2$ gives me an unbiased estimate of $t$ where $u=A_1 \cdots A_k v$ and $v$ is some random vector with identity covariance matrix. One approach could be to compute 2-100 samples of $\|u\|^2$ and average them.
However:
- This tells me nothing about variance of the estimator. There are many distributions with identity covariance matrix, which one should I use? And how far off is my estimate?
- This ignores structure of the product. Component matrices $A_i$ are known, but this information is not used.
Is there a way to improve on $\|u\|^2$ for this problem?
Edit summarizing discussion in the comments
We can get $\text{tr}(AA')$ exactly by summing over $d_1$ row norms
Alternatively we can sum over $d_2$ column norms
Alternatively, we can sample x from normal distribution look at norm of average column or row, using $x$ as weights for averaging
This gets inefficient for large $s$, because for $s=d$, an exact approach is possible.
So it would be nice to have an approach which smoothly interpolates between exact result for $s=d$, and existing stochastic estimator for $s=1$
Also, for $s=1$ stochastic estimator, can we use the knowledge of $A$ to pick $x$ on random $x$? An example of structure is matrix product $A=A_1 ... A_k$, where some component matrices $A_i$ are diagonal. IE, perhaps if $A_1$ had large first row, and the rest of the rows are small, we should pick $x=(1,0,0,...)$ and use $\|xA\|^2$ as estimate instead of random $x$?