Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inaccurate derivatives of matrix logarithm #494

Open
lkapelevich opened this issue Jan 12, 2021 · 1 comment
Open

inaccurate derivatives of matrix logarithm #494

lkapelevich opened this issue Jan 12, 2021 · 1 comment

Comments

@lkapelevich
Copy link

The gradient of of the matrix valued function F(X) = log(X) or the Hessian of the scalar valued function f(X) = tr(X * log(X)) has an analytic form e.g. Equation (64) from https://arxiv.org/pdf/1906.00037.pdf.

I've hit a few cases where the derivatives I compute manually differ from ForwardDiff, one example is the bad_W in: https://gist.github.com/lkapelevich/8e4e4020cc56e13a0a42e73c4fa247d3

The code for the analytic form can become problematic if the values of some pair of eigenvalues in the input come close together. But this is not the case for the bad_W in the example, so I'm not sure what other sources of trouble to suspect.

@andreasnoack
Copy link
Member

Might be related to the discussion in #480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants