1
$\begingroup$

Assuming we have three matrices: $\mathbf{X} \in \mathbb{R}^{4096 \times 1024}$, $\mathbf{Q} \in \mathbb{R}^{1024 \times 2048}$, $\mathbf{K} \in \mathbb{R}^{2048 \times 1024}$. Where all elements of these matrices are independently sampled from the standard normal distribution $\mathcal{N}(0, 1)$.We compute the matrix $\mathbf{Y} = \mathbf{X} \mathbf{Q} \mathbf{K} \mathbf{X}^T \in \mathbb{R}^{4096 \times 4096}$ through matrix multiplication. The question is: What distribution do the individual elements of the matrix $\mathbf{Y}$ follow?How can we calculate its mean and variance?

$\endgroup$
2
  • 1
    $\begingroup$ at least for the spectrum there are some results see here mathoverflow.net/questions/450955/… eg. "Eigenvalues and Singular Values of Products of Rectangular Gaussian Random Matrices" $\endgroup$ Commented Oct 12, 2023 at 3:09
  • $\begingroup$ Thanks very much for your useful referrence.I still struggle in can we write an analytical solution for elements of matrix Y. $\endgroup$
    – eternity
    Commented Oct 12, 2023 at 3:53

1 Answer 1

2
$\begingroup$

The mean of the matrix elements of $Y$ is zero, because the matrix elements of $Q$ and $K$ average to zero. The variance is given by $$\mathbb{E}[Y_{ip}^2]=\sum_{jkl\alpha\beta\gamma}\mathbb{E}[X_{ij} Q_{jk} K_{kl} X_{pl} X_{i\alpha} Q_{\alpha\beta} K_{\beta\gamma} X_{p\gamma}]$$ $$=\sum_{jkl}\mathbb{E}[(X_{ij} Q_{jk} K_{kl} X_{pl})^2]=2048\sum_{j,l=1}^{1024}\mathbb{E}[(X_{ij}X_{pl})^2].$$ If $i\neq p$ this evaluates to $$\mathbb{E}[Y_{ip}^2]=2048\times(1024)^2=2147483648.$$

For $i=p$ instead $$\mathbb{E}[Y_{ii}^2]=2048\sum_{j,l=1}^{1024}\mathbb{E}[(X_{ij}X_{il})^2]=2048\left(\sum_{j,l=1,j\neq i}^{1024}\mathbb{E}[(X_{ij}X_{il})^2]+2048\sum_{j=1}^{1024}\mathbb{E}[X_{ij}^4]\right)$$ $$=2048\cdot 1024\cdot 1023+2048\cdot 1024\cdot 3=2151677952.$$

Concerning the full distribution: The paper The Product of Gaussian Matrices is Close to Gaussian by Li & Woodruff considers the problem where all $N\times N$ matrices in the product are independent; then an $n\times n$ submatrix of the matrix product is close in variation distance to a matrix with uncorrelated Gaussian elements if $n^2\ll N$. I expect this result also to apply to the case considered here, where one matrix is repeated in the product. In particular, the marginal distribution of a single matrix element of $Y$ will be close to a Gaussian.

$\endgroup$
6
  • 1
    $\begingroup$ Do you have a proof that the distribution will be close to normal? $\endgroup$ Commented Oct 13, 2023 at 2:02
  • $\begingroup$ Thank you very much! I'm curious to what distribution will the diagonal elements of Y satisfy?And I also want to kown why the distribution will be close to normal?According to CLF? $\endgroup$
    – eternity
    Commented Oct 13, 2023 at 3:15
  • $\begingroup$ I added the variance for the diagonal elements. $\endgroup$ Commented Oct 13, 2023 at 9:36
  • $\begingroup$ Thanks for your reply!But I still have questions about why elements of $\mathbf{Y}$ close to a Gaussian.And does this also hold true for diagonal elements?Thanks once again for your generous response! $\endgroup$
    – eternity
    Commented Oct 13, 2023 at 14:20
  • $\begingroup$ I added a reference where a similar problem is treated, which suggests that if you restrict yourself to the joint distribution of a small subset of the matrix elements of $Y$, this will be close to that of independent Gaussian random variables. $\endgroup$ Commented Oct 13, 2023 at 15:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .