M-Estimators

The widespread use of least-squares regression (Least Squares) over other loss functions is motivated by both statistical and computational considerations. In the presence of independent Gaussian errors with constant variance, it coincides with the maximum likelihood estimator. Moreover, the quadratic function leads to simple analytical expressions for the gradient and, when differentiable, for the Jacobian and Hessian.

So far, observation errors have almost always been assumed to be normally distributed with constant variance. If the noise were exclusively Gaussian, this approach would be theoretically optimal. In real-world applications, however, data often comprise a combination of measurements consistent with the model and spurious observations (outliers) that do not belong to the main distribution. In these conditions, least-squares regression tends to assign excessive weight to observations far from the model, since the residual is squared in the cost function. Even a small number of outliers can therefore significantly affect the final parameter estimates. More robust estimates require changing how residuals are evaluated, replacing the quadratic function with loss functions that grow more slowly for large errors. A first example is least absolute deviations (Least Absolute Deviations), in which the residual contributes linearly rather than quadratically to the cost function. However, optimization using the $\ell_1$ norm is more complex than in the quadratic case because the function is nondifferentiable at the origin and requires specialized numerical methods. For this reason, many differentiable and computationally efficient robust loss functions have been developed, collectively known as M-estimators.

In 1964, Peter Huber proposed a generalization of maximum likelihood estimation by introducing M-estimators.

Some examples of regression functions are shown in Figure 4.3.

Figure 4.3: Examples of weight functions for regression: least-squares regression (L2 metric), linear regression (L1), Huber estimators, Tukey's biweight, the Lorentzian (Cauchy) function, and the Welsch (Leclerc) function.
Image fig_m-estimator1 Image fig_m-estimator2 Image fig_m-estimator3 Image fig_m-estimator4 Image fig_m-estimator5 Image fig_m-estimator6

An M-estimator replaces the sum-of-squares metric with a metric based on a general $\rho$ (loss function) having a unique minimum at zero and subquadratic growth. M-estimators generalize least-squares regression: setting $\rho(\mathbf{r})=\Vert\mathbf{r}\Vert^2$ gives the classical form of regression.

Finally, if the loss function is monotonically increasing, the estimator is called an M-estimator; if the loss function increases near zero but decreases farther from zero, it is called a redescending M-estimator.

Let $\rho$ denote the chosen robust loss function. The parameter estimates are obtained by solving the optimization problem

\begin{displaymath}
\min_\beta \sum_{i=1}^{n}
\rho \left( \frac{\mathbf{r}_i}{\sigma_i} \right)
\end{displaymath} (4.133)

where the residuals have been normalized by the expected standard deviation of the observation. The optimality condition for this problem differs from that for least squares because of the different derivative of the function $\rho$:
\begin{displaymath}
\sum_{i=1}^{n}
\frac{1}{\sigma_i}
\rho'
\left(
\frac{\mathbf...
...ial \mathbf{r}_i}
{\partial \beta_j}
=
0
\qquad
j=1,\ldots,m.
\end{displaymath} (4.134)

Paolo medici
2026-10-19