Lune

ACM MM2022顶会

Unified Normalization for Accelerating and Stabilizing Transformers

Qiming Yang, Kai Zhang, Chaoxiang Lan, Zhi Yang, Zheyang Li, Wenming Tan, Jun Xiao, Shiliang Pu

摘要

Solid results from Transformers have made them prevailing architectures in various natural language and vision tasks. As a default component in Transformers, Layer Normalization (LN) normalizes activations within each token to boost the robustness. However, LN requires on-the-fly statistics calculation in inference as well as division and square root operations, leading to inefficiency on hardware. What is more, replacing LN with other hardware-efficient normalization schemes (e.g., Batch Normalization) results in inferior performance, even collapse in training. We find that this dilemma is caused by abnormal behaviors of activation statistics, including large fluctuations over iterations and extreme outliers across layers. To tackle these issues, we propose Unified Normalization (UN), which can speed up the inference by being fused with other linear operations and achieve comparable performance on par with LN. UN strives to boost performance by calibrating the activation and gradient statistics with a tailored fluctuation smoothing strategy. Meanwhile, an adaptive outlier filtration strategy is applied to avoid collapse in training whose effectiveness is theoretically proved and experimentally verified in this paper. We demonstrate that UN can be an efficient drop-in alternative to LN by conducting extensive experiments on language and vision tasks. Besides, we evaluate the efficiency of our method on GPU. Transformers equipped with UN enjoy about 31% inference speedup and nearly 18% memory reduction. Code will be released at https://github.com/hikvision-research/Unified-Normalization.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Sparse MoE as the New Dropout: Scaling Dense and Self-Slimmable Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Sparse MoE as the New Dropout: Scaling Dense and Self-Slimmable Transformers 引用了 Language Models are Few-Shot Learners
  • Exploring the Benefit of Activation Sparsity in Pre-training 引用了 Sparse MoE as the New Dropout: Scaling Dense and Self-Slimmable Transformers
  • Exploring the Benefit of Activation Sparsity in Pre-training 引用了 Language Models are Few-Shot Learners
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Stronger Normalization-Free Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Stronger Normalization-Free Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Language Models are Few-Shot Learners
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
  • SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch Normalization 引用了 Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions 引用了 Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
  • Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用
  2. SLAB: Efficient Transformers with Simplified Linear Attention and Progressive Re-parameterized Batch NormalizationJialong Guo, Xinghao Chen, Yehui Tang, Yunhe WangICML 2024 · 40 次引用
  3. Stronger Normalization-Free TransformersMingzhi Chen, Taiming Lu, Jiachen Zhu, Mingjie Sun 等CVPR 2026 · 16 次引用
  4. Sparse MoE as the New Dropout: Scaling Dense and Self-Slimmable TransformersTianlong Chen, Zhenyu Zhang, Ajay Kumar Jaiswal, Shiwei Liu 等ICLR 2023 · 6 次引用
  5. Exploring the Benefit of Activation Sparsity in Pre-trainingZhengyan Zhang, Chaojun Xiao, Qiujieli Qin, Yankai Lin 等ICML 2024 · 6 次引用

它引用的 Paper19

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  4. Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan 等ICCV 2021 · 4,909 次引用
  5. Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetLi Yuan, Yunpeng Chen, Tao Wang, Weihao Yu 等ICCV 2021 · 2,462 次引用

相关 Paper

  1. Pre-RMSNorm and Pre-CRMSNorm Transformers: Equivalent and Efficient Pre-LN TransformersZixuan Jiang, Jiaqi Gu, Hanqing Zhu, David Z. PanNeurIPS 2023 · 44 次引用
  2. Understanding the Failure of Batch Normalization for Transformers in NLPJiaxi Wang, Ji Wu, Lei HuangNeurIPS 2022 · 14 次引用
  3. PowerNorm: Rethinking Batch Normalization in TransformersSheng Shen, Zhewei Yao, Amir Gholami, Michael W. Mahoney 等ICML 2020 · 88 次引用
  4. Bounded Hyperbolic Tangent: A Stable and Efficient Alternative to Pre-Layer Normalization in Large Language ModelsHoyoon Byun, Youngjun Choi, Taero Kim, Sungrae Park 等ICML 2026 · 2 次引用
  5. Peri-LN: Revisiting Normalization Layer in the Transformer ArchitectureJeonghoon Kim, Byeongchan Lee, Cheonbok Park, Yeontaek Oh 等ICML 2025
黄昏的海面,两侧是细线勾勒的悬崖