Skip to content

feat(search): add multi-start gradient MAP searches (Adam/ADABelief/Lion) - #1370

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/multi-start-gradient-search
Jul 14, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/multi-start-gradient-search

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Promotes the benchmark-winning multi-start gradient MAP optimizer (autolens_workspace_developer PR#96+#98, Phase-3 complete — nothing beat wide multi-start Adam on the kinked lens likelihood) to first-class PyAutoFit searches. Adds AbstractMultiStartGradient(AbstractMLE) and three concrete rule-classes, mirroring the existing AbstractBFGS → BFGS/LBFGS idiom. Each runs N broad multi-starts in parallel (jax.vmap) on the unconstrained parameterization, with a fixed self-normalised optax update per start, returning the best-basin MAP point plus per-start basin diagnostics through the standard search/samples/result contract (save/resume included).

Phase 1 of the promotion: core search + samples/result. Follow-ons (not in this PR): autofit_workspace_test JAX truth-basin validation (library-first gate), Phase 2 (config/packaged defaults), Phase 3 (autofit_workspace examples). Resolves the library portion of #1369.

API Changes

Additive only — three new searches on the public API, no removed/renamed/changed symbols:

  • af.MultiStartAdam (certified best), af.MultiStartADABelief (tied), af.MultiStartLion (sign-based, smaller default lr).
  • optax added to the [jax] optional-dependency extra (lazy import; clear error if absent).

See full details below.

Test Plan

  • test_autofit/ full suite — 1479 passed, 1 skipped (incl. 4 new test_multi_start_gradient plumbing tests; mle/optimize subtree 7/7)
  • End-to-end under real JAX (jax 0.10.2 + optax 0.2.5): MultiStartAdam recovers a truth basin exactly on a convex toy JAX analysis
  • Search serialization (to_dict/from_dict) round-trips
  • Downstream: autofit_workspace_test JAX validation (follows this merge, library-first)
Full API Changes (for automation & release notes)

Added

  • af.MultiStartAdam(name=, path_prefix=, n_starts=48, n_steps=300, learning_rate=1e-2, start_lower_limit=0.15, start_upper_limit=0.85, ...) — multi-start Adam MAP search
  • af.MultiStartADABelief(...) — same, ADABelief rule (default lr 1e-2)
  • af.MultiStartLion(...) — same, Lion rule (sign-based, default lr 1e-3)
  • autofit.non_linear.search.mle.multi_start_gradient.search.AbstractMultiStartGradient(AbstractMLE) — shared base owning the vmapped multi-start optax loop
  • optax — new [jax] extra dependency

Migration

  • None — purely additive; existing searches unaffected.

Generated by the PyAutoLabs agent workflow.

…ion)

Promote the benchmark-winning multi-start first-order gradient MAP optimizer to
first-class PyAutoFit searches. Adds AbstractMultiStartGradient(AbstractMLE) and
the concrete MultiStartAdam / MultiStartADABelief / MultiStartLion rules, running
N broad multi-starts vmapped over the af.Fitness seam with a fixed self-normalised
optax update per start, returning best-basin MAP + per-start diagnostics through
the standard samples/result contract. optax added to the jax extra.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 14, 2026
@Jammy2211
Jammy2211 merged commit 63cd4e2 into main Jul 14, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/multi-start-gradient-search branch July 14, 2026 17:57
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant