arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.04134cs.LG
收藏

LayerNorm的几何与动力学

Geometry and Dynamics of LayerNorm

Simplex AI Safety(Simplex AI安全机构);Beyond Institute for Theoretical Science (BITS)(Beyond理论科学研究所(BITS))

Paul M. Riechers

AI总结:

本文通过数学表达式与几何分析揭示LayerNorm的复合变换本质,证明其输出位于(N−1)维超椭球内部,并用简单矩阵的特征分解确定主轴。

摘要:

这是一份技术说明,旨在为深度神经网络中常见的LayerNorm函数提供更深刻的直觉。LayerNorm是相对于一个特殊的“神经”基来定义的,但它所做的不仅仅是归一化相应的向量元素。相反,它在输入激活向量上实现了线性投影、非线性缩放以及随后的仿射变换这三者的复合。我们提出了一种新的数学表达式和几何直觉,使最终效果更加透明。我们强调,当LayerNorm作用于一个N维向量空间时,LayerNorm的所有输出都位于一个(N−1)维超平面与一个N维超椭球内部的交集内。该交集是一个(N−1)维超椭球的内部,而典型输入被映射到靠近其表面的位置。我们通过对一个构造简单的矩阵进行特征分解,求得了这个(N−1)维超椭球主轴的方向和长度。

英文摘要:

A technical note aiming to offer deeper intuition for the LayerNorm function common in deep neural networks. LayerNorm is defined relative to a distinguished 'neural' basis, but it does more than just normalize the corresponding vector elements. Rather, it implements a composition -- of linear projection, nonlinear scaling, and then affine transformation -- on input activation vectors. We develop both a new mathematical expression and geometric intuition, to make the net effect more transparent. We emphasize that, when LayerNorm acts on an N-dimensional vector space, all outcomes of LayerNorm lie within the intersection of an (N-1)-dimensional hyperplane and the interior of an N-dimensional hyperellipsoid. This intersection is the interior of an (N-1)-dimensional hyperellipsoid, and typical inputs are mapped near its surface. We find the direction and length of the principal axes of this (N-1)-dimensional hyperellipsoid via the eigen-decomposition of a simply constructed matrix.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑