NeuralOpt v0.7.0¶
Released 2026-11-22 (UTC merge date) · PRs #7, #8 and the release-engineering PR · commits
A compiled engine makes the v0.6 loop much faster without changing its results, and a pre-registered Gram-space history model fails to beat the untrained BB step; this is also the first release on PyPI. Result type: negative.
Highlights¶
- Track A (speed only, PR #7): the preconditioned loop runs as one compiled
lax.while_loop, about 74× faster per warm solve than the Python loop, with the same results. - Track B (research, PR #8): a pre-registered Gram-space history model. Negative: it does not beat the untrained Barzilai–Borwein (BB) step, which stays the bar.
- Release engineering: first PyPI release, tag-driven releases, versioned docs and curated release notes for every version.
Features¶
minimize(..., preconditioned_engine="compiled")andneuralopt.compiled.preconditioned_solve/preconditioned_solve_batch(vmapped over tasks of one family and dimension). Float64 parity with the Python loop to 1e-10.neuralopt.task_families: parametric objectivesf(x, theta)reproducing the v0.6 generator; one compilation per family and dimension.neuralopt.fast_training.train_batched: compiled, batched training step with a NaN guard; skipped updates are counted inTrainingReport.skipped_steps.- Opt-in Gram-space history model (
model_kind="gram", compiled engine only), schemasneuralopt-policy/v0.7-gram-v1and-v2, withhistory-v2masks. - Opt-in step-acceptance rules on the compiled engine:
loop_rule="halving"(default),"armijo"and"wolfe". neuralopt.gram_training: a training unroll matched to the evaluation loop, andtrain_batched(model_kind="gram").
Research results¶
Negative: the pre-registered primary hypothesis (H1) fails, and Track A changes speed only, not quality.
- Track A: warm tf-h8 solve 296.1 ms (Python) → 4.00 ms (compiled). Under equal work, learned geometry reaches 1e-3 on 10 of 32 tasks and 1e-6 on none; L-BFGS-B and Optimistix LBFGS reach 1e-6 on all 32.
- Track B, H1 fails: gram-full − BB on the curvature domain is −0.224 [−0.510, +0.115]; the interval is not entirely below zero. BB stays the bar.
- The reliability guard is also violated: Rastrigin +2.14 [+0.36, +4.34], Ackley +0.89 [+0.10, +2.08].
- gram-full − oracle-BFGS is +4.69 [+3.76, +5.68] decades; the learned model is far from relearning L-BFGS. H2 and H3 are exploratory, with no claim.
- An exploratory post-mortem (training and validation tasks only, no claims): wider models imitate the oracle better but none performs well in the loop; A/C gradients reach the heads without a saddle. The cause is undetermined.
- Next direction: amortized optimization over problem families. Learned guidance for certified search is deferred, not cancelled.
Reports: engine speed (Track A), Gram-space model (Track B).
Fixes¶
- The compiled engine casts the budget fraction to the parameters' dtype, as the Python loop does (float32 checkpoints on float64 problems).
- τ and σ for Gram runs are recorded in their own fields; they were mislabelled.
Documentation¶
- Docs restructured: installation, quickstart, when to use NeuralOpt, user guide, research reports by version, release notes, changelog, citing and API reference.
- Release notes for v0.1.0–v0.7.0.
Build and CI¶
- First PyPI release, by trusted publishing.
- Tag-driven release workflow; GitHub releases use these notes.
- Versioned docs (Zensical with its mike fork).
- git-cliff with conventional commits, and a PR-title check.
- Release-metadata consistency checks on every PR:
pyproject.toml,CITATION.cff,.zenodo.json,CHANGELOG.mdand the release notes. - New logo and a Citing page.
- Optimistix added to the
benchmarkextra only; it never runs inside inference.
Breaking changes¶
minimize(..., preconditioned_engine=...)now defaults to"compiled".candidate_method="preconditioned"with a host/NumPygradient=now raises aValueErrorthat namespreconditioned_engine="python". Pass that to keep the previous behavior.neuralopt.__version__now comes from the package metadata.- The v0.6 reproduction script
scripts/run_trajectory_curvature_v0_6.pynow pinspreconditioned_engine="python". Its sha256 changed from35c1e401e6bc8bccfaecbb9168708335e9a7d4fbd6498e35d635ed54da5e50d1tof80e8acc6bda802d65a00ea73e80e179ffcf7f8d0ddd9e23492220581b27e9f3.results/trajectory-curvature-v0.6.0.jsonis unchanged.
Known limitations¶
- Alpha research release: learned components do not beat BB or classical quasi-Newton methods in these benchmarks.
- In float32 the compiled engine matches the Python loop only to rounding level, not bit for bit.
- Track B: five training seeds, float64 and exact gradients only; test dimensions 7, 16 and 32 for a model trained at 4, 8 and 12. Why A and C were not learned is not established.
- Optimistix solvers have no box bounds; they are benchmark references only.