How should the regularization strength scale as the number of training samples grows?

Last updated 3 November 2026

  • More data needs less regularization because the data constrains parameters better. How λ should change depends on whether the loss is a sum or a mean.

  • Sum-of-losses: a constant λ already fades relative to the growing data term (like a fixed Bayesian prior). Mean loss: λ should shrink with n (lasso theory: σ·sqrt(log p / n)).

  • Libraries use different conventions, so re-tune λ with CV when dataset size changes substantially.

  • https://scikit-learn.org/stable/auto_examples/svm/plot_svm_scale_c.html
  • https://scikit-learn.org/1.2/auto_examples/svm/plot_svm_scale_c.html
  • https://zero-to-ai.dev/02-data-science/5-scikit-learn/svm/plot_svm_scale_c
All Regularization interview questions