Why is the intercept term typically excluded from the regularization penalty?

Last updated 3 November 2026

  • The intercept is just a constant baseline shift: it doesn't add complexity or fit noise, so penalizing it gives no generalization benefit.

  • Penalizing it would make results depend on the target's arbitrary origin (e.g. Celsius vs. Kelvin) and collapse strongly regularized predictions to 0 instead of the mean of y.

  • Typically X and y are centered and the intercept recovered as b = ȳ − x̄ᵀw. Some solvers (e.g. liblinear) do penalize it.

  • https://scikit-learn.org/stable/modules/linear_model.html
  • https://medium.com/@pratyushgiri_37116/understanding-ridge-regression-the-impact-of-regularization-on-coefficients-b59ce72c7a92
  • https://medium.com/ai-made-simple/regularization-19b1879415a1
All Regularization interview questions