跳到主要内容Skip to main content

层归一化Layer Normalization

Layer Normalization

  • 核心概念Core concepts
  • 第四站 · 看懂Station 4 · Under the Hood
解决什么问题What problem it solves

给网络每一层的输出做一次「调平」,让深层训练不失控。Levels out each layer's output so deep training doesn't spiral out of control.

这是什么What it is

对单个样本在某一层里的全部数值做归一化(拉回统一的均值和方差),再往下传。

Transformer 的每个子层后面都跟着它,和残差连接搭配使用。

Normalizes all values of a single sample within one layer (back to a common mean and variance) before passing them on.

In Transformers it follows every sub-layer, paired with residual connections.

为什么需要知道Why it matters

深层网络里数值容易越传越偏,一旦失控训练就崩。调平是「模型能稳定训到几十层」的幕后功臣之一。Values in deep networks drift as they propagate; once they spiral, training collapses. Leveling is one of the behind-the-scenes reasons models train stably at dozens of layers.

出处Sources
  • Layer Normalization(论文)Layer Normalization (paper) ↗
  • Attention Is All You Need(论文 §3.1)Attention Is All You Need §3.1 (paper) ↗