Closed jacobrgardner closed 5 years ago
If I've done math right, one possible inner definition of precond_closure(v)
is:
def precond_closure(v):
q, r = torch.qr(piv_chol_self) # Decompose L_{k}, use to solve with L_{k}L_{k}^{\top}
new_rhs = q.t().matmul(v)
solve = q.matmul(torch.trtrs(torch.trtrs(new_rhs, r), r, transpose=True))
return solve
@gpleiss Initial results suggest this is in fact a terrible idea :-)
I'll keep pushing on it and try to understand exactly why this is failing.
Right now, we precondition linear solves and log determinants for
AddedDiagLazyTensors
. This instance of the preconditioner uses the Woodbury formula to solve withL_{k}L_{k}^{\top} + s*I
, and the matrix determinant lemma to get the log determinant of that matrix (see the NIPS paper).Absent an added diagonal, I think
L_{k}
could still be useful for preconditioning at least linear systems by solving a least squares problem:Here's the catch: I think this default could only be used for
inv_matmul
, notinv_quad_log_det
. At least, I'm not sure how to get a good log determinant correction out of this like we do for the added diagonal case. However, this could make ourinv_matmul
calls for nonAddedDiagLazyTensors
all magically much better (of course we should test this).@gpleiss