Available optimization algorithms#
The library provides concrete optimizers that combine a curvature estimator with a step-selection strategy. They are grouped into three families:
Fixed step size – a scalar learning rate (possibly initialized adaptively) is used directly.
Line search – a one-dimensional search (backtracking, interpolation, or bisection) determines the step length.
Trust region – the step is constrained to a region where the quadratic model is trusted; the radius is updated dynamically.
All optimizers inherit from torch.optim.Optimizer and are used with a closure-based objective
(see ObjectiveFunction).
Fixed-step optimizers#
These optimizers compute a direction and apply a scalar step length. The learning rate can be set directly via
lr_init or initialized adaptively using lr_method (e.g., "BB1", "lipschitz", "quadratic").
Class |
Curvature used |
Algorithm-specific parameters |
Notes |
|---|---|---|---|
Identity |
|
Standard full-batch gradient descent. |
|
Identity |
|
Parameter-free; estimates the Lipschitz constant to set the step size. |
|
Identity |
|
Non-linear CG (Fletcher-Reeves, Polak-Ribière, etc.). |
|
Exact Hessian |
|
Full or block-diagonal exact Newton. Damping (identity/Fletcher) is strongly recommended. |
|
Exact Hessian (Hvp) |
|
Inexact Newton using an iterative solver (e.g., |
|
Diagonal Hessian (Hutchinson) |
|
Newton’s method using the Hutchinson Diagonal approximation. Not recommended but added for completeness |
|
Gauss-Newton (JᵀJ) |
|
For least-squares problems. Uses the JᵀJ approximation. |
|
Inverse Hessian (L-BFGS) |
|
Limited-memory BFGS with a fixed step size (requires careful tuning). |
|
Diagonal Hessian (Hutchinson) |
|
Adaptive method similar to Adam, but using the diagonal of the Hessian. |
Line-search optimizers#
These optimizers compute a direction and then perform a line search to find an acceptable step length.
Note
All *LS optimizers accept the standard line-search parameters:
c1, c2, tau, max_iter, tol, line_search_method, and line_search_cond.
The table below lists only the parameters that are specific to each algorithm.
Class |
Curvature used |
Algorithm-specific parameters |
Notes |
|---|---|---|---|
Identity |
|
Gradient descent with robust step-size selection. |
|
Identity |
|
Conjugate gradient with line search (recommended for CG). |
|
Exact Hessian |
|
Newton method with line search; much more robust than the fixed-step version. |
|
Exact Hessian (Hvp) |
|
Inexact Newton with line search ( |
|
Gauss-Newton (JᵀJ) |
|
Gauss-Newton with line search; preferred over the fixed-step variant. |
|
Inverse Hessian (L-BFGS) |
|
L-BFGS with line search (typically used with Wolfe conditions). This is the standard way to use L-BFGS. |
|
Diagonal Hessian (Hutchinson) |
|
AdaHessian with line search. |
|
|
Diagonal Hessian (Hutchinson) |
|
Diagonal Newton with line search. |
Trust-region optimizers#
These optimizers solve a subproblem that restricts the step to a region where the quadratic model is trusted.
Note
All *TR optimizers accept the common trust-region parameters:
trust_region_method, and accept_tol, contract_tol, expand_tol, growth_factor, shrink_factor, radius_max.
The table below lists only the parameters that are specific to each algorithm.
Class |
Curvature used |
Algorithm-specific parameters |
Notes |
|---|---|---|---|
Identity |
(none beyond the common ones) |
Gradient descent with trust region (Cauchy point). |
|
Exact Hessian |
|
Newton method with trust region. Supports exact and Steihaug-Toint solvers. |
|
Exact Hessian (Hvp) |
|
Inexact Newton with trust region (Steihaug-Toint). Memory-efficient; only uses Hvp. |
|
Gauss-Newton (JᵀJ) |
|
Gauss-Newton with trust region; robust and efficient for least-squares. |
|
Damped Gauss-Newton |
|
Interpolates between Gauss-Newton and gradient descent via adaptive damping. Uses block Gauss-Newton with Fletcher damping internally. |
|
Damped Gauss-Newton |
|
Interpolates between Gauss-Newton and gradient descent via adaptive damping. Uses inexact solvers to solve the step size subproblem. |