LBFGS-Lite Documentation

repository·master·Indexed 19 days ago

https://github.com/zju-fast-lab/lbfgs-lite

A header-only C++ implementation of the L-BFGS unconstrained optimization algorithm. Features include the Lewis and Overton line search for smooth and nonsmooth functions, cautious updates for nonconvex convergence, and mandatory weak Wolfe conditions to ensure positive definiteness of the approximated Hessian. Version 2.1 and later require the Eigen library.

Tokens
396
Snippets
1
Records
2
Agent score
16%

What's inside LBFGS-Lite

  1. Key features of LBFGS-Lite

    master

    LBFGS-Lite implements the Limited-Memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method with several engineering enhancements for robustness:

    • Header-only: Only lbfgs.hpp is required.
    • Robust Line Search: Uses the Lewis and Overton line search (since ver. 2.1), which supports both smooth (C2) and nonsmooth (piecewise C2) functions.
    • Global Convergence: Employs the cautious update (Li and Fukushima) to ensure convergence in nonconvex cases.
    • Mandatory Weak Wolfe Condition: Unlike some libraries that allow only the Armijo condition, LBFGS-Lite makes the weak Wolfe condition mandatory to guarantee the positive definiteness (PD) of the approximated Hessian.
    • Bounded Sets: Supports externally provided maximum step sizes, which is useful for functions defined on bounded sets.
  2. Install and use LBFGS-Lite

    master

    LBFGS-Lite is a header-only C++ library for unconstrained optimization.

    Prerequisites

    Since version 2.1, the library uses Eigen for improved performance. You must have the Eigen library installed on your system. On Ubuntu/Debian, you can install it via:

    sudo apt install libeigen3-dev

    Integration

    Because it is a header-only library, you only need to include lbfgs.hpp in your project. For a detailed implementation guide, refer to the comments within lbfgs.hpp, and for a concrete implementation example, refer to lbfgs_example.cpp in the repository.

    Note: If you require a pure C-style library without external dependencies like Eigen, you must use version 0.9 of the library.