Incorporating Residual and Normalization Layers into Analysis of Masked Language Models
Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro Inui
摘要
Transformer architecture has become ubiquitous in the natural language processing field. To interpret the Transformer-based models, their attention patterns have been extensively analyzed. However, the Transformer architecture is not only composed of the multihead attention; other components can also contribute to Transformers' progressive performance. In this study, we extended the scope of the analysis of Transformers from solely the attention patterns to the whole attention block, i.e., multi-head attention, residual connection, and layer normalization. Our analysis of Transformer-based masked language models shows that the token-to-token interaction performed via attention has less impact on the intermediate representations than previously assumed. These results provide new intuitive explanations of existing reports; for example, discarding the learned attention patterns tends not to adversely affect the performance. The codes of our experiments are publicly available. 1
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 21 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Attention is not all you need: pure attention loses rank doubly exponentially with depth 引用了 ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- ByGPT5: End-to-End Style-conditioned Poetry Generation with Token-free Language Models 引用了 Measuring the Mixing of Contextual Information in the Transformer
- Towards Opening the Black Box of Neural Machine Translation: Source and Target Interpretations of the Transformer 引用了 On Identifiability in Transformers
- Towards Opening the Black Box of Neural Machine Translation: Source and Target Interpretations of the Transformer 引用了 Measuring the Mixing of Contextual Information in the Transformer
- Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps 引用了 On Identifiability in Transformers
- Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps 引用了 Entropy- and Distance-Based Predictors From GPT-2 Attention Patterns Predict Reading Times Over and Above GPT-2 Surprisal
- Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps 引用了 Measuring the Mixing of Contextual Information in the Transformer
- Measuring the Mixing of Contextual Information in the Transformer 引用了 On Identifiability in Transformers
引用它的顶会 Paper21
- Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention MapsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiICLR 2024 · 35 次引用
- Towards Opening the Black Box of Neural Machine Translation: Source and Target Interpretations of the TransformerJavier Ferrando, Gerard I. Gállego, Belen Alastruey, Carlos Escolano 等EMNLP 2022 · 18 次引用
- Measuring the Mixing of Contextual Information in the TransformerJavier Ferrando, Gerard I. Gállego, Marta R. Costa-jussàEMNLP 2022 · 18 次引用
- Entropy- and Distance-Based Predictors From GPT-2 Attention Patterns Predict Reading Times Over and Above GPT-2 SurprisalByung-Doh Oh, William SchulerEMNLP 2022 · 13 次引用
- ByGPT5: End-to-End Style-conditioned Poetry Generation with Token-free Language ModelsJonas Belouadi, Steffen EgerACL 2023 · 12 次引用
它引用的 Paper8
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel 等ICLR 2020 · 7,418 次引用
- On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng 等ICML 2020 · 1,388 次引用
- Attention is not all you need: pure attention loses rank doubly exponentially with depthYihe Dong, Jean-Baptiste Cordonnier, Andreas LoukasICML 2021 · 522 次引用
- Stabilizing Transformers for Reinforcement LearningEmilio Parisotto, H. Francis Song, Jack W. Rae, Razvan Pascanu 等ICML 2020 · 464 次引用
- On Identifiability in TransformersGino Brunner, Yang Liu, Damian Pascual, Oliver Richter 等ICLR 2020 · 210 次引用
相关 Paper
- On the Expressivity Role of LayerNorm in Transformers' AttentionShaked Brody, Uri Alon, Eran YahavACL Findings 2023 · 18 次引用
- Attention is Not Only a Weight: Analyzing Transformers with Vector NormsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiEMNLP 2020 · 138 次引用
- Influence Patterns for Explaining Information Flow in BERTKaiji Lu, Zifan Wang, Piotr Mardziel, Anupam DattaNeurIPS 2021 · 22 次引用
- Context Analysis for Pre-trained Masked Language ModelsYi-An Lai, Garima Lalwani, Yi ZhangEMNLP Findings 2020 · 11 次引用
- Attention-Only Transformers via Unrolled Subspace DenoisingPeng Wang, Yifu Lu, Yaodong Yu, Druv Pai 等ICML 2025
