BatchNorm vs LayerNorm, Calibration and Class Imbalance in a Safety Classifier
Problem statement
How would you make a harmful-post classifier reliable for human review? Harmful posts are rare, training uses small batches of padded text, and serving scores posts individually. Batch-based normalization behaves differently during training and serving, while positive examples are heavily weighted even though the output is used as a probability.
Explain normalization, probability calibration and the review decision.
Show hint
For each normalization layer, ask which axis the mean and variance are taken over, and what happens to those statistics when there is only one example.
Relevant roles: ML Engineer, Applied Scientist and Data Scientist.