ssbroyden-optimistix
Quasi-Newton minimisers for Optimistix
in JAX: BFGS, DFP, L-BFGS and the self-scaling
Broyden family (SSBroyden, Broyden, SSBFGS, SSDFP), all with a strong-Wolfe "Zoom"
line search by default. The package uses only Optimistix' public API and works with
Optimistix 0.0.11 and 0.1. Importing it switches JAX to double precision (set
SSBROYDEN_ENABLE_X64=0 before the import to keep JAX's default).
Installation
pip install ssbroyden-optimistix
# or the development version:
pip install git+https://github.com/IvanBioli/ssbroyden_optimistix.git
Install JAX first for your hardware (e.g. pip install "jax[cuda13]"); see the
JAX installation guide.
Quick start
import jax
import jax.numpy as jnp
import optimistix as optx
import ssbroyden_optimistix as sso # enables float64
def rosenbrock(y, args):
return jnp.sum(100.0 * (y[1:] - y[:-1] ** 2) ** 2 + (1.0 - y[:-1]) ** 2)
solver = sso.SSBroyden(rtol=1e-10, atol=1e-10)
sol = optx.minimise(rosenbrock, solver, jnp.zeros(10), max_steps=2000)
print(sol.value, sol.state.num_accepted_steps)
optx.minimise counts every evaluation of the line search as a step. To give a
budget of accepted iterations, or to log at each iteration, drive the solver with
ssbroyden_optimistix.contrib.run(solver, loss_fn, params, maxiter, callback); see
example.py
(a PINN for the 3D Poisson equation).
Solvers
The self-scaling Broyden family updates the approximation H of the inverse Hessian,
after a step s = x_new - x with gradient change y = g_new - g, as
H_new = (H - H y y^T H / (y^T H y) + φ (y^T H y) v v^T) / τ + s s^T / (y^T s)
v = s / (y^T s) - H y / (y^T H y)
φ = (1 - θ) / (1 + a θ), a = b h - 1
h = y^T H y / (y^T s), b = s^T B s / (y^T s), B = H^(-1)
The family parameter θ interpolates between BFGS (θ = 0) and DFP (θ = 1), and τ scales the approximation; the technical note gives the choices of θ and τ of SSBroyden.
| Solver | θ | τ | |
|---|---|---|---|
BFGS |
0 | 1 | classic BFGS, with Zoom |
DFP |
1 | 1 | classic DFP, with Zoom |
LBFGS |
— | — | limited-memory BFGS, with Zoom |
SSBFGS |
0 | computed | self-scaling BFGS |
SSDFP |
1 | computed | self-scaling DFP |
Broyden |
computed | 1 | Broyden family, unscaled |
SSBroyden |
computed | computed | self-scaling Broyden |
All of them take search= (default Zoom()), and all but LBFGS take
use_inverse= to approximate the inverse Hessian (default) or the Hessian. The family
also takes:
alpha: in the inverse form,bis computed asb = -α s^T g / (y^T s)(sinceB s = -α g), with α the step length along the search directionp = -H g, so thats = α p."geometric"(default) takesα = s^T p / (p^T p), which is exact for any line search;"search"uses the step size reported by the line search, which is the length of the accepted step only for searches that report it (such asZoom(initial_guess_strategy="keep"), the default).initial_scaling: whether the first update uses the initial scalingτ = h / (1 + a θ)(defaultTrue).
The class hierarchy (AbstractQuasiNewton → AbstractSSBroydenFamily →
AbstractSSBroyden, AbstractBroyden, AbstractSSBFGS, AbstractSSDFP) lets you
define other members of the family by overriding _compute_thetak and
_compute_tauk.
Settings used in the paper
The quasi-Newton baselines of
Bioli, Marcati, Sangalli (2025) were run with the
Optimistix fork IvanBioli/optimistix (tag
cmame-2026). These constructions give bitwise the same iterates as the solvers of
the fork (checked by tests/test_oracle_equivalence.py):
sso.BFGS(rtol=0.0, atol=0.0) # optx.BFGS(0, 0, search=optx.Zoom())
sso.BFGS(rtol=0.0, atol=0.0, search=sso.Zoom(initial_guess_strategy="increase"))
sso.LBFGS(rtol=0.0, atol=0.0, history_length=500)
sso.SSBroyden(rtol=0.0, atol=0.0, alpha="search", initial_scaling=False)
Changes since the technical note
The code described in arXiv:2603.10599 (v1) is at
tag arxiv-v1. Since then:
- the package no longer needs a fork of Optimistix: it builds only on Optimistix' public API (0.0.11 and 0.1) and ships the Zoom line search;
ssbroyden_optimistix.contrib.runreplacesoptimistix_wrapper.pyto count quasi-Newton iterations separately from line search steps;LBFGSwith Zoom, and the optionsalphaandinitial_scalingof the family, are new;- by default, the step length in the H-form updates is now computed from the step
(
alpha="geometric"), and the first update is scaled (initial_scaling=True). In v1 it was the step size reported by the line search, which is the accepted step length only withZoom(initial_guess_strategy="keep"): with"increase", as inexample.py, it is 1.5 times the accepted step. Results of the self-scaled methods in the H-form therefore differ from v1;alpha="search", initial_scaling=Falsegives the v1 updates.
Tests
pip install -e ".[test]"
JAX_ENABLE_X64=1 pytest tests
The oracle tests need a checkout of the fork at tag cmame-2026; point
OPTX_ORACLE_PATH to its inner optimistix/ package directory (they are skipped
otherwise).
Credits
- The Hessian-form updates of the family and the first convergence tests are by Mikel Mendibe; the rest by Ivan Bioli.
- The Zoom line search is adapted from bagibence/optimistix@zoom_linesearch, and the quasi-Newton step and L-BFGS from Optimistix (both Apache-2.0).
License
Apache-2.0, see LICENSE.
Citation
If you use this package, please cite the technical note:
@misc{bioli2026selfscaledbroydenfamilyquasinewton,
title = {Self-Scaled Broyden Family of Quasi-Newton Methods in {JAX}},
author = {Bioli, Ivan and Mendibe Abarrategi, Mikel},
year = {2026},
eprint = {2603.10599},
archivePrefix = {arXiv},
primaryClass = {cs.MS},
url = {https://arxiv.org/abs/2603.10599}
}
The code is archived on Zenodo: version 0.1.0 is doi:10.5281/zenodo.23297645; all versions: doi:10.5281/zenodo.23297644.
Metadata
Release files for ssbroyden-optimistix 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ssbroyden_optimistix-0.1.1.tar.gz | 42.9 kB | With provenance | Details for ssbroyden_optimistix-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ssbroyden_optimistix-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ssbroyden_optimistix-0.1.1-py3-none-any.whl |
Total release size: 81.9 kB
Release files / ssbroyden_optimistix-0.1.1.tar.gz
| Download URL | ssbroyden_optimistix-0.1.1.tar.gz |
|---|---|
| Size | 42.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f45f107c53696becc739882ba671a75646b5802e7f317ae0c06c866f0040eb67
|
|
BLAKE2b-256 checksum How to use checksums |
ae52bd9afb7021816952b718f6af683434059ccabf3aa4f190cf5167053711dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / ssbroyden_optimistix-0.1.1-py3-none-any.whl
| Download URL | ssbroyden_optimistix-0.1.1-py3-none-any.whl |
|---|---|
| Size | 39.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33a4d752d51e9afbfb92b56fc7fb3f6fa070b3c440a0bce047e930565cafa421
|
|
BLAKE2b-256 checksum How to use checksums |
3f2e860f09d4bba5c558dc7cd62846ae946fa55b38fc53ef896fb63414ad2a48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logSecurity for ssbroyden-optimistix 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ssbroyden_optimistix-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.