A JAX research package for learned optimization, with replayable interval certification.
Status: alpha research package. In our own studies (v0.4–v0.7), the learned geometries did not beat validation-tuned fixed or Barzilai–Borwein baselines, and classical L-BFGS outperforms the learned optimizer on the reported benchmarks. To solve a problem, use SciPy or Optimistix; see when to use NeuralOpt.
NeuralOpt has two independent modes:
- Learned mode: a compact transformer reads normalized position, gradient, bounds and budget features (and, opt-in, a masked history of evaluated states) and proposes the next step. No conventional optimizer runs during inference, and every objective and gradient evaluation is counted against one budget.
- Certified mode: interval branch-and-bound with outward rounding proves global bounds for a restricted expression language, with no learned component. Certificates can be replayed by an independent verifier.
Install
pip install neuralopt
Python 3.11+. Extras: neuralopt[train] (Optax), neuralopt[benchmark] (SciPy,
Optimistix), neuralopt[sde] (Diffrax). For development: uv sync --extra dev.
Quickstart
import jax.numpy as jnp
from neuralopt import Problem, minimize
problem = Problem(lambda x: jnp.sum((x - 2) ** 2), (-5.0, 5.0), 10)
result = minimize(problem, max_evaluations=100, seed=42)
The default call loads the bundled demo-v0.1.0 checkpoint, a smoke artifact trained
for 100 updates on synthetic quadratics; it is not a validated general optimizer. The
v0.6 preconditioned loop runs compiled by default (candidate_method="preconditioned").
Certified mode accepts only the package's expression subset (+, -, *, square,
sin, exp). It uses binary64 outward rounding via numpy.nextafter and an
independent leaf-replay verifier; it does not certify arbitrary JAX code.
from neuralopt import Problem, Variable, minimize, verify_certificate
x = Variable()
expr = (x[0] - 0.25) ** 2
p = Problem(lambda z: (z[0] - 0.25) ** 2, (-1.0, 1.0), 1, certified_expression=expr)
r = minimize(p, mode="certified", absolute_gap=1e-4, max_evaluations=10000)
assert verify_certificate(r.certificate)
When to use NeuralOpt
- To solve an optimization problem: use SciPy L-BFGS-B or Optimistix. In the v0.7 equal-work benchmark they reached 1e-6 regret on 32/32 tasks; NeuralOpt's learned geometry reached it on 0/32.
- To research learned optimizers with honest accounting (shared evaluation budget, pre-registered studies, versioned checkpoints): use NeuralOpt.
- For a replayable global certificate of a small expression in the supported subset: use certified mode.
Documentation
- Docs: https://bibymaths.github.io/neuralopt/
- Release notes and CHANGELOG
- Limitations, to read before interpreting any result
- Contributing
Citation
Please cite the exact version or commit you used; see
Citing NeuralOpt and
CITATION.cff.
@software{mishra_neuralopt,
author = {Mishra, Abhinav},
title = {{NeuralOpt: a JAX research package for learned optimization, with replayable interval certification}},
version = {0.7.0},
year = {2026},
url = {https://github.com/bibymaths/neuralopt}
}
License
MIT; see LICENSE.
Metadata
Release files for neuralopt 0.7.0
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 |
|---|---|---|---|---|
| neuralopt-0.7.0.tar.gz | 2.7 MB | With provenance | Details for neuralopt-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neuralopt-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for neuralopt-0.7.0-py3-none-any.whl |
Total release size: 2.8 MB
Release files / neuralopt-0.7.0.tar.gz
| Download URL | neuralopt-0.7.0.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2d3ee1a5daa06cdc388be8d93ecf015f63191213e71c01f2657bba7af894e3b
|
|
BLAKE2b-256 checksum How to use checksums |
5cdcaaad225d0c929c4d7fc4641507b42cadb5f3dfdd6100bce6704859b08313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 22, 2026.
Transparency logRelease files / neuralopt-0.7.0-py3-none-any.whl
| Download URL | neuralopt-0.7.0-py3-none-any.whl |
|---|---|
| Size | 100.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3881f43dbc214eaf4653b7f8a3a1670140b81c1e838dde7cc6593a3ca5457bfb
|
|
BLAKE2b-256 checksum How to use checksums |
6a44c1930dfe8ee115279d21708da1aa783ff75fd9fb200e8f702c14b1e0d539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 22, 2026.
Transparency logSecurity for neuralopt 0.7.0
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 neuralopt-0.7.0.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 Nov 22, 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.