Why does pre-norm train more stably than post-norm in deep transformers?

Last updated 22 November 2026

  • Pre-norm (x + F(LN(x))) keeps the residual path a pure identity, so gradients flow cleanly through any depth and training often needs little warmup.

  • Post-norm (LN(x + F(x))) puts LayerNorm on the residual path, distorting gradients layer after layer. At initialization gradients near the output are large, so it needs warmup and often diverges when deep.

  • Trade-off: pre-norm's residual stream grows with depth so later layers contribute less, while successful post-norm can reach slightly better quality. Hybrids like DeepNorm aim for both.

  • https://theorempath.com/compare/pre-norm-vs-post-norm
  • https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/interviews/questions/transformers/pre-norm-vs-post-norm.md
  • https://aiengineeringfromscratch.com/interviews/transformers/pre-norm-vs-post-norm
All Transformers interview questions