computing the inversion of a matrix which is the sum of a Kronecker product and an identity matrix

460 Views Asked by At

I am using Gibbs sampling to compute the posterior of $\mathbf{S}_{N\times K}$ $(N>>K)$ while I should calculate a Gaussian likelihood which its covariance matrix is given as $$\mathbf{P}_{K^2\times K^2}=\Big[\Big(\mathbf{S}\otimes\mathbf{S}\Big)^T\Big(\mathbf{S}\otimes\mathbf{S}\Big)+\gamma\mathbf{I}_{K^2}\Big]^{-1}$$ where $\otimes$ is a Kronecker product. I need to compute $\mathbf{P}$ for each entry update of $s_{nk}$ which is computationally very costly. $\mathbf{S}$ is a binary matrix and has this property $\sum_{i=1}^N \mathbf{s}_i^T\mathbf{s}_i$ where $\mathbf{s}$ is the rank one matrix. I am wondering whether there is a rank one updates of $\mathbf{S}$ exist in order to compute efficiently the inverse of $\mathbf{P}$ when only one entry of $\mathbf{s}_i$ (the $i$-th row of $\mathbf{S}$) is modified?

A working example when there is no Kronecker product, if we have $$\mathbf{M}^{-1}=\mathbf{S}^T\mathbf{S}+\lambda\mathbf{I}_{k},$$since the first term can be expressed as $\sum_{i}\mathbf{s}_i\mathbf{s}_i$ then calculating $\mathbf{S}_{-i,k}$ can be done by removing the influence of a single vector $\mathbf{s}_i$ is a rank-one update to $\mathbf{M}$, so we have $$\mathbf{M}_{-i}=(\sum_{j\neq i} \mathbf{s}_j^T\mathbf{s}_j+\lambda\mathbf{I})^{-1},$$ then we can use Sherman–Morrison formula and we get $$\mathbf{M}_{-i}=( \mathbf{M}^{-1}-\mathbf{s}_i^T\mathbf{s}_i)^{-1}=\mathbf{M}-\frac{\mathbf{M}\mathbf{s}_i^T\mathbf{s}_i\mathbf{M}}{\mathbf{s}_i\mathbf{M}\mathbf{s}_i^T-1}$$ and we also have $$\mathbf{M}=\mathbf{M}_{-i}-\frac{\mathbf{M}_{-i}\mathbf{s}_{i}^T\mathbf{s}_{i}\mathbf{M}_{-i}}{\mathbf{s}_{i}^T\mathbf{M}_{-i}\mathbf{s}_{i}+1}$$ which leads to having $M^{-1}=\mathbf{M}_{-i}^{-1}+\mathbf{s}_i^T\mathbf{s}_i$ and $M_{-i}^{-1}=\mathbf{S}_{-i}^T\mathbf{S}_{-i}+\gamma\mathbf{I}$. By computing the product of two vectors $\mathbf{s}_i^T\mathbf{s}_i$ at the $i$-th row, one can basically update this matrix inversion.

Is there any solution already out there for this problem? Any suggestion for computing inverse of $\mathbf{P}$ ($\mathbf{P}_{-i}$) for just rank one update of $\mathbf{s}$ (deleting the $i$-th row)??

Update: Is there any recursive method, some idea similar to this article that reduce the computation of matrix inversion here considerably?