-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Sometimes one only needs the action of the Hessian on a relatively small number of vectors (e.g. this paper, which uses Lanczos algorithm to estimate the largest eigenvalue of the Hessian using just Hessian-vector-products). In such cases, for high-dimensional models, computing the full Hessian can be very wasteful.
For these cases, it would be useful to add logdensity_and_hessian_vector_product to the API. Ideally one would like to be able to use capabilities to distinguish between a model that just implements logdensity_gradient_and_hessian and logdensity_and_hessian_vector_product.
Notes
- Bridgestan exposes a similar function: https://roualdes.github.io/bridgestan/latest/languages/julia.html#BridgeStan.log_density_hessian_vector_product
- DifferentiationInterface exposes
hvpandgradient_and_hvp: https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/api/#DifferentiationInterface.hvp - Some optimizers supported by Optimization.jl can use HVPs: https://docs.sciml.ai/Optimization/stable/optimization_packages/optim/#Hessian-Free-Second-Order
Metadata
Metadata
Assignees
Labels
No labels