The Levenberg–Marquardt method
A Gauss–Newton step is trusted only as far as the linearization is; damping shortens it, the ratio of the decrease obtained to the decrease promised says whether to trust it more or less, and a stopping rule on the promise alone tells convergence from rounding.
A Gauss–Newton step minimizes a model of the function, and the model is good only near the point where it was made. From a poor start the step overshoots, and the function rises. The Levenberg–Marquardt method [Leve44] [Marq63] is the trust-region method on the Gauss–Newton model: it keeps the step and limits its length, by a damping it adapts as it learns how far the model can be trusted. The frame is general; this note states the method’s four choices within it: the damping, the measure of trust, the schedule that adapts it, and the rule that stops it.
Throughout, is the sum of squares and log-volumes (2), its linearization at the current point , the stacked Jacobian of the residuals there, and the gradient.
The damping#
A step minimizes the linearization plus a penalty on its length, , for a and a positive diagonal . The penalty is rows of its own, one block for each variable, so damping changes neither the structure of the problem nor the order of its elimination, and it makes every direction determined for . The damped minimizer solves
It is the damped step (5), and by Proposition 6 the trust-region step of the radius : the method chooses the damping, and the radius follows. At it is the Gauss–Newton step. As grows it turns toward , a short step down the gradient. Read as a Gaussian, the damping is a normal prior on the step, and the damped step its mean.
The diagonal is Marquardt’s, the squared norms of the columns of ,
so that the damping does not depend on the units of the coordinates: a rotation in radians and a position in metres are damped alike, and rescaling a coordinate rescales its column and its damping together. The floor keeps positive where a column vanishes. is recomputed at every linearization. With it, is dimensionless, a multiple of the curvature along each coordinate.
The gain ratio#
The damped step promises a decrease of the undamped linearization,
since and by (1). What it obtains is . Their ratio, the gain ratio (7) of this model,
is one where the linearization is exact, and falls as it stops being trustworthy over the step’s length. Here is the function itself, log-volumes included, evaluated at the trial point. The linearization’s constant is not needed.
The schedule#
The schedule is Nielsen’s [Niel99], with and at the start:
An accepted step with near one divides by three, one near zero keeps it, and a rejected step multiplies it by a factor that doubles with each rejection in a row. The update is continuous in , which avoids the oscillation between two values of that a rule with thresholds shows. With a small multiple of the curvature, a start near the minimum takes nearly a Gauss–Newton step.
The stopping rule#
The method stops when a step promises less than a tolerance, , measured in the units of itself, nats for a log-density, whether or not the step is accepted: the step is taken if its gain is positive, and the method stops either way. It reports failure, and not convergence, when has grown past a bound or the iterations past theirs.
The promise is the right measure. It is invariant to the coordinates of the chart, and near the minimum, where is small, it approaches the Gauss–Newton decrement , the decrease of that a full Gauss–Newton step would still give. A gradient’s norm would depend on the units of the coordinates, and a step’s on the chart.
The tolerance is limited by the arithmetic. The obtained decrease in (4) is a difference of two values of , each with an error of about at a unit roundoff , while is computed from the rows themselves. For the ratio to mean anything, must stay well above , and so must . With of the order of the number of residual components, a few thousand say, double precision allows , and single precision nothing below about .
Why the rule does not wait for an acceptance. Once is of the order of , the obtained decrease is rounding and the gain has a random sign; a step that promises nothing has the gain . A rule that stopped only on an accepted step would meet such steps just after convergence, since Gauss–Newton contracts fast near a minimum and the step after one promising slightly more than promises far less. Each rejection multiplies by and doubles , so a run of some ten of them, about one chance in a thousand, would carry past and report a converged run as one that failed. Stopping on the promise alone forms no gain from rounding, and a run is never failed for having converged.
What is checked at the end#
The stopping rule bounds the damped step, not the undamped one. The damped promise is at least , which bounds the Gauss–Newton decrement when is small and not when it is large, as it may be at a stop that followed rejections. So convergence is checked apart from the rule: at the final point, with , one elimination gives the Gauss–Newton step and its decrement , which must be at most a small multiple of . That is the statement that the point is stationary for , since when the rows have full rank exactly where , by (4).
References
- [Leve44] Kenneth Levenberg. A Method for the Solution of Certain Non-Linear Problems in Least Squares. Quarterly of Applied Mathematics 2(2), 164–168. 1944.
- [Marq63] Donald W. Marquardt. An Algorithm for Least-Squares Estimation of Nonlinear Parameters. Journal of the Society for Industrial and Applied Mathematics 11(2), 431–441. 1963.
- [Niel99] Hans Bruun Nielsen. Damping Parameter in Marquardt's Method. Technical University of Denmark, 1999.
Built on by
- Linearization and elimination A density query is linearized at a batch of points into factored least-squares problems over its free quantities, by its residuals or by its information roots, and each problem is eliminated in square-root form on the host into a step, marginals, an evidence, draws, or a retirement's replacement; the Levenberg–Marquardt method iterates the steps to the mode.
- Optimization and estimation, term by term The notes on least squares and Gaussian approximations name most things twice, once as an optimizer would and once as a state estimator would; this table sets the two names side by side, row by row, with the note that defines each.