Second-Order Forward-Mode Automatic Differentiation for Optimization

Adam D. Cobb, Atılım Güneş Baydin, Barak A. Pearlmutter, Susmit Jha
8/19/2024
cs.LGstat.ML

Official code: SRI-CSL/fomoh (4 stars, BSD-2-Clause, last commit 2024-08-26).

Abstract

This paper introduces a second-order hyperplane search, a novel optimization step that generalizes a second-order line search from a line to a $k$-dimensional hyperplane. This, combined with the forward-mode stochastic gradient method, yields a second-order optimization algorithm that consists of forward passes only, completely avoiding the storage overhead of backpropagation. Unlike recent work that relies on directional derivatives (or Jacobian--Vector Products, JVPs), we use hyper-dual numbers to jointly evaluate both directional derivatives and their second-order quadratic terms. As a result, we introduce forward-mode weight perturbation with Hessian information (FoMoH). We then use FoMoH to develop a novel generalization of line search by extending it to a hyperplane search. We illustrate the utility of this extension and how it might be used to overcome some of the recent challenges of optimizing machine learning models without backpropagation. Our code is open-sourced at https://github.com/SRI-CSL/fomoh.

View on arXivView PDF

Code Implementations(1)

SRI-CSL/fomohOfficial100%
BSD-2-Clause

PyTorch-based library that implements nested forward AD and interfaces with PyTorch models.

43Shell, PythonAug 19, 20242 years agoBSD-2-Clause

Similar Papers

Cite this paper

@article{cobb2024secondorder,
  title  = {Second-Order Forward-Mode Automatic Differentiation for Optimization},
  author = {Adam D. Cobb and Atılım Güneş Baydin and Barak A. Pearlmutter and Susmit Jha},
  year   = {2024},
  eprint = {2408.10419},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.10419v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.10419.svg)](https://codeofpaper.com/paper/2408.10419)

Discussion