Layer Normalization
Paper · 2016 · Jimmy Lei Ba, Jamie Ryan Kiros and Geoffrey E. Hinton
Summary
Batch normalization speeds up training of deep networks, but it estimates its statistics from the mini-batch. As a result it behaves differently at training and test time, suffers when batches are tiny, and fits awkwardly into recurrent networks whose sequence lengths vary. Ba, Kiros and Hinton propose layer normalization. For each individual training case, the mean and standard deviation are computed over all summed inputs to the hidden units of one layer. Every unit then applies its own learned gain and bias before the non-linearity. In an RNN the statistics are recomputed at every time step, while a single gain/bias set is shared across steps. The authors compare which weight and data transformations batch, weight and layer normalization are invariant to. They test the method on recurrent models, including DRAW on binarized MNIST and handwriting generation on IAM-OnDB, and on feed-forward MNIST. Layer normalization converges faster, especially with long sequences and small mini-batches, and it is insensitive to batch size. On convolutional networks, however, batch normalization remains better. The approach removes dependencies between training cases, so normalization becomes usable in online learning (batch size 1) and in recurrent models.
Key points
- Statistics are shared by all hidden units of a layer but differ per training case. Computation at training and test time is identical, and no running averages are needed.
- Invariance analysis (Table 1): layer norm is invariant to re-scaling and re-centering the whole weight matrix and to re-scaling a single training case. It is not invariant to re-scaling an individual weight vector, unlike batch and weight norm.
- DRAW (64 glimpses, 256 LSTM hidden units, mini-batch 128) converged almost twice as fast with layer norm. After 200 epochs the test bound was 82.09 nats versus 82.36 nats for the baseline.
- IAM-OnDB handwriting generation (221 writers, 12,179 line sequences, average length around 700; three layers of 400 LSTM cells; mini-batch 8): the method reached a comparable log likelihood but much faster.
- Permutation invariant MNIST (784-1000-1000-10, 55,000 training points, batch sizes 128 and 4): layer norm stayed robust to batch size and trained faster than batch norm. It was not applied to the final softmax layer.
Interesting ideas
- I1. Compute normalization statistics from the single example itself rather than from its neighbours in the batch, so a model's behaviour never depends on what else it is processed with.
- I2. For variable-length sequences, recompute statistics at each step while sharing one set of gain/bias parameters, so test inputs longer than any training input cause no trouble.
- I3. Leave the output logits unnormalized, because their scale is what carries the model's confidence.
- I4. Build a table of which transformations of weights and data each method ignores, turning design choices into checkable properties instead of anecdotes.
- I5. Report honestly where the method does not help (ConvNets, where hidden units near image borders have very different statistics) and explain why the core assumption breaks.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tree): gparse could normalize per sentence so that one-sentence inference produces exactly the same tree as batched training-time evaluation, which keeps parses reproducible and explainable.
- I2 (tree): long or unusual sentences in gparse would not hit missing per-position statistics, which reduces failures on texts longer than those in the treebanks.
- I3 (learn): when witness parsers vote on silver data, keeping raw logit scale intact lets their confidences be compared and thresholded meaningfully.
- I4 (learn): an analogous invariance checklist could be used as tests, e.g. verifying that the parser's output does not change under batch composition or harmless input rescaling.
- I5 (learn): evaluations with negative controls should likewise name the settings where a repair rule or training trick fails, together with the violated assumption.
Fields, topics and concepts
Shelves 3The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksComputer Vision and Pattern Recognition · 3,621 works
Cite
Cite as Jimmy Lei Ba, Jamie Ryan Kiros and Geoffrey E. Hinton. 2016. Layer Normalization. arXiv:1607.06450.
@misc{ba2016layer,
title = {{Layer Normalization}},
author = {Jimmy Lei Ba, Jamie Ryan Kiros and Geoffrey E. Hinton},
year = {2016},
doi = {10.48550/arxiv.1607.06450},
eprint = {1607.06450},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1607.06450}
}References
- Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. our card
- Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE, 2012. OpenAlex ↗ · Scholar ↗
- Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, Quoc V Le, et al. Large scale distributed deep networks. In NIPS, 2012. OpenAlex ↗ · Scholar ↗
- Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. ICML, 2015. OpenAlex ↗ · Scholar ↗
- Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. our card
- César Laurent, Gabriel Pereyra, Philémon Brakel, Ying Zhang, and Yoshua Bengio. Batch normalized recurrent neural networks. arXiv preprint arXiv:1510.01378, 2015. OpenAlex ↗ · Scholar ↗
- Dario Amodei, Rishita Anubhai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Jingdong Chen, Mike Chrzanowski, Adam Coates, Greg Diamos, et al. Deep speech 2: End-to-end speech recognition in english and mandarin. arXiv preprint arXiv:1512.02595, 2015. our card
- Tim Cooijmans, Nicolas Ballas, César Laurent, and Aaron Courville. Recurrent batch normalization. arXiv preprint arXiv:1603.09025, 2016. OpenAlex ↗ · Scholar ↗
- Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. arXiv preprint arXiv:1602.07868, 2016. our card
- Behnam Neyshabur, Ruslan R Salakhutdinov, and Nati Srebro. Path-sgd: Path-normalized optimization in deep neural networks. In Advances in Neural Information Processing Systems, pages 2413–2421, 2015. OpenAlex ↗ · Scholar ↗
- Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural computation, 1998. OpenAlex ↗ · Scholar ↗
- Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. ICLR, 2016. our card
- The Theano Development Team, Rami Al-Rfou, Guillaume Alain, Amjad Almahairi, Christof Angermueller, Dzmitry Bahdanau, Nicolas Ballas, Frédéric Bastien, Justin Bayer, Anatoly Belikov, et al. Theano: A python framework for fast computation of mathematical expressions. arXiv preprint arXiv:1605.02688, 2016. our card
- Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. ECCV, 2014. our card
- Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. EMNLP, 2014. our card
- Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015. our card
- Ryan Kiros, Ruslan Salakhutdinov, and Richard S Zemel. Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539, 2014. our card
- D. Kingma and J. L. Ba. Adam: a method for stochastic optimization. ICLR, 2014. arXiv:1412.6980. our card
- Liwei Wang, Yin Li, and Svetlana Lazebnik. Learning deep structure-preserving image-text embeddings. CVPR, 2016. OpenAlex ↗ · Scholar ↗
- Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, 2015. our card
- Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In NIPS, 2015. OpenAlex ↗ · Scholar ↗
- Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013. our card
- Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In ICCV, 2015. our card
- Marco Marelli, Luisa Bentivogli, Marco Baroni, Raffaella Bernardi, Stefano Menini, and Roberto Zamparelli. Semeval-2014 task 1: Evaluation of compositional distributional semantic models on full sentences through semantic relatedness and textual entailment. SemEval-2014, 2014. our card
- Bo Pang and Lillian Lee. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In ACL, pages 115–124, 2005. our card
- Minqing Hu and Bing Liu. Mining and summarizing customer reviews. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, 2004. OpenAlex ↗ · Scholar ↗
- Bo Pang and Lillian Lee. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. In ACL, 2004. our card
- Janyce Wiebe, Theresa Wilson, and Claire Cardie. Annotating expressions of opinions and emotions in language. Language resources and evaluation, 2005. OpenAlex ↗ · Scholar ↗
- K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. DRAW: a recurrent neural network for image generation. arXiv:1502.04623, 2015. our card
- Hugo Larochelle and Iain Murray. The neural autoregressive distribution estimator. In AISTATS, volume 6, page 622, 2011. OpenAlex ↗ · Scholar ↗
- Marcus Liwicki and Horst Bunke. Iam-ondb-an on-line english sentence database acquired from handwritten text on a whiteboard. In ICDAR, 2005. OpenAlex ↗ · Scholar ↗
- Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. our card
This page in Markdown https://md.research.elamur.ai/free/en/papers/ba-2016-layer-normalization/