Gauss-Newton

The methods discussed so far allow considerable freedom in choosing the loss function. In practical cases where the cost function is quadratic, some simplifications can be made relative to Newton's method, avoiding the explicit computation of the Hessian.

In this case, the cost function takes the form


\begin{displaymath}
S(\boldsymbol\beta)
=
\frac{1}{2}\mathbf r^{\top}\mathbf r
=
\frac{1}{2}
\sum_{i=1}^{n}
r_i^2(\boldsymbol\beta)
\end{displaymath} (4.54)

where the factor $1/2$ is introduced solely to simplify the derivative expressions.

The gradient and Hessian of the cost function are


\begin{displaymath}
\begin{array}{l}
\nabla S(\boldsymbol\beta)
=
\displayst...
...athbf J_r
+
\sum_{i=1}^{n}
r_i \mathbf H_{r_i}.
\end{array}\end{displaymath} (4.55)

When the residuals are small, or when the model is locally nearly linear, the second term in the Hessian becomes negligible, giving the approximation


\begin{displaymath}
\mathbf H_S(\boldsymbol\beta)
\approx
\mathbf J_r^{\top}\mathbf J_r.
\end{displaymath} (4.56)

Under these conditions, the gradient of the cost function is


\begin{displaymath}
\nabla S(\boldsymbol\beta)
=
\mathbf J_r^{\top}\mathbf r
\end{displaymath}

while the Hessian can be approximated by


\begin{displaymath}
\mathbf H_S(\boldsymbol\beta)
\approx
\mathbf J_r^{\top}\mathbf J_r.
\end{displaymath}

Substituting this approximation into Newton's equation (4.43) gives the linear system


\begin{displaymath}
\mathbf J_r^{\top}\mathbf J_r
\,\boldsymbol\delta_\beta
=
-\mathbf J_r^{\top}\mathbf r.
\end{displaymath} (4.57)

The solution to this system can be obtained using the normal equations:


\begin{displaymath}
\boldsymbol\delta_\beta
=
-\left(
\mathbf J_r^{\top}\mathbf J_r
\right)^{-1}
\mathbf J_r^{\top}\mathbf r.
\end{displaymath} (4.58)

Geometrically, the normal equations mean that the linearized residual


\begin{displaymath}
\mathbf J_r \boldsymbol\delta_\beta + \mathbf r
\end{displaymath}

must be orthogonal to the column space of $\mathbf J_r$.

In the special case where the residual is defined as


\begin{displaymath}
r_i
=
y_i
-
f_i(\mathbf x_i;\boldsymbol\beta),
\end{displaymath} (4.59)

that is, as in Equation (4.7), we have


\begin{displaymath}
\frac{\partial r_i}
{\partial \boldsymbol\beta}
=
-
\frac{\partial f_i}
{\partial \boldsymbol\beta},
\end{displaymath}

so the residual Jacobian $\mathbf J_r$ can be replaced by the model Jacobian $\mathbf J_f$, giving


\begin{displaymath}
\boldsymbol\delta_\beta
=
\left(
\mathbf J_f^{\top}\mathbf J_f
\right)^{-1}
\mathbf J_f^{\top}\mathbf r.
\end{displaymath} (4.60)

Paolo medici
2026-10-19