Why is early stopping in gradient descent approximately equivalent to an L2 penalty for linear models?

Quick Overview

Asks why stopping gradient descent early on a least-squares problem behaves like an L2 penalty. Tests the eigenbasis analysis of gradient descent, the spectral form of the ridge solution, the effective regularization strength, and the assumptions under which the match breaks down.

Why is early stopping in gradient descent approximately equivalent to an L2 penalty for linear models?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

Why is early stopping in gradient descent approximately equivalent to an L2 penalty for linear models? Consider least-squares linear regression trained with plain full-batch gradient descent at a fixed step size. ```hint Work in the eigenbasis Write the gradient descent update for the quadratic loss and diagonalize $X^\top X$. Each eigendirection then evolves on its own. ``` ```hint Compare shrinkage factors Write both the iterate after t steps and the ridge solution as a per-direction factor times the least-squares solution, then find where each factor moves from near 0 to near 1. ``` ### What a Strong Answer Covers - The setup: quadratic loss, eigendecomposition of the Hessian, starting point and step size. - A closed form for the gradient descent iterate in each eigendirection after t steps. - The ridge solution written as a per-direction shrinkage factor. - How matching the two transitions gives an effective λ that falls as training continues. - The assumptions behind the result and where the equivalence stops holding. ### Follow-up Questions - If you start from a nonzero $w_0$, what penalty does early stopping resemble? - How does the picture change with Adam or another per-coordinate adaptive optimizer? - Where does gradient descent from zero end up when $X^\top X$ is singular, and how does that relate to ridge as λ goes to 0? - How does picking the stopping step on a validation set compare with tuning λ by cross-validation?

Overview: Asks why stopping gradient descent early on a least-squares problem behaves like an L2 penalty. Tests the eigenbasis analysis of gradient descent, the spectral form of the ridge solution, the effective regularization strength, and the assumptions under which the match breaks down.

Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

Why is early stopping in gradient descent approximately equivalent to an L2 penalty for linear models?

Consider least-squares linear regression trained with plain full-batch gradient descent at a fixed step size.

What a Strong Answer Covers Guidance

  • The setup: quadratic loss, eigendecomposition of the Hessian, starting point and step size.
  • A closed form for the gradient descent iterate in each eigendirection after t steps.
  • The ridge solution written as a per-direction shrinkage factor.
  • How matching the two transitions gives an effective λ that falls as training continues.
  • The assumptions behind the result and where the equivalence stops holding.

Follow-up Questions Guidance

  • If you start from a nonzero w0w_0 , what penalty does early stopping resemble?
  • How does the picture change with Adam or another per-coordinate adaptive optimizer?
  • Where does gradient descent from zero end up when X⊤XX^\top X is singular, and how does that relate to ridge as λ goes to 0?
  • How does picking the stopping step on a validation set compare with tuning λ by cross-validation?