preconditioning the implicit function theorem linear system using a function
In this release, we provide a new approach to stabilize the resolution of the linear system encountered when differentiating the optimal transport solution w.r.t. solutions.
To that end, we introduce a precondition_fun
argument in the sinkhorn
function to improve the resolution of the implicit function theorem differentiation of the outputs of the sinkhorn algorithm. Sinkhorn's first order condition (FOC) amounts to ∇ Energy = (marginal of transport) - (marginal fitting penalty) = 0.
This commit introduces the possibility of differentiating instead
precondition_fun(marginal of transport) - precondition_fun(marginal of transport) = 0.
For Sinkhorn, we draw inspiration from this paper to use by default the function 𝜀 log. This provides a numerically more stable approach.