English

The ensmallen library for flexible numerical optimization

Mathematical Software 2024-02-12 v2 Software Engineering Optimization and Control

Abstract

We overview the ensmallen numerical optimization library, which provides a flexible C++ framework for mathematical optimization of user-supplied objective functions. Many types of objective functions are supported, including general, differentiable, separable, constrained, and categorical. A diverse set of pre-built optimizers is provided, including Quasi-Newton optimizers and many variants of Stochastic Gradient Descent. The underlying framework facilitates the implementation of new optimizers. Optimization of an objective function typically requires supplying only one or two C++ functions. Custom behavior can be easily specified via callback functions. Empirical comparisons show that ensmallen outperforms other frameworks while providing more functionality. The library is available at https://ensmallen.org and is distributed under the permissive BSD license.

Keywords

Cite

@article{arxiv.2108.12981,
  title  = {The ensmallen library for flexible numerical optimization},
  author = {Ryan R. Curtin and Marcus Edel and Rahul Ganesh Prabhu and Suryoday Basak and Zhihao Lou and Conrad Sanderson},
  journal= {arXiv preprint arXiv:2108.12981},
  year   = {2024}
}
R2 v1 2026-06-24T05:30:48.718Z