torch_numopt.curvature#

Curvature estimators for second-order optimization.

This package provides classes that approximate or compute the Hessian matrix (and its products) in various ways:

  • Exact Hessian (full or block-diagonal)

  • Gauss-Newton approximation (full or block)

  • Hutchinson diagonal approximation (via random projections)

  • Identity (no curvature)

All estimators inherit from CurvatureEstimator and implement the scaling_matrix, hvp, and quadratic_form methods.

Modules

exact_block_hessian

Block-diagonal exact Hessian.

exact_hessian

Exact Hessian computation using torch.func.

gauss_newton_approximation

Gauss-Newton approximation of the Hessian.

gauss_newton_block_approximation

Block-diagonal Gauss-Newton approximation.

hutchinson_diagonal_approximation

Hutchinson diagonal Hessian approximation.

naive_identity

Identity curvature estimator (no curvature).