Fast computation of component-wise $\exp(-XY^T)G$ for random $G$

99 Views Asked by At

I have the following question:

Suppose I have two matrices $X,Y$ both of size $m\times p$ and a random i.i.d Gaussian matrix $G$ of size $m \times k$, $m\gg p>k$.

Is there a fast way to compute $\exp(-XY^T)G$? Perhaps by using the fact that both $X$ and $Y$ are much smaller than $XY^T$? Here, $\exp(\cdot)$ means entry-wise exponent (i.e. of $\textbf{each}$ entry of the matrix). Clearly, without the exponent it's easy and can be done simply by $X(Y^TG)$.

The motivation for the question is multiplying a kernel of the form $D_{ij}=\exp(-d_{ij})$ or $D_{ij}=\exp(-d_{ij}^2)$ with $d_{ij}=\Vert x_i-y_j \Vert$ and $x_i, y_i \in \mathbb{R}^p$ by a random matrix efficiently.

An approximated solution is also fine.