What is regularisation?

Regularisation is the general name for constraints and techniques added to training to stop a model memorising its training data and help it generalise better to new data.

It is also spelt regularization. Its relation to overfitting is that of solution to problem: overfitting is the model learning noise, while regularisation is the set of methods reducing it. Dropout, weight decay and early stopping are specific methods of this general idea.

Topic
Machine learning, models and training
Also known as
Regularization

How regularisation works

  1. L2 regularisation adds a penalty proportional to the sum of squared weights; weights stay small and the model learns a smoother function.
  2. L1 regularisation penalises the sum of absolute values and drives some weights to exactly zero, performing feature selection.
  3. Dropout randomly switches off neurons in training; early stopping halts training when validation performance starts to fall.
  4. Data-side techniques such as data augmentation and label smoothing also stop the model trusting single examples too much.

In more detail

L1 and L2 penalties and elastic net

L2 regularisation adds the sum of squared weights to the loss and L1 the sum of their absolute values, each multiplied by a coefficient that sets the penalty's strength. Elastic net combines both: it can still zero out irrelevant features while keeping correlated features together rather than arbitrarily dropping one.

Commonly confused terms

TermHow it differs
NormalisationNormalisation (such as standardisation, LayerNorm or BatchNorm) rescales input features or hidden activations into a stable numerical range to aid optimisation, whereas regularisation adds penalties or structural constraints to prevent overfitting.
KL divergence penaltyKL divergence penalty in RLHF and DPO constrains a fine-tuned LLM from drifting too far from the base reference model (preventing reward hacking and collapse), acting as a specialised form of regularisation rather than general weight decay.

Why regularisation matters for on-premises AI

Training data is often limited in in-house projects, so regularisation helps the model stay reliable in production. Its strength is a setting: too little leads to overfitting while too much leads to underfitting, so the level is chosen on validation data. L1 also shows which features matter, which suits credit and risk models needing explainability. In language model fine-tuning a low learning rate, few epochs and LoRA act as implicit regularisation.

ON-PREMISES EXAMPLE

A bank adds L2 regularisation to a credit risk model built on limited history, choosing the penalty strength by cross-validation; the model gives more stable results in the new application period.

Common questions

What is the difference between L1 and L2 regularisation?

L2 shrinks all weights but does not zero them. L1 drives some weights to exactly zero, removing unneeded features from the model.

How strong should regularisation be?

It is chosen on validation data. Raise it if validation lags far behind training; lower it if both are low.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.