liveBook · Manning

L1 regularization

As explained in Deep Learning with PyTorch, Second Edition

A regularization method that adds the sum of absolute weight values to the objective, encouraging sparse parameters.

L1 regularization combats overfitting by adding the sum of the absolute values of a model’s weights to the loss. A small hyperparameter controls the penalty, encouraging weights to become sparse. section 8.5.2

Use L1 regularization to:

  • Discourage individual weights from growing large while fitting training samples. section 8.5.2
  • Prefer models with many zero or near-zero parameters because the absolute-value penalty produces sparse trained weights. section 8.5.2
  • Compare it with L2 regularization, which penalizes the sum of squared weights instead. section 8.5.2

How Deep Learning with PyTorch, Second Edition covers it

How deep it goes
Defines the penalty and its sparse-weight effect, but does not provide an L1 implementation or optimization derivation.
What it assumes
Assumes familiarity with model weights, loss, training, and overfitting while introducing regularization penalties directly.
What you can do after
Evaluate L1 regularization as a sparse-weight alternative to L2 regularization for controlling overfitting.
How it connects
Connects regularization with overfitting, L2 regularization, weight penalties, and Lasso.

Also explained in

Compare how 6 books explain L1 regularization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with PyTorch, Second Edition. The section links point to the parts of the book it draws on.