Regularization
Regularization is any deliberate change to a learning problem or training algorithm intended to improve performance on data that were not used to fit the model. It is often introduced as a way to reduce overfitting, but the concept is broader than adding a penalty or making a model smaller. Constraints on parameters, data augmentation, early stopping, noise during training, and properties of an optimization algorithm can all regularize an estimator. A method can also improve generalization without increasing its training error in every run, so the effect must be evaluated rather than assumed.[1]
For an empirical loss , a common explicit formulation is
where is a penalty and controls its contribution. A related constrained problem minimizes subject to . Under suitable convexity and regularity conditions, particular values of and can produce the same solutions, but this correspondence need not be unique or hold without those conditions.[1][2] The numerical value of is not portable across every formula or software implementation: averaging rather than summing the loss, inserting factors such as , rescaling predictors, and excluding an intercept all change its interpretation.
Explicit penalties
Ridge, lasso, and elastic net
For centered linear regression with design matrix , response vector , and coefficient vector , three common objectives are:
| Method | One common objective | Main structural effect |
|---|---|---|
| Ridge | Shrinks coefficients continuously | |
| Lasso | Can set coefficients exactly to zero | |
| Elastic net | Combines sparsity with squared-norm shrinkage |
These equations state one normalization convention. Equivalent-looking definitions in other texts and programs may attach different factors to the loss or penalties.
Ridge regularization adds a squared Euclidean-norm penalty. With the convention above, its solution is
when that inverse exists and the intercept has been handled separately. Hoerl and Kennard developed ridge regression for nonorthogonal predictor systems and showed how a biased estimator can have lower mean-squared error than ordinary least squares in some settings.[3] Ridge usually retains every coefficient rather than performing discrete variable selection. Because its penalty depends on units, predictors should normally be put on a defensible common scale before fitting. An intercept is commonly left unpenalized.
L1 regularization, called the lasso in its regression form, uses the absolute-value penalty. Tibshirani defined the original estimator through a bound on the sum of absolute coefficients and noted that the constraint can produce coefficients equal to zero.[4] This makes lasso useful for sparse estimation, but a zero coefficient is not proof that a variable has no causal or scientific relevance. Selection can change with the sample, penalty strength, coding, or scaling. Strongly correlated predictors can also lead the lasso to select one representative while omitting another with similar predictive information.[5]
Elastic net adds both L1 and L2 components. In the parameterization above, gives lasso and gives ridge. Zou and Hastie introduced the method partly to address limitations of lasso when predictors are numerous or highly correlated; their analysis describes a grouping effect under stated conditions.[5] It does not guarantee that every correlated group will be selected together or that elastic net will outperform ridge or lasso on every dataset.
Structured penalties
A penalty can encode structure other than overall coefficient magnitude. The group lasso applies an L2 norm within each predefined group and sums those group norms, allowing whole groups of coefficients to enter or leave a model together.[6] Other examples penalize differences between neighboring coefficients, matrix rank through the nuclear norm, or roughness through derivatives of a fitted function. These methods are useful only when the encoded grouping, ordering, low-rank assumption, or smoothness is appropriate to the problem.
The scale of a penalty also depends on the parameterization. Rescaling one input column changes the coefficient needed to represent the same prediction and therefore changes an unadjusted L1 or L2 penalty. Dummy-variable coding, basis choice, and whether biases or normalization parameters are penalized can likewise change the effective model preference. A reported value of is meaningful only together with these choices.
Bayesian interpretation
For a likelihood and prior , maximum a posteriori estimation minimizes
The negative log-prior therefore acts like a penalty. An independent zero-centered Gaussian prior produces a squared-norm term, while an independent zero-centered Laplace prior produces an absolute-value term. The precise relationship between a prior scale and also depends on the likelihood, observation-noise scale, and whether the data loss is a sum or an average.[1]
This correspondence has important limits. A continuous Laplace distribution assigns probability zero to every exact point, including zero. Exact zeros in a lasso solution arise from the nonsmooth optimization geometry of the L1 penalty, not because the continuous prior assigns positive point probability to zero. A spike-and-slab prior, by contrast, includes a discrete component at zero.
MAP estimation returns a posterior mode; it does not integrate predictions or uncertainty over the full posterior. Placing a prior on a regularization parameter is a hierarchical Bayesian construction. Estimating that parameter by maximizing a marginal likelihood is commonly called empirical Bayes. These are related approaches, but they are not interchangeable with cross-validation or with full posterior inference.
Algorithmic and data-based regularization
Not every regularizer appears as an added term in the objective. The stopping rule, injected randomness, training data construction, architecture, and optimizer can all change which solution is reached.
Early stopping
Early stopping selects a checkpoint before an iterative optimizer has fully minimized the training objective. A typical procedure monitors a validation metric, retains the best checkpoint, and stops after a prespecified lack of improvement. The validation set is then part of model selection and cannot also serve as an untouched final test set.
Early stopping has a formal interpretation as iterative regularization in some settings. For example, results for convex losses in reproducing-kernel Hilbert spaces establish generalization through a stopping time without an explicit penalty.[7] Such results do not make early stopping universally equivalent to ridge regression. The relationship depends on the model, loss, initialization, step sizes, optimization dynamics, and stopping rule.
Dropout
Dropout samples a binary mask during training and temporarily removes selected units and their connections. The original formulation interprets training as sharing parameters across many thinned networks and uses a deterministic approximation to their combined prediction at test time.[8]
Two algebraically equivalent scaling conventions exist. In the original presentation, retained activations are unscaled during training and outgoing weights are multiplied by the retention probability at test time. In inverted dropout, retained activations are divided by the retention probability during training, so no corresponding scale change is needed for ordinary inference. Mixing the two conventions produces incorrect activation magnitudes. Dropout rates are hyperparameters, and benefits observed in one architecture or data regime do not establish a universal default.
Data augmentation and noise
Data augmentation changes the training distribution by generating transformed examples. Its regularizing effect comes from encoding an invariance or other prior about the task. A horizontal flip may preserve an image label in one application and reverse the meaning in another; a word substitution can alter sentiment or factual content. Transformations and mixed examples therefore require task-specific validity checks rather than being assumed to preserve labels.[1]
Noise can be applied to inputs, hidden activations, targets, gradients, or parameters. Bishop showed that, for small zero-mean input noise and a sum-of-squares error, training with noise admits a regularized approximation; the resulting positive-definite term is a generalized Tikhonov regularizer involving derivatives of the network mapping.[9] This result does not imply that arbitrary noise injection is identical to ordinary L2 weight decay. The location and distribution of the noise, its amplitude, the loss, and the model determine the effect.
Neural-network parameter controls
L2 penalties and weight decay
An L2 penalty contributes a gradient proportional to the parameter. Under plain gradient descent with learning rate , an objective term yields
This explains the equivalence between L2 regularization and a properly parameterized multiplicative weight decay for ordinary stochastic gradient descent. The formula depends on whether names the objective coefficient or a per-step decay rate.
For adaptive preconditioned optimizers, adding to the loss gradient generally does not produce the same update as decaying the parameter separately. Loshchilov and Hutter formalized this distinction and proposed decoupled weight decay, including AdamW.[10] Decoupling does not remove the need to tune the learning-rate and decay schedules, and excluding selected parameters from decay is an implementation choice rather than a mathematical requirement shared by all models.
Label smoothing
For -class classification with one-hot target , label smoothing replaces it with a mixture such as
where is often the uniform distribution. Szegedy and colleagues introduced this form as a classifier regularizer in their Inception study.[11] It limits the target assigned to the observed class, but phrases such as "prevents overconfidence" should not be read as a guarantee of calibrated probabilities on every dataset.
Müller, Kornblith, and Hinton found improved generalization and calibration in their studied tasks, but also found that a label-smoothed teacher was less effective for knowledge distillation because smoothing changed the information represented in its logits.[12] Label smoothing can therefore alter learned representations and downstream uses, not merely reduce a scalar confidence score.
Spectral normalization
For a nonzero weight matrix , spectral normalization replaces it with , where is its largest singular value. Miyato and colleagues proposed the method to stabilize a generative adversarial network discriminator, estimating the spectral norm with power iteration.[13] A coefficient can also set the normalized operator norm to a value other than one.
Controlling individual matrix norms can contribute to a bound on a network's Lipschitz constant, but the bound is the product of relevant layer and activation constants. It also depends on how convolutions, residual paths, attention, biases, and other operations are represented. Spectral normalization of selected weights therefore does not by itself prove that an entire model is exactly 1-Lipschitz or robust to every perturbation.
Normalization layers
Batch normalization uses mini-batch statistics during training and stored statistics during ordinary inference. Its original paper presented it primarily as a way to accelerate and stabilize optimization, attributed the mechanism to reduced internal covariate shift, and reported a regularizing effect in its experiments.[14] Later experiments by Santurkar and colleagues challenged internal covariate shift as the main explanation and instead linked the observed optimization benefit to smoother loss behavior.[15]
Batch normalization can introduce stochasticity through mini-batch statistics, but it is not equivalent to a fixed penalty and should not be promised to regularize every architecture. Its behavior depends on batch construction, batch size, training and inference modes, and the surrounding network. Normalization and regularization are best treated as distinct concepts even when a normalization method changes generalization.
Choosing and evaluating regularization
Regularization strength is a model-selection hyperparameter. A defensible evaluation separates parameter fitting, hyperparameter selection, and final performance estimation:
- Fit each candidate only on its training partition.
- Estimate preprocessing parameters, feature selection, augmentation policy, and any other learned transformations inside that partition.
- Choose regularization settings from validation data or inner cross-validation.
- Estimate final performance on data that were not used to choose the setting.
If the same cross-validation results are repeatedly used to search a large space and then reported as the performance estimate, the selection criterion itself can be overfit. Cawley and Talbot showed that this selection bias can be comparable to reported differences between learning algorithms.[16] Nested cross-validation or a separate final test set can separate selection from evaluation. Grouped, temporal, or spatial data need split rules that respect their dependence structure.
Candidate values are often explored on a logarithmic scale because useful strengths can span orders of magnitude, but there is no universal range. The relevant range changes with loss normalization, dataset size, feature scale, optimizer, batch schedule, and parameterization. The best setting for one metric may not be best for calibration, sparsity, robustness, or subgroup performance. All hyperparameters that materially affect the result should be selected within the same evaluation boundary.
Regularization paths can help show how coefficients or validation scores change with strength. They do not make the selected model immune to sampling variability. For sparse models, stability across resamples and domain plausibility should be examined before interpreting selected variables. For neural networks, comparisons should keep training budget and tuning effort explicit because an early-stopped or heavily regularized model may otherwise receive a different optimization budget.
Effects and limitations
Regularization is often explained through a bias-variance tradeoff: accepting some bias can reduce variability across possible training samples and lower expected prediction error.[1][2] This is a useful account for squared-error estimation, not a law that bias must rise monotonically, variance must fall monotonically, or test error must trace a single U-shaped curve as increases. Those properties depend on the estimator, data distribution, loss, and path through parameter space.
Increasing a penalty can eventually cause underfitting, while a weak penalty can be ineffective. A regularizer can also encode the wrong preference. Sparsity is harmful when many small effects matter; smoothness is harmful at real discontinuities; invariance-based augmentation is harmful when the transformation changes the target; and excessive weight shrinkage can impair optimization as well as representation capacity.
Regularization does not repair data leakage, mislabeled data, an unsuitable objective, distribution shift, confounding, or an invalid evaluation design. It does not turn predictive variable selection into causal discovery, nor does it guarantee calibrated probabilities, adversarial robustness, fairness, privacy, or interpretability. Those properties require their own assumptions, measurements, and controls.
See also
References
- ^Ian Goodfellow, Yoshua Bengio, and Aaron Courville, "Chapter 7: Regularization for Deep Learning," in *Deep Learning*, MIT Press, 2016. deeplearningbook.org/...regularization
- ^Trevor Hastie, Robert Tibshirani, and Jerome Friedman, *The Elements of Statistical Learning: Data Mining, Inference, and Prediction*, second edition, Springer, 2009, corrected 12th printing, 2017. hastie.su.domains/...main
- ^Arthur E. Hoerl and Robert W. Kennard, "Ridge Regression: Biased Estimation for Nonorthogonal Problems," *Technometrics* 12, no. 1, 1970, pp. 55-67. stat.cmu.edu/...v1201055.pdf
- ^Robert Tibshirani, "Regression Shrinkage and Selection via the Lasso," *Journal of the Royal Statistical Society: Series B* 58, no. 1, 1996, pp. 267-288. sites.stat.washington.edu/...al_stat_soc_b1996.pdf
- ^Hui Zou and Trevor Hastie, "Regularization and Variable Selection via the Elastic Net," *Journal of the Royal Statistical Society: Series B* 67, no. 2, 2005, pp. 301-320. web.stanford.edu/...elasticnet.pdf
- ^Ming Yuan and Yi Lin, "Model Selection and Estimation in Regression with Grouped Variables," *Journal of the Royal Statistical Society: Series B* 68, no. 1, 2006, pp. 49-67. columbia.edu/...glasso.final.pdf
- ^Junhong Lin, Lorenzo Rosasco, and Ding-Xuan Zhou, "Iterative Regularization for Learning with Convex Loss Functions," *Journal of Machine Learning Research* 17, no. 77, 2016, pp. 1-38. jmlr.org/...15-115
- ^Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov, "Dropout: A Simple Way to Prevent Neural Networks from Overfitting," *Journal of Machine Learning Research* 15, 2014, pp. 1929-1958. jmlr.org/...srivastava14a
- ^Christopher M. Bishop, "Training with Noise is Equivalent to Tikhonov Regularization," *Neural Computation* 7, no. 1, 1995, pp. 108-116. microsoft.com/...valent-to-tikhonov-regularization
- ^Ilya Loshchilov and Frank Hutter, "Decoupled Weight Decay Regularization," *International Conference on Learning Representations*, 2019. arxiv.org/...1711.05101
- ^Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna, "Rethinking the Inception Architecture for Computer Vision," *Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition*, 2016, pp. 2818-2826. openaccess.thecvf.com/...Inception_CVPR_2016_paper
- ^Rafael Müller, Simon Kornblith, and Geoffrey E. Hinton, "When Does Label Smoothing Help?," *Advances in Neural Information Processing Systems* 32, 2019. proceedings.neurips.cc/...71450117eba2725-Abstract
- ^Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida, "Spectral Normalization for Generative Adversarial Networks," *International Conference on Learning Representations*, 2018. arxiv.org/...1802.05957
- ^Sergey Ioffe and Christian Szegedy, "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift," *Proceedings of the 32nd International Conference on Machine Learning*, 2015, pp. 448-456. proceedings.mlr.press/...ioffe15
- ^Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry, "How Does Batch Normalization Help Optimization?," *Advances in Neural Information Processing Systems* 31, 2018. proceedings.neurips.cc/...560467e0a99e1cf-Abstract
- ^Gavin C. Cawley and Nicola L. C. Talbot, "On Over-fitting in Model Selection and Subsequent Selection Bias in Performance Evaluation," *Journal of Machine Learning Research* 11, 2010, pp. 2079-2107. jmlr.org/...cawley10a
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation. Every suggestion is reviewed for sourcing before it goes live.
10 revisions · v11 · 2,708 words · full history
Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify
Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here
Reviewer note: Independent fact-check completed against 16 primary, academic, and established technical sources; all 22 citation calls, 16 reference entries, 14 canonical internal links, 16 source groups, and 22 claim-bearing academic-PDF renders were separately reviewed. Penalty scaling, ridge, lasso, elastic net, Bayesian interpretations, early stopping, dropout, input noise, weight decay, label smoothing, spectral normalization, BatchNorm, model selection, and limitation claims were confirmed; the evidence cutoff was normalized to July 28, 2026 and valid Wikidata Q2061913 was preserved.
Cite this page: AI Wiki. "Regularization." aiwiki.ai, updated 29 Jul 2026, fact-checked 29 Jul 2026. CC BY 4.0. https://aiwiki.ai/wiki/regularization