YWolfeee / lapjax

A JAX based package designed for efficient second order operators (e.g., laplacian) computation.
MIT License
69 stars 6 forks source link

Is there a way in lapjax to make result.lap return the second derivative of the input instead of the Laplace? #21

Closed 5huanghuai closed 6 months ago

YWolfeee commented 6 months ago

Hi,

Forward Laplacian is designed to accelerate second order computation via maintaining the minimum amount of information required to calculate the output. If the goal is to obtain the entire Hessian matrix, it violates the acceleration principle and cannot be computed efficiently via FL.

However, if the goal is to derive a different scalar objective from the Hessian matrix (rather than the trace, i.e. the sum of diagonal term), then FL acceleration is still expected. Please check the Forward Propogation work https://arxiv.org/abs/2402.09730 that uses FL to accelerate a general form of second-order differential operators.

5huanghuai commented 6 months ago

Yes, I have noticed that paper. I am very much looking forward to this work being open-sourced on GitHub. Looking forward to your work

YWolfeee commented 6 months ago

There won't be open-sourced package for DOF, as it can be achieved with a few lines of code by using lapjax.

5huanghuai commented 6 months ago

Alright, thank you very much.