Comparing BFGS and OGR for Second-Order Optimization

Adrian Przybysz, Mikołaj Kołek, Franciszek Sobota, Jarek Duda
12/7/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Estimating the Hessian matrix, especially for neural network training, is a challenging problem due to high dimensionality and cost. In this work, we compare the classical Sherman-Morrison update used in the popular BFGS method (Broy-den-Fletcher-Goldfarb-Shanno), which maintains a positive definite Hessian approximation under a convexity assumption, with a novel approach called Online Gradient Regression (OGR). OGR performs regression of gradients against positions using an exponential moving average to estimate second derivatives online, without requiring Hessian inversion. Unlike BFGS, OGR allows estimation of a general (not necessarily positive definite) Hessian and can thus handle non-convex structures. We evaluate both methods across standard test functions and demonstrate that OGR achieves faster convergence and improved loss, particularly in non-convex settings.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{przybysz2025comparing,
  title  = {Comparing BFGS and OGR for Second-Order Optimization},
  author = {Adrian Przybysz and Mikołaj Kołek and Franciszek Sobota and Jarek Duda},
  year   = {2025},
  eprint = {2512.06969},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.06969v1}
}

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/2512.06969.svg)](https://codeofpaper.com/paper/2512.06969)

Discussion