paper-with-me

홈 › Papers

Geometric Interpretation of Layer Normalization and a Comparative Analysis with RMSNorm

2024-09-19 · Akshat Gupta, Atahan Ozdemir, Gopala Anumanchipalli

This paper presents a novel geometric interpretation of LayerNorm and explores how LayerNorm influences the norm and orientation of hidden vectors in the representation space. With these geometric insights, we prepare the foundation for comparing LayerNorm with RMSNorm. We show that the definition of LayerNorm is innately linked to the uniform vector, defined as $\boldsymbol{1} = [1, 1, 1, 1, \cdots, 1]^T \in \mathbb{R}^d$. We then show that the standardization step in LayerNorm can be understood in three simple steps: (i) remove the component of a vector along the uniform vector, (ii) normalize the remaining vector, and (iii) scale the resultant vector by $\sqrt{d}$, where $d$ is the dimensionality of the representation space. We also provide additional insights into how LayerNorm operates at inference time. Finally, we compare the hidden representations of LayerNorm-based LLMs with models trained using RMSNorm and show that all LLMs naturally operate orthogonal to the uniform vector at inference time, that is, on average they do not have a component along the uniform vector during inference. This presents the first mechanistic evidence that removing the component along the uniform vector in LayerNorm is a redundant step. These results advocate for using RMSNorm over LayerNorm which is also more computationally efficient.

📄 PDF Abstract BibTeX arXiv:2409.12951

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

RMSNorm 설명 없음
ALIGN In the ALIGN method, visual and language representations are jointly trained from noisy image alt-text data. The image and text encoders are learned via contrastive loss…

Similar Papers 제목 키워드 기반

Spherical Perspective on Learning with Normalization Layers

2020-06-23 · Simon Roburin, Yann de Mont-Marin, Andrei Bursuc, Renaud Marlet 외

Normalization Layers (NLs) are widely used in modern deep-learning architectures. Despite their apparent simplicity, their effect on optimization is not yet fully understood. This paper introduces a spherical framework t…

Traveling Words: A Geometric Interpretation of Transformers

2023-09-13 · Raul Molina

Transformers have significantly advanced the field of natural language processing, but comprehending their internal mechanisms remains a challenge. In this paper, we introduce a novel geometric perspective that elucidate…

Clustering in pure-attention hardmax transformers and its role in sentiment analysis

2024-06-26 · Albert Alcalde, Giovanni Fantuzzi, Enrique Zuazua

Transformers are extremely successful machine learning models whose mathematical properties remain poorly understood. Here, we rigorously characterize the behavior of transformers with hardmax self-attention and normaliz…

Sentiment Analysis

MDP Geometry, Normalization and Reward Balancing Solvers

2024-07-09 · Arsenii Mustafin, Aleksei Pakharev, Alex Olshevsky, Ioannis Ch. Paschalidis

We present a new geometric interpretation of Markov Decision Processes (MDPs) with a natural normalization procedure that allows us to adjust the value function at each state without altering the advantage of any action …

Decision MakingSequential Decision Making

New Interpretations of Normalization Methods in Deep Learning

2020-06-16 · Jiacheng Sun, Xiangyong Cao, Hanwen Liang, Weiran Huang 외

In recent years, a variety of normalization methods have been proposed to help train neural networks, such as batch normalization (BN), layer normalization (LN), weight normalization (WN), group normalization (GN), etc. …

Deep LearningLEMMA