Hi I am wondering if anyone has figured out a way to solve the generalized eigenvalue problem as presented in this paper: https://arxiv.org/abs/1511.04707. The original work was done in theano using theano.tensor.slinalg.Eigvalsh . but in pytorch there is not an easy way of solving this generalized eigenvalue problem with a similar function. I’m wondering if anyone has any tips on how to either recast the problem or if there is another way of solving this.
torch.symeig solves a regular symmetric eigenvalue problem but not the generalized. In my case I have essentially Ax = lambda*Bx where A and B are symmetric PD matrices. I guess if B is non-singular I could solve this by computing inv(B)*A and solving that regular eigenvalue problem but there are no longer guarantees on the symmetry of that matrix and the inverse is generally unstable.
There is a better, albeit computationally expensive reduction using the cholesky decomposition (but use upper=False) of B: http://www.alglib.net/eigen/symmetric/generalizedsymmevd.php
In the meantime, the symeig backward was merged in master.