Published May 7, 2024 | Version v1
Publication

How to compute Hessian-vector products?

Description

The product between the Hessian of a function and a vector, the Hessian-vector product (HVP), is a fundamental quantity to study the variation of a function. It is ubiquitous in traditional optimization and machine learning. However, the computation of HVPs is often considered prohibitive in the context of deep learning, driving practitioners to use proxy quantities to evaluate the loss geometry. Standard automatic differentiation theory predicts that the computational complexity of an HVP is of the same order of magnitude as the complexity of computing a gradient. The goal of this blog post is to provide a practical counterpart to this theoretical result, showing that modern automatic differentiation frameworks, JAX and PyTorch, allow for efficient computation of these HVPs in standard deep learning cost functions.

Abstract

https://iclr-blogposts.github.io/2024/blog/bench-hvp/

Additional details

Identifiers

URL
https://hal.science/hal-04869111
URN
urn:oai:HAL:hal-04869111v1

Origin repository

Origin repository
UNICA