arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.10622cs.LGcs.AIcs.CLcs.CV

无归一化的Transformer

Transformers without Normalization

FAIR, Meta(FAIR与Meta公司);New York University(纽约大学);MIT(麻省理工学院);Princeton University(普林斯顿大学)

Jiachen Zhu, Xinlei Chen, Kaiming He, Yann LeCun, Zhuang Liu

AI总结:

本研究提出逐元素运算Dynamic Tanh(DyT)以替换Transformer中的归一化层,在多类任务与领域中实现了匹配或超越带归一化模型的性能,挑战了归一化层不可或缺的传统认知。

摘要:

归一化层在现代神经网络中无处不在,长期以来被认为是必不可少的组件。本研究证明,采用一种极为简单的技术,无归一化的Transformer可以达到相同甚至更优的性能。我们提出动态双曲正切(Dynamic Tanh,DyT),这是一种逐元素运算,表达式为$DyT(x) = \ anh(αx)$,可直接替换Transformer中的归一化层。DyT的灵感来源于观察发现:Transformer中的层归一化通常会产生类似tanh的S形输入-输出映射。通过引入DyT,无归一化的Transformer大多无需超参数调优,就能匹配或超越带归一化的同类模型性能。我们在多种场景下验证了搭载DyT的Transformer的有效性,涵盖识别到生成任务、监督到自监督学习、计算机视觉到语言模型领域。这些发现挑战了归一化层在现代神经网络中不可或缺的传统认知,为理解其在深度网络中的作用提供了新见解。

英文摘要:

Normalization layers are ubiquitous in modern neural networks and have long been considered essential. This work demonstrates that Transformers without normalization can achieve the same or better performance using a remarkably simple technique. We introduce Dynamic Tanh (DyT), an element-wise operation $DyT($x$) = \tanh(α$x$)$, as a drop-in replacement for normalization layers in Transformers. DyT is inspired by the observation that layer normalization in Transformers often produces tanh-like, $S$-shaped input-output mappings. By incorporating DyT, Transformers without normalization can match or exceed the performance of their normalized counterparts, mostly without hyperparameter tuning. We validate the effectiveness of Transformers with DyT across diverse settings, ranging from recognition to generation, supervised to self-supervised learning, and computer vision to language models. These findings challenge the conventional understanding that normalization layers are indispensable in modern neural networks, and offer new insights into their role in deep networks.

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

↑