Deep Transformers without Shortcuts: Modifying Self-attention for Faithful Signal Propagation
Bobby He, James Martens, Guodong Zhang, Aleksandar Botev, Andrew Brock, Samuel L. Smith, Yee Whye Teh
摘要
Skip connections and normalisation layers form two standard architectural components that are ubiquitous for the training of Deep Neural Networks (DNNs), but whose precise roles are poorly understood. Recent approaches such as Deep Kernel Shaping have made progress towards reducing our reliance on them, using insights from wide NN kernel theory to improve signal propagation in vanilla DNNs (which we define as networks without skips or normalisation layers). However, these approaches are incompatible with the self-attention layers present in transformers, whose kernels are intrinsically more complicated to analyse and control. And so the question remains: is it possible to train deep vanilla transformers? We answer this question in the affirmative by designing several approaches that use combinations of parameter initialisations, bias matrices and location-dependent rescaling to achieve faithful signal propagation in vanilla transformers. Our methods address several intricacies specific to signal propagation in transformers, including the interaction with positional encoding and causal masking. In experiments on WikiText-103 and C4, our approaches enable deep transformers without normalisation to train at speeds matching their standard counterparts, and deep vanilla transformers to reach the same performance as standard ones after about 5 times more iterations.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 23 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Models 引用了 Language Models are Few-Shot Learners
- PIQA: Reasoning about Physical Commonsense in Natural Language 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
- Going deeper with Image Transformers 引用了 Language Models are Few-Shot Learners
- LoRA+: Efficient Low Rank Adaptation of Large Models 引用了 The Shaped Transformer: Attention Models in the Infinite Depth-and-Width Limit
- Language Models are Few-Shot Learners 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
- The Impact of Initialization on LoRA Finetuning Dynamics 引用了 LoRA+: Efficient Low Rank Adaptation of Large Models
- The Impact of Initialization on LoRA Finetuning Dynamics 引用了 The Shaped Transformer: Attention Models in the Infinite Depth-and-Width Limit
- The Shaped Transformer: Attention Models in the Infinite Depth-and-Width Limit 引用了 Language Models are Few-Shot Learners
- The Shaped Transformer: Attention Models in the Infinite Depth-and-Width Limit 引用了 On Layer Normalization in the Transformer Architecture
引用它的顶会 Paper23
- LoRA+: Efficient Low Rank Adaptation of Large ModelsSoufiane Hayou, Nikhil Ghosh, Bin YuICML 2024 · 388 次引用
- Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language ModelsFrederik Kunstner, Alan Milligan, Robin Yadav, Mark Schmidt 等NeurIPS 2024 · 100 次引用
- The Impact of Initialization on LoRA Finetuning DynamicsSoufiane Hayou, Nikhil Ghosh, Bin YuNeurIPS 2024 · 63 次引用
- SAMformer: Unlocking the Potential of Transformers in Time Series Forecasting with Sharpness-Aware Minimization and Channel-Wise AttentionRomain Ilbert, Ambroise Odonnat, Vasilii Feofanov, Aladin Virmaux 等ICML 2024 · 62 次引用
- The Shaped Transformer: Attention Models in the Infinite Depth-and-Width LimitLorenzo Noci, Chuning Li, Mufan Bill Li, Bobby He 等NeurIPS 2023 · 59 次引用
它引用的 Paper16
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 次引用
- PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao 等AAAI 2020 · 2,916 次引用
- On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng 等ICML 2020 · 1,388 次引用
- Going deeper with Image TransformersHugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve 等ICCV 2021 · 1,279 次引用
相关 Paper
- Characterizing signal propagation to close the performance gap in unnormalized ResNetsAndrew Brock, Soham De, Samuel L. SmithICLR 2021 · 21 次引用
- Simplifying Transformer BlocksBobby He, Thomas HofmannICLR 2024 · 52 次引用
- Can CNNs Be More Robust Than Transformers?Zeyu Wang, Yutong Bai, Yuyin Zhou, Cihang XieICLR 2023 · 14 次引用
- Neural Redshift: Random Networks are not Random FunctionsDamien Teney, Armand Mihai Nicolicioiu, Valentin Hartmann, Ehsan AbbasnejadCVPR 2024 · 7 次引用
- Attention-Only Transformers via Unrolled Subspace DenoisingPeng Wang, Yifu Lu, Yaodong Yu, Druv Pai 等ICML 2025
