Add underdetermined Levenberg-Marquardt support (minimum-norm mode)#859
Open
ChrisRackauckas-Claude wants to merge 1 commit intoSciML:masterfrom
Open
Add underdetermined Levenberg-Marquardt support (minimum-norm mode)#859ChrisRackauckas-Claude wants to merge 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude wants to merge 1 commit intoSciML:masterfrom
Conversation
This implements support for underdetermined nonlinear least-squares problems (n > m, more unknowns than equations) in the Levenberg-Marquardt algorithm. ## Changes ### DampedNewtonDescent - Added new mode for underdetermined systems - New kwarg: (default), , - Auto-detects underdetermined systems when ### Algorithm (minimum_norm mode) Instead of the normal form (JᵀJ + λD)δ = -Jᵀf, we solve: 1. (JJᵀ + λI) z = -f(x) [m×m system, smaller when n > m] 2. δ = Jᵀz [minimum-norm step] This finds the minimum-norm step that solves the linearized equations, keeping the linear system small (m×m instead of n×n). ### Implementation Details - Added `dampen_jacobian_minimum_norm!!` for scalar damping extraction - Added caches: `JJᵀ_cache`, `z_cache`, `J_raw` for minimum_norm mode - Extracts mean of diagonal damping matrix as scalar λ ### Tests Added comprehensive tests for: - Linear underdetermined systems - Nonlinear underdetermined systems - In-place formulation - Overdetermined regression tests - Large underdetermined systems (efficiency test) Closes SciML#851 Reference: Chen et al. (2026), appendix B - Optica Express 34(4):5729
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Add underdetermined Levenberg-Marquardt support (minimum-norm mode)
Summary
This PR implements support for underdetermined nonlinear least-squares problems (n > m, more unknowns than equations) in the Levenberg-Marquardt algorithm, addressing issue #851.
Background
The current L-M implementation in
DampedNewtonDescentassumes overdetermined systems (m ≥ n) and formsJᵀJ + λD. For underdetermined systems (n > m), this is inefficient because:JᵀJis n×n (large)Algorithm
For underdetermined systems, instead of solving
(JᵀJ + λD)δ = -Jᵀf, we solve:(JJᵀ + λI) z = -f(x)— This is an m×m system (smaller when n > m)δ = Jᵀz— This gives the minimum-norm stepThis approach:
Changes
lib/NonlinearSolveBase/src/descent/damped_newton.jl:minimum_normtoDampedNewtonDescentCachemin_norm_modeinDampedNewtonDescent::auto(default): Auto-detect and use minimum-norm for underdetermined systems:minimum_norm: Force minimum-norm mode:disabled: Never use minimum-norm modelength(fu) < length(u)to detect underdetermined systemsJJᵀ_cache,z_cache,J_rawfor minimum_norm computationsdampen_jacobian_minimum_norm!!and_extract_scalar_dampinglib/NonlinearSolveFirstOrder/test/underdetermined_tests.jlNew test file with comprehensive tests:
Usage
References
Checklist
damped_newton.jl