Regularization

A polynomial of degree 15 can pass through 16 training points exactly. Yet it can fail wildly on new data. This is the central paradox of flexible models. The capacity that lets them fit anything is the same capacity that lets them fit noise. Regularization is the family of techniques that resolves this paradox. It works by adding a cost for complexity. A model must earn every unit of flexibility. It must improve fit enough to justify that flexibility. Regularization is arguably the single most load-bearing idea in machine learning. It separates models that merely memorize training data from models that generalize. The problem regularization solves shows up everywhere real systems learn from finite data. Consider a linear regression with thousands of correlated features. Or a neural network with millions of parameters. Or a decision tree that can grow until every leaf is pure. All of these are prone to fitting sampling noise rather than signal. Without some counter-pressure, minimizing training error alone drives models toward a boundary. That boundary is what the data can support, and models often go past it. Regularization supplies that counter-pressure directly inside the objective function. It does not rely solely on early stopping or post-hoc pruning. This article builds on the Bias-Variance Tradeoff and the phenomenon of Overfitting and Underfitting. It treats regularization as the concrete mechanism that lets a practitioner dial the tradeoff. We derive the two workhorse penalties from first principles: ridge (L2) and lasso (L1). We show why they shrink coefficients, and why lasso additionally sparsifies them. We connect the whole apparatus to a Bayesian prior interpretation. This interpretation foreshadows MAP Estimation. We also cover elastic net, early stopping, and dropout as regularization in disguise. We give worked numerical traces so the shrinkage behavior is not just asserted but seen. By the end, you should be able to do several things. Write down the ridge and lasso objectives from memory. Explain geometrically why lasso produces exact zeros and ridge does not. Choose a regularization strength via cross-validation with the right mental model of what you are optimizing. Recognize regularization's fingerprints in architectures and training tricks that don't call themselves "regularizers" at all.

Key takeaways
  • Regularization adds a complexity penalty to the training loss, trading a small increase in bias for a often larger decrease in variance.
  • Ridge (L2) penalty shrinks all coefficients smoothly toward zero; lasso (L1) penalty drives many coefficients to exactly zero, performing implicit feature selection.
  • The geometric reason for lasso's sparsity is the diamond-shaped constraint region's corners; ridge's spherical region has no corners.
  • The regularization strength λ is a hyperparameter tuned via cross-validation, not learned by gradient descent on the training loss.
  • Regularization has a Bayesian reading: penalties correspond to priors on parameters, and the regularized objective is (up to constants) a MAP estimate.
  • Many modern techniques — early stopping, dropout, data augmentation, weight decay — are regularization under different names.
The core insight

Regularization converts "minimize training error" into "minimize training error plus a price for complexity," deliberately accepting bias to buy a larger reduction in variance.

The idea

Given training data {(xi,yi)}i=1n\{(x_i, y_i)\}_{i=1}^n and a hypothesis class parameterized by θ\theta, ordinary empirical risk minimization solves

θ^=arg⁡min⁡θ  L(θ)=1n∑i=1nℓ(yi,fθ(xi)).\hat\theta = \arg\min_\theta \; L(\theta) = \frac{1}{n}\sum_{i=1}^n \ell(y_i, f_\theta(x_i)).

If the hypothesis class is rich enough, this objective is minimized by parameters that fit training-set idiosyncrasies — label noise, sampling quirks — rather than the underlying signal. Regularization modifies the objective to

θ^λ=arg⁡min⁡θ  L(θ)+λ R(θ),\hat\theta_\lambda = \arg\min_\theta \; L(\theta) + \lambda \, R(\theta),

where R(θ)R(\theta) is a penalty that grows with some notion of model complexity (typically the size of the parameters), and λ≥0\lambda \geq 0 is the regularization strength controlling how much complexity costs relative to fit. At λ=0\lambda = 0 we recover unconstrained fitting; as λ→∞\lambda \to \infty the penalty dominates and θ\theta is forced toward the simplest model the penalty prefers (often θ=0\theta = 0). The two canonical penalties are the squared L2 norm and the L1 norm:

Rridge(θ)=∥θ∥22=∑jθj2,Rlasso(θ)=∥θ∥1=∑j∣θj∣.R_{\text{ridge}}(\theta) = \|\theta\|_2^2 = \sum_j \theta_j^2, \qquad R_{\text{lasso}}(\theta) = \|\theta\|_1 = \sum_j |\theta_j|.

Ridge regression (Tikhonov regularization) and the lasso (least absolute shrinkage and selection operator) are the resulting estimators. Both shrink coefficients toward zero relative to the unregularized solution, but they shrink differently: ridge shrinks proportionally and smoothly, never zeroing a coefficient unless it was already zero, while lasso can drive coefficients to exactly zero, yielding sparse solutions that perform automatic feature selection. A third option, elastic net, mixes both penalties, λ1∥θ∥1+λ2∥θ∥22\lambda_1\|\theta\|_1 + \lambda_2\|\theta\|_2^2, to get sparsity while handling groups of correlated features more stably than lasso alone. Regularization is not limited to explicit penalty terms. Early stopping — halting gradient descent before the training loss is fully minimized — implicitly limits how far parameters travel from their initialization, acting as a penalty on parameter magnitude in models trained by iterative gradient methods. Dropout in neural networks randomly zeroes activations during training, which can be shown to approximate an L2 penalty (and an ensembling effect) at inference time. Data augmentation enlarges the effective sample size, reducing variance without touching R(θ)R(\theta) at all. All of these share the same purpose as explicit penalties: constrain effective model complexity relative to what the data can support.

How it works

The mechanics reduce to three linked pieces: (1) formulating the penalized objective, (2) solving or approximately solving it, and (3) selecting λ\lambda by held-out performance rather than training loss (since training loss is always minimized at λ=0\lambda = 0).

Ridge regression has a closed form. With design matrix X∈Rn×pX \in \mathbb{R}^{n \times p}, target yy, and objective

L(θ)=∥y−Xθ∥22+λ∥θ∥22,L(\theta) = \|y - X\theta\|_2^2 + \lambda \|\theta\|_2^2,

setting the gradient to zero gives

θ^ridge=(X⊤X+λI)−1X⊤y.\hat\theta_{\text{ridge}} = (X^\top X + \lambda I)^{-1} X^\top y.

The addition of λI\lambda I is exactly what makes this invertible even when X⊤XX^\top X is singular or ill-conditioned (e.g., p>np > n, or collinear features) — the original motivation of Tikhonov regularization in ill-posed inverse problems.

Lasso has no closed form in general because ∥θ∥1\|\theta\|_1 is non-differentiable at zero, but it is convex, and efficient solvers exist: coordinate descent (updating one θj\theta_j at a time via a soft-thresholding operator) and least-angle regression (LARS) are the classical choices. The soft-thresholding update for coordinate jj, holding all others fixed, is

θj←Sλ ⁣(ρj)/zj,Sλ(ρ)=sign(ρ)max⁡(∣ρ∣−λ,0),\theta_j \leftarrow S_{\lambda}\!\left(\rho_j\right) / z_j, \qquad S_\lambda(\rho) = \text{sign}(\rho)\max(|\rho| - \lambda, 0),

where ρj\rho_j is the partial residual correlation with feature jj and zj=∑ixij2z_j = \sum_i x_{ij}^2. This is the algorithmic heart of why lasso zeroes coefficients: any coefficient whose correlation with the residual falls below λ\lambda in magnitude is snapped exactly to zero. ```

# Coordinate descent for Lasso regression

# minimizes (1/2n) ||y - X theta||^2 + lambda ||theta||_1 function LASSO_COORDINATE_DESCENT(X, y, lambda, tol, max_iter): n, p = shape(X) theta = zeros(p)

# precompute column norms z = [ sum(X[:, j]^2) for j in 1..p ] for iter in 1..max_iter: theta_old = copy(theta) for j in 1..p:

# partial residual: remove feature j's current contribution r_j = y - X @ theta + X[:, j] * theta[j] rho_j = dot(X[:, j], r_j) / n

# soft-threshold update if rho_j > lambda: theta[j] = (rho_j - lambda) / (z[j] / n) else if rho_j < -lambda: theta[j] = (rho_j + lambda) / (z[j] / n) else: theta[j] = 0.0 if max(abs(theta - theta_old)) < tol: break return theta ``` ```

# Selecting lambda via k-fold cross-validation

# candidate_lambdas: list of penalty strengths to try function SELECT_LAMBDA(X, y, candidate_lambdas, k): folds = SPLIT_INTO_K_FOLDS(X, y, k) best_lambda, best_score = None, +infinity for lambda in candidate_lambdas: fold_errors = [] for i in 1..k: X_train, y_train = folds except fold i X_val, y_val = fold i theta = FIT_REGULARIZED_MODEL(X_train, y_train, lambda) pred = X_val @ theta fold_errors.append(MEAN_SQUARED_ERROR(y_val, pred)) avg_error = mean(fold_errors) if avg_error < best_score: best_score = avg_error best_lambda = lambda return best_lambda ``` The cross-validation loop is essential and non-negotiable: because L(θ)+λR(θ)L(\theta) + \lambda R(\theta) evaluated on the training set is minimized by the smallest λ\lambda that still fits well, λ\lambda can never be chosen by looking at training loss. It must be chosen by performance on data the fitting procedure never touched. The geometric picture below is the standard way to see why L1 penalization creates sparsity while L2 does not. Each penalty defines a constrained region R(θ)≤tR(\theta) \leq t (equivalent to the penalized form by Lagrangian duality), and the unconstrained least-squares solution is pulled toward the nearest point on that region's boundary that also improves the fit. The elliptical contours are level sets of the least-squares loss.

Figure
Constraint regions for L1 (diamond) vs L2 (circle) penalties, with least-squares contours
solution (θ₁=0) L1 (Lasso): diamond θ₂ θ₁ solution (θ₁,θ₂ ≠ 0) L2 (Ridge): circle θ₂ θ₁

The lasso's optimum tends to land on a corner of the diamond, where one coordinate is exactly zero, because corners are the points of the boundary most likely to first touch a shrinking elliptical contour as it grows from the unconstrained optimum. The ridge's circular boundary has no corners, so the contact point generically has all coordinates nonzero — shrunk, but not eliminated.

Complexity & correctness

Time complexity. Closed-form ridge regression requires computing X⊤XX^\top X (O(np2)O(np^2)), adding λI\lambda I, and solving a linear system or inverting a p×pp \times p matrix (O(p3)O(p^3) via Cholesky/LU). Total: O(np2+p3)O(np^2 + p^3), identical in order to ordinary least squares — regularization adds no asymptotic cost here, only numerical stability. Lasso via coordinate descent costs O(np)O(np) per full sweep over all coordinates (each coordinate update is O(n)O(n), there are pp coordinates), so O(np⋅T)O(np \cdot T) for TT sweeps to convergence; TT is typically small (tens to low hundreds) for well-conditioned problems but grows for highly correlated features. LARS computes the entire lasso solution path in O(npmin⁡(n,p))O(np \min(n,p)) in the typical case, comparable to one ridge solve.

Space complexity. O(np)O(np) to store the design matrix, plus O(p2)O(p^2) for ridge's normal-equations matrix (or O(np)O(np) if solved via QR/SVD without forming X⊤XX^\top X explicitly, which is preferred for numerical stability). Lasso via coordinate descent needs only O(np)O(np) and O(p)O(p) working memory, no p×pp \times p matrix.

Cross-validation cost multiplies whichever base cost by kk (folds) times the number of candidate λ\lambda values, but this is embarrassingly parallel across folds and λ\lambda values.

Correctness — why ridge is the unique minimizer. The ridge objective ∥y−Xθ∥22+λ∥θ∥22\|y - X\theta\|_2^2 + \lambda\|\theta\|_2^2 is a strictly convex quadratic in θ\theta whenever λ>0\lambda > 0, because its Hessian 2(X⊤X+λI)2(X^\top X + \lambda I) is positive definite (adding λI\lambda I to a positive semi-definite matrix makes all eigenvalues strictly positive, λ+σmin⁡(X⊤X)>0\lambda + \sigma_{\min}(X^\top X) > 0). A strictly convex quadratic has a unique global minimizer found by setting the gradient to zero, which gives the closed form directly — no local minima to worry about, unlike in non-convex neural network losses.

Why regularization reduces variance — a bias-variance derivation. For ridge regression with orthonormal design (X⊤X=IX^\top X = I), the ridge estimate reduces to elementwise shrinkage of the OLS estimate: θ^ridge,j=θ^OLS,j/(1+λ)\hat\theta_{\text{ridge},j} = \hat\theta_{\text{OLS},j} / (1 + \lambda). Since Var(θ^OLS,j)=σ2\text{Var}(\hat\theta_{\text{OLS},j}) = \sigma^2 (some constant depending on noise variance), shrinking by a factor c=1/(1+λ)<1c = 1/(1+\lambda) < 1 scales variance by c2c^2:

Var(θ^ridge,j)=c2σ2<σ2=Var(θ^OLS,j),\text{Var}(\hat\theta_{\text{ridge},j}) = c^2 \sigma^2 < \sigma^2 = \text{Var}(\hat\theta_{\text{OLS},j}),

while introducing bias E[θ^ridge,j]−θj∗=(c−1)θj∗\mathbb{E}[\hat\theta_{\text{ridge},j}] - \theta_j^* = (c - 1)\theta_j^*, which grows with λ\lambda. The mean squared error decomposes as Bias2+Variance\text{Bias}^2 + \text{Variance}, and for small λ\lambda the variance reduction (which enters quadratically in cc) initially outpaces the bias increase, so MSE strictly decreases from its value at λ=0\lambda = 0 — this is the formal justification, not just intuition, for why some regularization is (almost) always better than none when noise is present. Beyond an optimal λ∗\lambda^*, further increases in bias dominate and MSE rises again — hence the U-shaped validation curve central to the Bias-Variance Tradeoff.

Why lasso produces exact zeros — the subgradient argument. At a coordinate-wise optimum of the lasso objective, the subgradient stationarity condition for θj\theta_j is

−1nXj⊤(y−Xθ)+λ ∂∣θj∣=0,-\frac{1}{n}X_j^\top(y - X\theta) + \lambda \, \partial|\theta_j| = 0,

where ∂∣θj∣=sign(θj)\partial|\theta_j| = \text{sign}(\theta_j) if θj≠0\theta_j \neq 0 and ∂∣θj∣∈[−1,1]\partial|\theta_j| \in [-1, 1] if θj=0\theta_j = 0. This means θj=0\theta_j = 0 is optimal whenever ∣1nXj⊤(y−Xθ)∣≤λ\left|\frac{1}{n}X_j^\top(y - X\theta)\right| \leq \lambda — a whole interval of residual-correlations maps to the single point zero, unlike ridge's smooth gradient 2λθj2\lambda\theta_j, which is only zero when θj\theta_j itself is zero. This flat region around zero in the L1 penalty's subgradient is the precise mathematical reason sparsity emerges; it has no analogue in the differentiable L2 penalty.

Honest tradeoffs. Regularization requires an extra hyperparameter (λ\lambda, or two for elastic net) that must be tuned, adding computational cost and a risk of choosing badly on a small validation set. Ridge never performs feature selection, which can hurt interpretability with many irrelevant features. Lasso can behave erratically with strongly correlated features (arbitrarily picking one of a correlated group and zeroing the rest), which elastic net mitigates but does not eliminate. All penalty-based methods assume the "right" notion of complexity is captured by parameter magnitude, which is not always true (e.g., a large-magnitude but smooth function may generalize better than a small-magnitude jagged one in some bases).

Worked example

Consider a tiny regression problem with 2 standardized features (mean zero, unit variance) and n=5n = 5 points, deliberately including a spurious, weakly-correlated feature to show lasso zeroing it out.

x1x_1x2x_2 (noisy/spurious)yy
-1.50.3-2.9
-0.5-0.8-0.8
0.00.50.2
0.7-0.21.6
1.30.22.9

An unregularized least-squares fit on this data gives approximately θ^OLS=(2.05,−0.35)\hat\theta_{\text{OLS}} = (2.05, -0.35) — feature 2 picks up a non-trivial coefficient purely from finite-sample noise, since it was constructed to be nearly uncorrelated with yy in the population. Applying ridge regression with increasing λ\lambda (using the closed form θ^=(X⊤X+λI)−1X⊤y\hat\theta = (X^\top X + \lambda I)^{-1}X^\top y):

λ\lambdaθ^1\hat\theta_1θ^2\hat\theta_2Behavior
0 (OLS)2.05−0.35Full fit, noise included
0.51.86−0.27Both shrink smoothly
2.01.52−0.16Further, proportional shrinkage
10.00.71−0.05Heavy shrinkage, still nonzero

Every ridge coefficient shrinks monotonically toward zero but θ^2\hat\theta_2 never reaches it exactly — consistent with the smooth-gradient argument above. Applying lasso with the same λ\lambda grid (via coordinate descent), using the soft-threshold behavior:

λ\lambdaθ^1\hat\theta_1θ^2\hat\theta_2Behavior
02.05−0.35Same as OLS
0.151.78−0.09Both shrink, θ2\theta_2 shrinking faster
0.301.550.00θ2\theta_2 hits zero exactly — feature 2 dropped
1.00.600.00Only feature 1 survives

At λ=0.30\lambda = 0.30, the partial correlation of feature 2 with the residual falls below the threshold λ\lambda, so the soft-thresholding update Sλ(ρ2)=sign(ρ2)max⁡(∣ρ2∣−λ,0)S_\lambda(\rho_2) = \text{sign}(\rho_2)\max(|\rho_2| - \lambda, 0) evaluates to exactly zero — lasso has performed feature selection, discarding the spurious predictor while ridge kept a small trace of it at every λ\lambda. Cross-validation on a held-out fold would typically select λ≈0.3\lambda \approx 0.3–0.50.5 for lasso here, since the true generative process only used feature 1; a validation curve plotted against λ\lambda would show validation error decreasing sharply as the noise coefficient is suppressed, then flattening or rising slightly as λ\lambda grows large enough to also shrink the true signal θ1\theta_1.

Figure
Validation error vs regularization strength λ — the U-shaped tradeoff curve
regularization strength λ → error training error validation error λ* (optimal)

Common pitfalls & traps

PitfallWhy it happensFix
Tuning λ\lambda on the training setTraining loss is always minimized at λ=0\lambda = 0, so this "selects" no regularizationAlways tune λ\lambda via a validation set or cross-validation
Forgetting to standardize featuresL1/L2 penalties treat all coefficients on the same numeric scale; unscaled features get unfairly shrunk or sparedStandardize (zero mean, unit variance) before fitting ridge/lasso
Regularizing the intercept/bias termThe intercept controls the overall offset, not complexity, and penalizing it biases predictions toward zeroExclude the intercept from the penalty term (fit it unpenalized, or center yy first)
Assuming lasso is always "better" because it's sparseWith strongly correlated features, lasso picks one arbitrarily and can be unstable across resamplesUse elastic net when features are correlated in groups
Treating λ\lambda as fixed across problemsOptimal λ\lambda depends on sample size, noise level, and feature scale — it does not transfer across datasetsRe-tune λ\lambda per dataset via cross-validation, never reuse a value blindly
Confusing weight decay with L2 penalty in adaptive optimizersWith optimizers like Adam, naive L2 penalty added to the loss does not behave like true weight decay due to gradient rescalingUse decoupled weight decay (e.g., AdamW) when regularizing deep networks

Pioneers & history

Origins · 1 minAndrey Nikolayevich Tikhonov and how this was discovered
AN
Andrey Nikolayevich Tikhonov
1906–1993 · Soviet mathematician working on ill-posed inverse problems

Tikhonov developed regularization theory in the 1940s–60s to make inverse problems in mathematical physics — problems where solutions are highly sensitive to noisy input data — numerically stable. His method of adding a penalty term to force smoothness or boundedness in the solution is the direct mathematical ancestor of ridge regression, independently adapted for statistics by Hoerl and Kennard in 1970.

History
1943–1963
Tikhonov formalizes regularization for ill-posed inverse problems in mathematical physics.
1970
Arthur Hoerl and Robert Kennard introduce ridge regression to statistics, addressing multicollinearity in linear models.
1996
Robert Tibshirani introduces the lasso, combining variable selection with shrinkage via the L1 penalty.
2005
Hui Zou and Trevor Hastie propose elastic net, blending L1 and L2 penalties for correlated-feature settings.
2014
Srivastava, Hinton, and colleagues formalize dropout, later analyzed as an implicit regularizer for deep networks.

Ridge regression entered statistics as a fix for a very practical problem: when predictor variables are highly correlated, X⊤XX^\top X becomes nearly singular, and OLS coefficients explode with huge variance even though predictions might be reasonable. Hoerl and Kennard showed that a small ridge penalty could dramatically stabilize the estimates with minimal added bias — the same mathematical trick Tikhonov had used decades earlier for inverse problems in physics, now reframed for statistical estimation. Tibshirani's 1996 lasso paper was motivated by the desire for a method that would do variable selection and shrinkage simultaneously, unlike the then-standard practice of stepwise selection followed by unregularized fitting on the selected subset (a two-stage process known to produce unstable, overconfident models). The elastic net addressed a specific weakness of lasso — its poor behavior with groups of correlated predictors — by convexly combining both penalties. As deep learning rose to prominence, the same underlying principle reappeared in a different vocabulary: dropout, weight decay, label smoothing, and early stopping are all regularization strategies, showing that the idea of penalizing complexity to control variance long outlived its origins in linear inverse problems.

Where this matters

Regularized linear models (ridge, lasso, elastic net) are the default choice in genomics and other high-dimensional, low-sample-size settings — for instance, predicting disease outcomes from thousands of gene expression measurements with only hundreds of patients, where p≫np \gg n makes unregularized regression literally underdetermined. Recommender systems and large-scale linear models in advertising and finance rely on L1 penalties to keep sparse, interpretable, and computationally cheap models at web scale. In deep learning, weight decay (L2-style penalties applied to network weights) is standard in nearly every production training recipe, from image classifiers to large language models, typically combined with dropout and data augmentation as complementary regularizers. Bayesian methods generalize the same idea: a Gaussian prior on weights yields exactly the ridge penalty and a Laplace prior yields exactly the lasso penalty under MAP Estimation, which is why regularization strength is sometimes reframed as a prior belief about parameter magnitude rather than an arbitrary tuning knob. Regularization is also the backbone of automated Model Selection pipelines, where a path of models across λ\lambda values (e.g., the LARS-computed lasso path) replaces manually choosing which features to include.

Ask the tutor: How does the choice between ridge, lasso, and elastic net change when features are highly correlated versus nearly independent?

Does a higher λ always produce a better model?

No. Increasing λ trades bias for variance, and only the decreasing part of that tradeoff improves generalization. Past an optimal λ*, the added bias from over-shrinking coefficients outweighs the variance reduction, and validation error rises again, producing the characteristic U-shaped curve. The correct λ is problem-specific and must be found empirically via cross-validation; there is no universally "safe" large value, since too much regularization causes underfitting just as surely as too little causes overfitting.

Is lasso strictly better than ridge because it performs feature selection?

Not strictly. Lasso is preferable when you believe only a subset of features matters and want an interpretable, sparse model. But with groups of highly correlated features, lasso tends to arbitrarily select one member of the group and zero out the rest, which can be unstable across resamples of the data. Ridge instead shrinks correlated coefficients together, which is often more stable predictively even though it yields a dense, less interpretable model. Elastic net exists specifically to combine lasso's sparsity with ridge's stability under correlation.

How does regularization relate to the bias-variance tradeoff conceptually?

Regularization is the mechanism, and the bias-variance tradeoff is the phenomenon it exploits. Without a penalty, a sufficiently flexible model minimizes bias almost to zero on the training set but often at the cost of very high variance across different training samples. By constraining parameter magnitudes, regularization intentionally reintroduces some bias in exchange for a — hopefully larger — reduction in variance, which is favorable whenever variance was the dominant source of test error, as is typically the case in overfitting regimes.

Why does the ridge penalty use the squared L2 norm rather than the plain L2 norm?

Using the squared norm keeps the penalty differentiable everywhere, including at zero, which permits a clean closed-form solution via calculus (setting the gradient to zero). It also makes the objective a smooth quadratic, guaranteeing a unique global minimizer via strict convexity when λ > 0. The plain (unsquared) L2 norm is not differentiable at the origin and is rarely used in this exact form; when it is used (e.g., group lasso penalties), specialized subgradient or proximal methods are needed instead of a closed form.

Can regularization be applied to models other than linear regression?

Yes, broadly. Logistic regression, support vector machines, and neural networks all commonly include L1 or L2 penalties on their parameters. Decision trees and random forests use different complexity-control mechanisms — pruning, maximum depth, minimum leaf size — that serve an analogous purpose without an explicit additive penalty. The unifying principle is the same regardless of model family: constrain the effective capacity of the hypothesis class relative to what the available data can reliably estimate.

What is the relationship between regularization and Bayesian priors?

Under a Bayesian view, maximizing the posterior p(θ∣data)∝p(data∣θ) p(θ)p(\theta \mid \text{data}) \propto p(\text{data} \mid \theta)\, p(\theta) is equivalent to minimizing the negative log-likelihood plus the negative log-prior. If p(θ)p(\theta) is Gaussian, −log⁡p(θ)-\log p(\theta) is proportional to ∥θ∥22\|\theta\|_2^2, exactly recovering the ridge penalty; if p(θ)p(\theta) is Laplace, −log⁡p(θ)-\log p(\theta) is proportional to ∥θ∥1\|\theta\|_1, recovering lasso. This makes regularized estimation a special case of MAP Estimation, with λ controlling the prior's concentration around zero.

Does regularization help when the model is already simple (e.g., low-degree polynomial on ample data)?

Usually only marginally, and it can even hurt slightly if applied too aggressively. Regularization's benefit scales with how much variance a model exhibits in the first place; a low-capacity model trained on abundant data already has low variance, so there is little variance left to trade away, while the added bias from a large λ has no compensating benefit. Regularization matters most exactly when capacity is high relative to the amount of training data — the classic overfitting regime.

Before this

Where this leads