skoro v0.0.0

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.

Updated 2026-11-25 · 4 min read

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, ff is the sum of squares and log-volumes (2), mm its linearization at the current point x^\hat \point, JJ the stacked Jacobian of the residuals there, and gg the gradient.

The damping#

A step minimizes the linearization plus a penalty on its length, m(v)+12λ v⊤Dvm(\tangent) + \tfrac12 \lambda\, \tangent\transpose D \tangent, for a λ≥0\lambda \ge 0 and a positive diagonal DD. 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 λ>0\lambda > 0. The damped minimizer solves

(J⊤J+λD) v=−g.(1) (J\transpose J + \lambda D)\, \tangent = -g . \tag{1}
(1)

It is the damped step (5), and by Proposition 6 the trust-region step of the radius ∣v∣D\lvert \tangent \rvert_D: the method chooses the damping, and the radius follows. At λ=0\lambda = 0 it is the Gauss–Newton step. As λ\lambda grows it turns toward −D−1g/λ-D^{-1} g / \lambda, 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 JJ,

Dii=max⁡(∣J:,i∣2, δ),(2) D_{ii} = \max\bigl( \lvert J_{:, i} \rvert^2,\ \delta \bigr) , \tag{2}
(2)

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 δ>0\delta > 0 keeps DD positive where a column vanishes. DD is recomputed at every linearization. With it, λ\lambda is dimensionless, a multiple of the curvature along each coordinate.

The gain ratio#

The damped step v\tangent promises a decrease of the undamped linearization,

Δ(v)=m(0)−m(v)=12∣Jv∣2+λ v⊤Dv,(3) \Delta(\tangent) = m(0) - m(\tangent) = \tfrac12 \lvert J \tangent \rvert^2 + \lambda\, \tangent\transpose D \tangent , \tag{3}
(3)

since m(0)−m(v)=−g⊤v−12v⊤J⊤Jvm(0) - m(\tangent) = -g\transpose \tangent - \tfrac12 \tangent\transpose J\transpose J \tangent and −g⊤v=v⊤(J⊤J+λD)v-g\transpose \tangent = \tangent\transpose (J\transpose J + \lambda D) \tangent by (1). What it obtains is f(x^)−f(x^⊕v)f(\hat \point) - f(\hat \point \oplus \tangent). Their ratio, the gain ratio (7) of this model,

ϱλ=f(x^)−f(x^⊕v)Δ(v)(4) \varrho_\lambda = \frac{f(\hat \point) - f(\hat \point \oplus \tangent)}{\Delta(\tangent)} \tag{4}
(4)

is one where the linearization is exact, and falls as it stops being trustworthy over the step’s length. Here ff 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 λ0=10−3\lambda_0 = 10^{-3} and β=2\beta = 2 at the start:

ϱλ>0:x^←x^⊕v,λ←λmax⁡(13, 1−(2ϱλ−1)3),β←2,ϱλ≤0:λ←βλ,β←2β.(5) \begin{gathered} \varrho_\lambda > 0 : \quad \hat \point \leftarrow \hat \point \oplus \tangent, \quad \lambda \leftarrow \lambda \max\bigl(\tfrac13,\ 1 - (2 \varrho_\lambda - 1)^3\bigr), \quad \beta \leftarrow 2 , \\ \varrho_\lambda \le 0 : \quad \lambda \leftarrow \beta \lambda, \quad \beta \leftarrow 2 \beta . \end{gathered} \tag{5}
(5)

An accepted step with ϱλ\varrho_\lambda near one divides λ\lambda 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 ϱλ\varrho_\lambda, which avoids the oscillation between two values of λ\lambda that a rule with thresholds shows. With λ0\lambda_0 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, Δ(v)≤ϵ\Delta(\tangent) \le \epsilon, measured in the units of ff 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 λ\lambda has grown past a bound λmax⁡\lambda_{\max} 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 λ\lambda is small, it approaches the Gauss–Newton decrement 12g⊤(J⊤J)−1g\tfrac12 g\transpose (J\transpose J)^{-1} g, the decrease of ff 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 ff, each with an error of about u∣f∣u \lvert f \rvert at a unit roundoff uu, while Δ\Delta is computed from the rows themselves. For the ratio to mean anything, Δ\Delta must stay well above u∣f∣u \lvert f \rvert, and so must ϵ\epsilon. With ff of the order of the number of residual components, a few thousand say, double precision allows ϵ=10−9\epsilon = 10^{-9}, and single precision nothing below about 10−310^{-3}.

Why the rule does not wait for an acceptance. Once Δ\Delta is of the order of u∣f∣u \lvert f \rvert, the obtained decrease is rounding and the gain has a random sign; a step that promises nothing has the gain 0/00/0. 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 ϵ\epsilon promises far less. Each rejection multiplies λ\lambda by β\beta and doubles β\beta, so a run of some ten of them, about one chance in a thousand, would carry λ\lambda past λmax⁡\lambda_{\max} 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 12g⊤(J⊤J+λD)−1g\tfrac12 g\transpose (J\transpose J + \lambda D)^{-1} g, which bounds the Gauss–Newton decrement when λ\lambda 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 λ=0\lambda = 0, one elimination gives the Gauss–Newton step v0\tangent_0 and its decrement 12∣Jv0∣2\tfrac12 \lvert J \tangent_0 \rvert^2, which must be at most a small multiple of ϵ\epsilon. That is the statement that the point is stationary for ff, since when the rows have full rank v0=0\tangent_0 = 0 exactly where g=0g = 0, by (4).

References

  1. [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.
  2. [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.
  3. [Niel99] Hans Bruun Nielsen. Damping Parameter in Marquardt's Method. Technical University of Denmark, 1999.

Built on by