You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a general-objective trust-region optimizer (EFIM / JᵀJ Hessian) — the general-NLL × trust-region cell currently falls back to lbfgs quasi-Newton #481
PyBNF's gradient-based local optimizers currently cover three of the four cells of the natural (objective × curvature-model) matrix:
least-squares (SOS / chi_sq)
general NLL (estimated σ, Laplace/count, constrained)
trust-region, EFIM JᵀJ Hessian
trf ✅
— missing —
quasi-Newton
(trf preferred)
lbfgs ✅
The moment an objective stops being a pure sum-of-squares — an estimated noise scale, a Laplace/count likelihood, or a constrained fit — the gradient path drops from trf's trust-region-with-JᵀJ step down to lbfgs quasi-Newton. On the ill-conditioned NLL landscapes typical of these problems that's a real downgrade: an empirical-Fisher (JᵀJ) trust-region step is far better conditioned and converges faster and more reliably than a limited-memory BFGS Hessian built from gradient differences. We already get that benefit for least-squares via trf; we lose it exactly where the objective gets harder.
What's requested
A general-objective trust-region optimizer whose Hessian is the empirical Fisher information (JᵀJ, Gauss–Newton) — i.e. trf's step quality, extended to any NLL objective lbfgs currently handles. Registered as a fit type, running under the existing multi-start gradient orchestrator (gradient_base) like trf/lbfgs.
Why it's tractable — most of the machinery already exists
trf already assembles the residual Jacobian and forms JᵀJ via the Coleman–Li affine scaling; generalizing the EFIM-trust-region step to an arbitrary NLL is an extension of that machinery, not a green-field build.
No new backend capability is required. The EFIM Hessian is a first-order object — Σ (∂Y/∂θ)ᵀ Σ⁻¹ (∂Y/∂θ) — built entirely from the forward output-sensitivity tensor trf and lbfgs already consume via the [Epic] Gradient plumbing: objective gradients & residual Jacobians from the BNGsim output-sensitivity tensor #385 gradient plumbing (bngsim even packages this exact object as its FIM). The general-objective terms (estimated-σ block, non-Gaussian per-observation factors, constraints) are analytic and assemble on the PyBNF side from those same sensitivities. No second-order sensitivities needed — avoiding them is the point of the EFIM approximation.
Design decision
Native EFIM-TR vs. an optional pip backend. Recommend native: a picklable, explicit step machine consistent with trf/powell (scipy stays a test-oracle only, never a blocking in-loop driver), so backup/resume and the distributed propose/score loop keep working and a fit can run N starts concurrently.
Scope / acceptance
New fit type on the GradientOptimizer base; no run() override (ADR-0007).
The gap
PyBNF's gradient-based local optimizers currently cover three of the four cells of the natural (objective × curvature-model) matrix:
chi_sq)JᵀJHessiantrf✅trfpreferred)lbfgs✅The moment an objective stops being a pure sum-of-squares — an estimated noise scale, a Laplace/count likelihood, or a constrained fit — the gradient path drops from
trf's trust-region-with-JᵀJstep down tolbfgsquasi-Newton. On the ill-conditioned NLL landscapes typical of these problems that's a real downgrade: an empirical-Fisher (JᵀJ) trust-region step is far better conditioned and converges faster and more reliably than a limited-memory BFGS Hessian built from gradient differences. We already get that benefit for least-squares viatrf; we lose it exactly where the objective gets harder.What's requested
A general-objective trust-region optimizer whose Hessian is the empirical Fisher information (
JᵀJ, Gauss–Newton) — i.e.trf's step quality, extended to any NLL objectivelbfgscurrently handles. Registered as a fit type, running under the existing multi-start gradient orchestrator (gradient_base) liketrf/lbfgs.Why it's tractable — most of the machinery already exists
trfalready assembles the residual Jacobian and formsJᵀJvia the Coleman–Li affine scaling; generalizing the EFIM-trust-region step to an arbitrary NLL is an extension of that machinery, not a green-field build.Σ (∂Y/∂θ)ᵀ Σ⁻¹ (∂Y/∂θ)— built entirely from the forward output-sensitivity tensortrfandlbfgsalready consume via the [Epic] Gradient plumbing: objective gradients & residual Jacobians from the BNGsim output-sensitivity tensor #385 gradient plumbing (bngsim even packages this exact object as its FIM). The general-objective terms (estimated-σ block, non-Gaussian per-observation factors, constraints) are analytic and assemble on the PyBNF side from those same sensitivities. No second-order sensitivities needed — avoiding them is the point of the EFIM approximation.Design decision
Native EFIM-TR vs. an optional pip backend. Recommend native: a picklable, explicit step machine consistent with
trf/powell(scipy stays a test-oracle only, never a blocking in-loop driver), so backup/resume and the distributed propose/score loop keep working and a fit can runNstarts concurrently.Scope / acceptance
GradientOptimizerbase; norun()override (ADR-0007).trfrefuses: estimated noise scale, Laplace/count likelihoods, BPSL-constrained fits.trf.