You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing a rather annoying problem with derivatives of eigenvectors. I'm doing an eigen-decomposition of the 3x3 inertia tensor for two point clouds in order to align the principal axes. 99.999% of the time, the derivatives are perfectly stable since the eigenvalues are no where close to each other. However, that 0.001% of the time the eigenvalues become close due to symmetries that arise in a thermal bath, and my simulation blows up. Unfortunately we run for 500k+ steps routinely so these small problems will always occur. Is there a way to stabilize this derivative?
In the following example there are two distinct molecules from a public dataset,
The first molecule has eigenvalues of the inertia tensor:
[0.04587656 0.13561707 0.15451878] <-- fine
The second molecule has the following
[0.0276736 0.14507128 0.14508379] <-- blows up
The problem is that although we never backprop adjoints of eigenvalues, the backprop of eigenvector adjoints do involve a check in the eigenvalues. This is seen in the vjp of grad_eigh (taken from autograd):
F = off_diag / (w_repeated.T - w_repeated + np.eye(N))
Not sure if this is related to gimbal locks in classical mechanics, perhaps a quaternion treatment might be better?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm facing a rather annoying problem with derivatives of eigenvectors. I'm doing an eigen-decomposition of the 3x3 inertia tensor for two point clouds in order to align the principal axes. 99.999% of the time, the derivatives are perfectly stable since the eigenvalues are no where close to each other. However, that 0.001% of the time the eigenvalues become close due to symmetries that arise in a thermal bath, and my simulation blows up. Unfortunately we run for 500k+ steps routinely so these small problems will always occur. Is there a way to stabilize this derivative?
In the following example there are two distinct molecules from a public dataset,
The first molecule has eigenvalues of the inertia tensor:
The second molecule has the following
The problem is that although we never backprop adjoints of eigenvalues, the backprop of eigenvector adjoints do involve a check in the eigenvalues. This is seen in the vjp of grad_eigh (taken from autograd):
Not sure if this is related to gimbal locks in classical mechanics, perhaps a quaternion treatment might be better?
Code sample:
Beta Was this translation helpful? Give feedback.
All reactions