Iteratively Reweighted Least Squares
The algorithm behind almost all robust regression: refit ordinary least squares over and over, each time down-weighting the points whose residuals look too large, until the weights stop changing.
Prerequisites: Ordinary Least Squares (OLS)
Robust regression methods like Tukey's biweight define, in principle, an objective that's hard to minimize directly — it isn't the simple sum-of-squares that ordinary least squares (OLS) can solve in one shot with a formula. Iteratively reweighted least squares (IRLS) sidesteps that difficulty with a trick: instead of solving the hard robust problem directly, solve an easy weighted OLS problem, update the weights based on the new residuals, and repeat. Each individual step is something a spreadsheet could do; the robustness emerges from doing that step many times.
An analogy: adjusting a group photo crop
Imagine cropping a group photo to center on "the group," but a few people are standing far off to one side, pulling your first attempt at a center point away from the natural crowd. You crop again based on that estimate, notice the far-off people are now clearly on the fringe, so you weight them less in your next attempt at centering. You repeat: center, notice who's still an outlier, downweight them a bit more, re-center. After a few rounds, the crop settles onto the main crowd and the stragglers have been weighted down to almost nothing — without you ever explicitly deciding in advance who counted as a straggler.
The algorithm, one symbol at a time
Start with initial weights for every observation . At iteration :
a plain weighted least-squares fit — solvable in closed form given the weights. In plain English: refit the line, but let each point's contribution to the sum-of-squares be scaled by its current weight. Then compute the new residuals , scale them by a robust estimate of spread, and update weights using the chosen psi function: (see Tukey's biweight). In plain English: points whose residuals are still large after this fit get less say in the next fit. Repeat until the weights (and hence ) stop changing meaningfully — this is the fixed point of the robust estimating equation.
Worked example 1: three points, two iterations
Fit a robust mean to $10, $11, $50 using biweight weights with .
- Iteration 0: all weights 1, so .
- Residuals , scaled by a robust spread estimate ( from the median absolute deviation) to roughly : the $50 point gets weight 0, while $10 and $11 keep small nonzero weights.
- Iteration 1: refitting with only $10 and $11 effectively counted gives — the answer a human would give by eye, ignoring the $50 outlier.
Worked example 2: convergence tracking
A desk robustly fits a factor-model beta using 60 days of returns, with two days containing fat-finger prints. Tracking the fitted beta: iteration 0 (plain OLS) gives ; iteration 1 gives ; iteration 2 gives ; iteration 3 gives ; iteration 4 matches to three decimals, so it has converged. The two fat-finger days end up with weights near zero, and the final matches what you'd get by manually deleting those days and rerunning OLS — except IRLS found them automatically.
What this means in practice
IRLS is the workhorse behind virtually every practical robust regression: M-estimators, biweight fits, and MM-estimators (see MM-estimators for regression) are all fit this way, because it turns an intractable non-convex problem into a sequence of easy weighted-OLS solves. It's the reason robust regression is computationally cheap despite its statistical sophistication — a few reweighted refits, not a hard global optimization.
Iteratively reweighted least squares fits a robust model by alternating two easy steps — solve weighted OLS, then update weights from the new residuals — until the weights stop changing, turning a hard nonlinear estimation problem into a short sequence of simple linear ones.
IRLS is only guaranteed to converge to a fixed point, not necessarily the global optimum of the robust objective, because most robust psi functions (like the redescending biweight) make the underlying objective non-convex. Starting from a poor initial fit — especially plain OLS when outliers are severe — can lead the algorithm to converge on a fixed point that has wrongly zeroed out good data. Always initialize from a high-breakdown estimate (e.g., the coordinate-wise median or a least-trimmed-squares fit) rather than OLS when outliers may be numerous.
Related concepts
Practice in interviews
Further reading
- Holland and Welsch (1977), Robust regression using iteratively reweighted least squares
- Huber, Robust Statistics, ch. 7