FMINLBFGS: Fast Limited Memory Optimizer

Quasi newton limited memory BFGS and Steepest decent optimizer for large amount of unknowns

You are now following this Submission

FMINLBFGS is a Memory efficient optimizer for problems such as image registration with large amounts of unknowns, and cpu-expensive gradients.

Supported:
- Quasi Newton Broyden–Fletcher–Goldfarb–Shanno (BFGS).
- Limited memory BFGS (L-BFGS).
- Steepest Gradient Descent optimization.

Advantages:
- Quasi-Newton thus no need to provide a hessian, instead the hessian is updated by analyzing successive gradient vectors instead.
- L-BFGS never explicitly forms or stores the Hessian matrix, which can be quite expensive when the number of dimensions becomes large.
- There is an input option to replace gradient calls during linesearch with normal function calls, if the gradient is cpu-expensive.

This function uses the same interface and options as Matlab functions such as fminunc and fminsearch. But optimset can be replaced by a simple struct when optimization toolbox not available.

Example:
options = optimset('GradObj', 'on' ,'Display', 'iter', 'HessUpdate', 'bfgs', 'GoalsExactAchieve',1);
[x,fval] = fminlbfgs(@myfun, [1 1 1 1 1], options);

Cite As

Dirk-Jan Kroon (2026). FMINLBFGS: Fast Limited Memory Optimizer (https://www.mathworks.com/matlabcentral/fileexchange/23245-fminlbfgs-fast-limited-memory-optimizer), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.8.0.0

Fixed Example and out of memory issues.

1.7.0.0

output.fval is now also set in case the initial position is already the minimum

1.5.0.0

Added option to visualize line search. Lless iterations used in simple line search. Solved imag. warning.

1.4.0.0

Small NaN error solved...

1.3.0.0

Help extended and all parameters are now available as option

1.1.0.0

Fixed an "oscillation" bug in simple-linesearch which could occur with a non-smooth error function.

1.0.0.0