Norm-based regularization

Machine Learning


Regularization is a collection of strategies that enable a learning algorithm to generalize better on new inputs, often times at the expense of reduced performance on the training set. In this sense, it is a strategy to reduce the possibility of overfitting the training data, and possibly reduce variance of the model by increasing some bias.

Some model families such as decision trees utilize regularization strategies that are specifically designed for their structure. Deep neural networks offer many alternative regularization strategies that we have explained in a comprehensive article focused on regularization in deep learning. Others, especially parametric models with weight vectors, may be regularized using norm-penalties on the weight vectors. In this article, we will cover these regularization strategies.


To understand norm-based regularization, we recommend familiarity with the concepts in

Follow the above links to first get acquainted with the corresponding concepts.

Problem setting

In classification, the goal of the predictive model is to identify the class that generated a particular instance.

Consider such an instance \( \vx \in \real^N \), a vector consisting of \( N \) features, \(\vx = [x_1, x_2, \ldots, x_N] \).

We need to assign it to one of the \( M \) classes \( C_1, C_2, \ldots, C_M \) depending on the values of the \( N \) features .

Norm penalties

Several parametric machine learning models, such as logistic regression, support vector machines, least-squares regression, or deep neural networks, utilize weight parameters that are learned during the training phase.

One method of regularizing such parametric machine learning models is to constrain the parameter values. This can be achieved, for example, by applying a suitable norm as a penalty on the parameters or weights of the model. If \( \loss \) denotes the unregularized loss of the model, then we incorporate the regularization term \( \Omega(\vw) \) on the parameter \( \vw \) of the model, where \( \vw \in \real^\ndim \), so that \( \vw = [w_1,\ldots,w_\ndim] \).

$$ \loss_{\text{regularized}} = \loss + \alpha \Omega(\vw) $$

where, \( \alpha \in \real \) is a hyperparameter that controls the impact of the regularization term.

The overall norm penalty is a sum over the \( p\)-norms of the parameters of the model.

$$ \Omega(\vw) = \norm{\vw}{p} $$

The \( p-\) norm is defined as

$$ \norm{\vw}{p} = \left[ \sum_{i=1}^\ndim |w_i|^p \right]^{\frac{1}{p}} $$

\( L_2 \)-norm

A popular form of penalty on the weights is the \( L_2 \) norm, also known as weight decay in neural networks, which is applied on each weight parameter in the network.

where, the \( L_2 \) norm is defined as

$$ \norm{\vw}{2} = \sqrt{\sum_{i=1}^\ndim w_i^2} $$

Turns out, the \(L_2\)-norm is just the square root of the inner product of the vector. This means, \( \norm{\vw}{2} = \sqrt{\vw^T\vw} \).

The \( L_2 \) norm is also denoted as \( L^2 \)-norm, \( \ell^2 \)-norm. It is also known as the square norm, Euclidean norm, or \( 2\)-norm.

The Euclidean norm has the effect of constraining all the elements of the parameter vector to be close to zero.

\( L_1 \)-norm

As an alternative, the \(L_1\)-norm is also popular as a norm-based regularization strategy.

where, the \( L_1 \) norm is defined as the sum of absolute values of the elements of the parameter vector.

$$ \norm{\vw}{1} = \sum_{i=1}^\ndim |w_i| $$

Compared to the \(L_2\) regularization, the \(L_1\) regularization enforces sparsity in the parameter vector. This means, \(L_1\)-regularization results in parameter vectors with few non-zero terms. Thus, this approach to regularization has some inherent feature-selection capability because weights interacting with irrelevant features are automatically forced to be zero.


A recently popularized alternative is that of max-norm, also known as \(L_\infty\)-norm.

$$ \norm{\vw}{\infty} = \underset{i=1,\ldots,\ndim}{\max} |w_i| $$

It can be observed that the max-norm is equivalent to penalizing the parameter element with the maximum value.

Please support us

Help us create more engaging and effective content and keep it free of paywalls and advertisements!

Let's connect

Please share your comments, questions, encouragement, and feedback.