Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Understanding and Improving Layer Normalization

About

Layer normalization (LayerNorm) is a technique to normalize the distributions of intermediate layers. It enables smoother gradients, faster training, and better generalization accuracy. However, it is still unclear where the effectiveness stems from. In this paper, our main contribution is to take a step further in understanding LayerNorm. Many of previous studies believe that the success of LayerNorm comes from forward normalization. Unlike them, we find that the derivatives of the mean and variance are more important than forward normalization by re-centering and re-scaling backward gradients. Furthermore, we find that the parameters of LayerNorm, including the bias and gain, increase the risk of over-fitting and do not work in most cases. Experiments show that a simple version of LayerNorm (LayerNorm-simple) without the bias and gain outperforms LayerNorm on four datasets. It obtains the state-of-the-art performance on En-Vi machine translation. To address the over-fitting problem, we propose a new normalization method, Adaptive Normalization (AdaNorm), by replacing the bias and gain with a new transformation function. Experiments show that AdaNorm demonstrates better results than LayerNorm on seven out of eight datasets.

Jingjing Xu, Xu Sun, Zhiyuan Zhang, Guangxiang Zhao, Junyang Lin• 2019

Related benchmarks

TaskDatasetResultRank
Image ClassificationMNIST
Accuracy99.35
395
Language ModelEnwiki8
BPC1.07
23
ClassificationRT
Accuracy0.775
4
ClassificationSST5
Accuracy40.54
4
Machine TranslationDe-En (val)
BLEU35.6
4
Machine TranslationEn-Vi (val)
BLEU Score0.316
4
ParsingPTB
UAC89.23
4
Machine TranslationEn-De (val)
BLEU28.5
3
Showing 8 of 8 rows

Other info

Code

Follow for update