L1 regularization discourages overfitting by adding a cost proportional to each weight’s absolute value. It favors models whose weight distribution is more regular and can encourage sparse weights. section 5.4.4
Adding L1 regularization in Keras
Keras exposes L1 weight regularization through a layer’s regularizer argument, for example regularizers.l1(0.001). The same API also supports combining L1 and L2 penalties with l1_l2.
Use L1 regularization as a practical option when:
- A small deep learning model is overfitting and needs an additional constraint on its weights. section 5.4.4
- You are iterating on architectures and hyperparameters using validation performance, while avoiding repeated overfitting to the validation process. section 6.2.5





