Why do practitioners often exclude normalization layers and bias terms from weight decay?

Quick Overview

Explains why training recipes leave biases and BatchNorm or LayerNorm parameters out of weight decay. Tests understanding of what weight decay regularizes, scale invariance in normalized networks, and how to set up optimizer parameter groups.

Why do practitioners often exclude normalization layers and bias terms from weight decay?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Many training recipes apply weight decay to most parameters but put biases and the gain and shift parameters of BatchNorm or LayerNorm in a separate group with no decay. Why do practitioners often exclude normalization layers and bias terms from weight decay? ```hint What decay is for For each parameter type, ask what it controls in the function. Does pulling it toward zero make the function simpler, or does it only move or rescale the outputs? ``` ```hint Scale invariance Consider what happens to a normalization layer's output when the weights feeding into it are multiplied by a constant. ``` ### What a Strong Answer Covers - What weight decay is meant to regularize, and why that argument fits weight matrices - Why biases add little capacity and why zero is a poor target for them - What decaying normalization gains and shifts does to output scale and signal propagation - How scale invariance changes what decay does to weights that feed a normalization layer - How to implement the exclusion with optimizer parameter groups ### Follow-up Questions - With Adam and an L2 penalty in the loss, how does the penalty differ from AdamW's decoupled weight decay, and does that change which parameters you exclude? - Should embedding tables be decayed? What happens to rows for rare tokens? - If every weight matrix in a network feeds a normalization layer, what is weight decay still doing? - How would you check that excluding these parameters helps on your own model?

Overview: Explains why training recipes leave biases and BatchNorm or LayerNorm parameters out of weight decay. Tests understanding of what weight decay regularizes, scale invariance in normalized networks, and how to set up optimizer parameter groups.

General logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Many training recipes apply weight decay to most parameters but put biases and the gain and shift parameters of BatchNorm or LayerNorm in a separate group with no decay. Why do practitioners often exclude normalization layers and bias terms from weight decay?

What a Strong Answer Covers Guidance

  • What weight decay is meant to regularize, and why that argument fits weight matrices
  • Why biases add little capacity and why zero is a poor target for them
  • What decaying normalization gains and shifts does to output scale and signal propagation
  • How scale invariance changes what decay does to weights that feed a normalization layer
  • How to implement the exclusion with optimizer parameter groups

Follow-up Questions Guidance

  • With Adam and an L2 penalty in the loss, how does the penalty differ from AdamW's decoupled weight decay, and does that change which parameters you exclude?
  • Should embedding tables be decayed? What happens to rows for rare tokens?
  • If every weight matrix in a network feeds a normalization layer, what is weight decay still doing?
  • How would you check that excluding these parameters helps on your own model?