paper-with-me

Papers

On Layer Normalization in the Transformer Architecture

2020-02-12 · ICML 2020 1 · Ruibin Xiong, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Li-Wei Wang, Tie-Yan Liu

The Transformer is widely used in natural language processing tasks. To train a Transformer however, one usually needs a carefully designed learning rate warm-up stage, which is shown to be crucial to the final performance but will slow down the optimization and bring more hyper-parameter tunings. In this paper, we first study theoretically why the learning rate warm-up stage is essential and show that the location of layer normalization matters. Specifically, we prove with mean field theory that at initialization, for the original-designed Post-LN Transformer, which places the layer normalization between the residual blocks, the expected gradients of the parameters near the output layer are large. Therefore, using a large learning rate on those gradients makes the training unstable. The warm-up stage is practically helpful for avoiding this problem. On the other hand, our theory also shows that if the layer normalization is put inside the residual blocks (recently proposed as Pre-LN Transformer), the gradients are well-behaved at initialization. This motivates us to remove the warm-up stage for the training of Pre-LN Transformers. We show in our experiments that Pre-LN Transformers without the warm-up stage can reach comparable results with baselines while requiring significantly less training time and hyper-parameter tuning on a wide range of applications.

📄 PDF Abstract BibTeX arXiv:2002.04745

Code (9)

airi-institute/gena_lm pytorch
blues-lin/fin-analyze tf
colorfulscoop/tfdlg tf
davidsvy/cosformer-pytorch pytorch
facebookresearch/xformers pytorch
noriyukipy/tfchat tf
noriyukipy/tfdlg tf
yangyucheng000/University/tree/main/model-3/roberta_prelayernorm mindspore
yotaro-shimose/AttentionSolvesYourTSP tf

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
Residual Connection 설명 없음
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
ReLU How Do I Communicate to Expedia? How Do I Communicate to Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Live Support & Special Travel…

Similar Papers 제목 키워드 기반

Leveraging Batch Normalization for Vision Transformers

2021-01-01 · ICCVW 2021 1 · Zhuliang Yao, Yue Cao, Yutong Lin, Ze Liu 외

Transformer-based vision architectures have attracted great attention because of the strong performance over the convolutional neural networks (CNNs). Inherited from the NLP tasks, the architectures take Layer Normalizat…

Pre-RMSNorm and Pre-CRMSNorm Transformers: Equivalent and Efficient Pre-LN Transformers

2023-05-24 · NeurIPS 2023 11 · Zixuan Jiang, Jiaqi Gu, Hanqing Zhu, David Z. Pan

Transformers have achieved great success in machine learning applications. Normalization techniques, such as Layer Normalization (LayerNorm, LN) and Root Mean Square Normalization (RMSNorm), play a critical role in accel…

GeoNorm: Unify Pre-Norm and Post-Norm with Geodesic Optimization

2026-01-29 · Chuanyang Zheng, Jiankai Sun, Yihang Gao, Chi Wang 외 arxiv

The placement of normalization layers, specifically Pre-Norm and Post-Norm, remains an open question in Transformer architecture design. In this work, we rethink these approaches through the lens of manifold optimization…

Effects of Architectures on Continual Semantic Segmentation

2023-02-21 · Tobias Kalb, Niket Ahuja, Jingxing Zhou, Jürgen Beyerer

Research in the field of Continual Semantic Segmentation is mainly investigating novel learning algorithms to overcome catastrophic forgetting of neural networks. Most recent publications have focused on improving learni…

Continual LearningContinual Semantic SegmentationDecoderSemantic Segmentation

Peri-LN: Revisiting Layer Normalization in the Transformer Architecture

2025-02-04 · Jeonghoon Kim, Byeongchan Lee, Cheonbok Park, Yeontaek Oh 외

Designing Transformer architectures with the optimal layer normalization (LN) strategy that ensures large-scale training stability and expedite convergence has remained elusive, even in this era of large language models …