skoro v0.0.0

Linearization and the Gauss–Newton step

Linearizing the residuals of a sum of squares and log-volumes at a point gives a quadratic model that agrees with the function in value and gradient and whose curvature is the Gauss–Newton matrix; its minimizer is the Gauss–Newton step, its minimizer in a trust region the damped step, its iteration converges where the gradient vanishes at a rate set by the curvature it omits, and it is exact when the model is linear-Gaussian.

Updated 2026-11-25 · 7 min read

The mode of a model of normals minimizes a sum of squared residuals and log-volumes. Newton’s method would minimize it with the function’s whole curvature, which needs the second derivatives of every residual. Almost every method that estimates such a model does something cheaper: it replaces each residual by its first-order expansion at a point, and is left with a quadratic model whose curvature needs first derivatives alone. This note defines that replacement, says exactly what it keeps of the function and what it leaves out, reads it as a model in a trust region, and proves what the iteration built on it converges to. The note after it reads the same replacement as a Gaussian.

The setting#

The function to be linearized is the objective (2), a sum over terms tt of half a squared whitened residual rtr_t and a log-volume λt\lambda_t, on a product of manifolds with retractions with the stacked tangent Rd\R^\dimension. Each term reads only its variables KtK_t. Write gg for the chart gradient of ff at the point of linearization x^\hat \point. Every derivative below is in the charts at x^\hat \point, so that on a curved factor it is the derivative of a function of x^⊕v\hat \point \oplus \tangent at v=0\tangent = 0.

The linearization#

Definition 1(The linearization of a sum of squares).

Let ff be as in (2), and call the log-volume λt\lambda_t folded when the residual is rt=Wt str_t = W_t\, s_t for a constant invertible WtW_t and λt\lambda_t is a function of sts_t alone. For a folded term set c^t=Wt−⊤∇λt(st)\hat c_t = W_t^{-\top} \nabla \lambda_t(s_t), the gradient of the log-volume with respect to the residual, and otherwise set c^t=0\hat c_t = 0. The linearization of ff at a point x^\hat \point is the function of v∈Rd\tangent \in \R^\dimension

m(v)=c0+∑t12∣Jtv+rt+c^t∣2+η⊤v, m(\tangent) = c_0 + \sum_t \tfrac12 \bigl\lvert J_t \tangent + r_t + \hat c_t \bigr\rvert^2 + \eta\transpose \tangent ,

where

η=∑t not folded∇λt(x^)andc0=f(x^)−12∑t∣rt+c^t∣2, \eta = \sum_{t \text{ not folded}} \nabla \lambda_t(\hat \point) \qquad \text{and} \qquad c_0 = f(\hat \point) - \tfrac12 \sum_t \lvert r_t + \hat c_t \rvert^2 ,

with rtr_t the residual at x^\hat \point, and Jt=Drt(x^)J_t = \D r_t(\hat \point) and ∇λt\nabla \lambda_t the Jacobian and the gradient in the charts at x^\hat \point.

The linearization agrees with ff to first order, and its curvature is the Gauss–Newton matrix:

m(0)=f(x^),∇m(0)=g,∇2m=∑tJt⊤Jt.(2) m(0) = f(\hat \point), \qquad \nabla m(0) = g, \qquad \nabla^2 m = \sum_t J_t\transpose J_t . \tag{2}
(2)

The first holds by the choice of c0c_0. For the second, the gradient of ff is g=∑tJt⊤rt+∑t∇λtg = \sum_t J_t\transpose r_t + \sum_t \nabla \lambda_t, while the gradient of mm at v=0\tangent = 0 is ∑tJt⊤(rt+c^t)+η\sum_t J_t\transpose (r_t + \hat c_t) + \eta. For a folded term, Drt=WtDst\D r_t = W_t \D s_t, so ∇λt=Dst⊤∇λt(st)=Jt⊤Wt−⊤∇λt(st)=Jt⊤c^t\nabla \lambda_t = \D s_t\transpose \nabla \lambda_t(s_t) = J_t\transpose W_t^{-\top} \nabla \lambda_t(s_t) = J_t\transpose \hat c_t, and the two gradients agree term by term.

Folding a log-volume into its rows. A folded log-volume’s gradient lies in the row space of its own term’s rows, so it is carried by the right-hand side, −(rt+c^t)-(r_t + \hat c_t), and not by the linear term. The normal’s log-volume is folded on the Euclidean spaces, where it is zero, and on the curved ones, where it is a function of st=x⊖μs_t = \point \ominus \mu alone: of sts_t itself on a group whose chart translates the identity’s, and of ∣st∣\lvert s_t \rvert on the sphere with orthonormal bases. On a positive space it is ∑ilog⁡xi\sum_i \log \point_i, which depends on the point and not only on sts_t, and it stays in η\eta. So a model of Euclidean and curved quantities has η=0\eta = 0 exactly. Folding costs nothing, since c^t\hat c_t is a gradient of the size of sts_t; why it is worth doing, and why η\eta is read off the unfolded log-volumes rather than computed as a difference of gradients, are questions of how the model is solved, which the normal equations answer.

Each term’s rows JtJ_t are nonzero only in the columns of its variables KtK_t, and each piece of the linear term is the gradient of one log-volume, nonzero only on the variables of its own term. So the linearization is a sum of pieces, one for each term, each a function of a few blocks of v\tangent, with the structure of the terms alone.

What is left out#

The Hessian of v↦f(x^⊕v)\tangent \mapsto f(\hat \point \oplus \tangent) at v=0\tangent = 0, which at a stationary point is the chart Hessian of Proposition 3, is

∇2f=∑tJt⊤Jt+∑t∑i(rt)i ∇2(rt)i+∑t∇2λt.(3) \nabla^2 f = \sum_t J_t\transpose J_t + \sum_t \sum_i (r_t)_i\, \nabla^2 (r_t)_i + \sum_t \nabla^2 \lambda_t . \tag{3}
(3)

The linearization keeps the first sum. The second is what every Gauss–Newton method omits: it is small where the residuals are, and it is what makes the Hessian indefinite far from a minimum. The third is the curvature of the log-volumes: zero on the Euclidean spaces, zero on the positive ones, whose log-volume is linear in their chart, and on a curved space of the relative order of the noise’s variance. The right-hand sides and the linear term keep the log-volumes’ gradients exactly.

When the rows determine every direction, the minimizer of the linearization is the Gauss–Newton step

v∗=−(∑tJt⊤Jt)−1g,(4) \tangent^* = -\Bigl(\sum_t J_t\transpose J_t\Bigr)^{-1} g , \tag{4}
(4)

computed from the rows and never from this formula, for reasons that the normal equations give. The step returns to the manifold by the retraction, x^⊕v∗\hat \point \oplus \tangent^*, factor by factor. A factor whose rows do not determine it, such as a landmark seen from one place along one direction, has no step: the direction is the model’s to fix, by a prior or by a damping, and not the linear algebra’s to guess.

A model in a trust region#

The linearization is a quadratic model (1) of ff at x^\hat \point: it has the gradient gg and the curvature M=∑tJt⊤JtM = \sum_t J_t\transpose J_t, positive semidefinite by construction. Minimizing it is the step (2) of that curvature, and the Gauss–Newton step is a quasi-Newton step whose curvature leaves out the last two sums of (3).

Like every such model it is good only near x^\hat \point, and the trust region applies to it unchanged. By Proposition 6, the step within a radius solves

(∑tJt⊤Jt+λD)v=−g(5) \Bigl( \sum_t J_t\transpose J_t + \lambda D \Bigr) \tangent = -g \tag{5}
(5)

for a damping λ≥0\lambda \ge 0, and every damped step is the trust-region step of some radius. The Gauss–Newton step is the trust-region step with the radius infinite, λ=0\lambda = 0. It is not itself a trust-region method: alone it trusts the model everywhere, and from a poor start it overshoots. The method that chooses λ\lambda by the gain ratio (7) of each step, the Levenberg–Marquardt method, is the trust-region method on this model, and a later note states its choices.

What the iteration converges to#

Repeating the step is the Gauss–Newton method. It uses the gradient of all of ff and the curvature of the squares alone, and the next statement says that the first decides where it stops and the second only how fast it gets there.

Proposition 6(Gauss–Newton with a scalar term).

Let X\manifold be a manifold with a retraction, f(q)=12∣r(q)∣2+s(q)f(q) = \tfrac12 \lvert r(q) \rvert^2 + s(q) with r:X→Rmr : \manifold \to \R^m and s:X→Rs : \manifold \to \R smooth, and J(q)=Dr(q)J(q) = \D r(q) and g(q)=J⊤r+Ds⊤g(q) = J\transpose r + \D s\transpose the Jacobian of rr and the gradient of ff in the chart at qq. Let the iteration be

qk+1=qk⊕δk,J⊤J δk=−g(qk), q_{k+1} = q_k \oplus \delta_k, \qquad J\transpose J\, \delta_k = -g(q_k) ,

with J⊤JJ\transpose J invertible near the iterates. Then δk=0\delta_k = 0 if and only if qkq_k is a stationary point of ff. If q∗q^\ast is a stationary point, H∗H^\ast the chart Hessian of ff there and E=H∗−J⊤JE = H^\ast - J\transpose J at q∗q^\ast, and the spectral radius ρ\rho of (J⊤J)−1E(J\transpose J)^{-1} E is less than 11, then the iteration converges to q∗q^\ast from every start near enough to it, and lim sup⁡k∣qk+1⊖q∗∣/∣qk⊖q∗∣≤ρ\limsup_k \lvert q_{k+1} \ominus q^\ast \rvert / \lvert q_k \ominus q^\ast \rvert \le \rho in any norm for which the spectral radius is attained.

Proof.

This is Proposition 4 with M=J⊤JM = J\transpose J, whose rate is the spectral radius of I−(J⊤J)−1H∗=−(J⊤J)−1EI - (J\transpose J)^{-1} H^\ast = -(J\transpose J)^{-1} E.

∎

With s=∑tλts = \sum_t \lambda_t, this is the iteration of the linearization, and three things follow.

  • The answer depends on the gradient alone. Whatever matrix stands on the left, the iteration stops where g=0g = 0. An iteration that includes the log-volumes’ gradients converges to a stationary point of ff itself, the mode of the model’s density; one that leaves them out converges to the minimum of the squares alone, which is the mode of another model. The sparsity of J⊤JJ\transpose J is the same either way, since each log-volume depends on the variables its own residual already reads.
  • Leaving the log-volumes’ Hessian out costs little. Write tit_i for the tangent coordinate x⊖μ\point \ominus \mu of the ii-th term, Ai=DtiA_i = \D t_i, and Λi\Lambda_i and Σi\Sigma_i for its precision and covariance. In EE the log-volumes contribute D2s=∑iAi⊤∇2λi Ai\D^2 s = \sum_i A_i\transpose \nabla^2 \lambda_i\, A_i, besides terms in ∇λi\nabla \lambda_i that vanish at ti=0t_i = 0, while J⊤J=∑iAi⊤ΛiAiJ\transpose J = \sum_i A_i\transpose \Lambda_i A_i. If −κΛi⪯∇2λi⪯κΛi-\kappa \Lambda_i \preceq \nabla^2 \lambda_i \preceq \kappa \Lambda_i for every term, then −κJ⊤J⪯D2s⪯κJ⊤J-\kappa J\transpose J \preceq \D^2 s \preceq \kappa J\transpose J, and the log-volumes add at most κ\kappa to ρ\rho, with κ=max⁡i∣Σi1/2∇2λi Σi1/2∣\kappa = \max_i \lvert \Sigma_i^{1/2} \nabla^2 \lambda_i\, \Sigma_i^{1/2} \rvert. Near t=0t = 0 that is σ2\sigma^2 for the Cayley and stereographic charts, with σ2\sigma^2 the largest variance of a rotation’s or a direction’s noise: 0.010.01 per iteration at σ=0.1\sigma = 0.1 rad. The rest of EE is the residuals’ curvature, which on a curved space includes the second derivatives of ⊖\ominus, of the same relative order σ2\sigma^2. The log-volume does not change the order of the approximation, and a positive factor adds nothing at all to EE, its log-volume being linear in its chart.
  • Adding it is safe where a Gaussian approximation is. When κ<1\kappa < 1, J⊤J+D2s⪰(1−κ) J⊤JJ\transpose J + \D^2 s \succeq (1 - \kappa)\, J\transpose J is positive definite, so it may stand on the left instead. The condition κ<1\kappa < 1 is, term by term, the one under which a normal’s mean is a mode at all, σ<1\sigma < 1 in the chart’s coordinates. Where it fails, the density is not concentrated around one mode, and no method of this kind fits it.

Where it is exact#

Proposition 7(Linear-Gaussian terms).

Let x\point be a point of a space that is flat in disguise, and let every residual rtr_t of (2) be an affine function of its chart coordinates, and every log-volume λt\lambda_t affine in them. Then at every point x^\hat \point the linearization is exact, m(v)=f(x^⊕v)m(\tangent) = f(\hat \point \oplus \tangent) for every v∈Rd\tangent \in \R^\dimension.

Proof.

On a space flat in disguise the chart at x^\hat \point and the chart at any other point differ by a translation, by (5), so a function affine in one chart’s coordinates is affine in every chart’s, and the hypothesis does not depend on x^\hat \point. An affine residual has rt(x^⊕v)=rt+Jtvr_t(\hat \point \oplus \tangent) = r_t + J_t \tangent exactly, and an affine log-volume is equal to its first-order expansion, so f(x^⊕v)=∑t12∣rt+Jtv∣2+∑tλt(x^⊕v)f(\hat \point \oplus \tangent) = \sum_t \tfrac12 \lvert r_t + J_t \tangent \rvert^2 + \sum_t \lambda_t(\hat \point \oplus \tangent), plus the constant, is m(v)m(\tangent).

∎

The normal on a Euclidean space with a fixed scale and a mean affine in the variables is such a term, and so is the normal on a positive space, the log-normal, with a mean whose logarithm is affine in their logarithms. A model of such terms is linear-Gaussian, and on it one Gauss–Newton step from anywhere lands on the mode.

Where it fails#

The linearization rests on the normalizers being constant, and so on the scales being fixed (where the form breaks). Carrying a free scale’s normalizer’s gradient in η\eta would not mend it. The residual depends on the scale, and the residual’s own curvature in the scale’s coordinates, which the rows omit, is as large as what they keep. For an isotropic scale in its logarithmic chart u=log⁡σu = \log \sigma, r=e−uεr = e^{-u} \varepsilon, so the rows’ curvature in uu is ∣r∣2\lvert r \rvert^2 and the squares’ is 2∣r∣22 \lvert r \rvert^2, while the normalizer −du-\dimension u is linear. At the stationary point ∣r∣2=d\lvert r \rvert^2 = \dimension, the omitted part equals the kept part, and the rate of Proposition 6 is one: the iteration need not converge. A scale is estimated with the expected information in the Hessian’s place, by Fisher scoring.

Built on by