Lune

ACL2023顶会

Explaining How Transformers Use Context to Build Predictions

Javier Ferrando, Gerard I. Gállego, Ioannis Tsiamas, Marta R. Costa-jussà

摘要

Language Generation Models produce words based on the previous context. Although existing methods offer input attributions as explanations for a model’s prediction, it is still unclear how prior words affect the model’s decision throughout the layers. In this work, we leverage recent advances in explainability of the Transformer and present a procedure to analyze models for language generation. Using contrastive examples, we compare the alignment of our explanations with evidence of the linguistic phenomena, and show that our method consistently aligns better than gradient-based and perturbation-based baselines. Then, we investigate the role of MLPs inside the Transformer and show that they learn features that help the model predict words that are grammatically acceptable. Lastly, we apply our method to Neural Machine Translation models, and demonstrate that they generate human-like source-target alignments for building predictions.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • InversionView: A General-Purpose Method for Reading Information from Neural Activations 引用了 Analyzing Transformers in Embedding Space
  • InversionView: A General-Purpose Method for Reading Information from Neural Activations 引用了 Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 Small
  • Quantifying the Plausibility of Context Reliance in Neural Machine Translation 引用了 Interpreting Language Models with Contrastive Explanations
  • Quantifying the Plausibility of Context Reliance in Neural Machine Translation 引用了 A Diagnostic Study of Explainability Techniques for Text Classification
  • Quantifying the Plausibility of Context Reliance in Neural Machine Translation 引用了 Language Models are Few-Shot Learners
  • Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 Small 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper18

  1. Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention MapsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiICLR 2024 · 35 次引用
  2. InvisibleInk: High-Utility and Low-Cost Text Generation with Differential PrivacyVishnu Vinod, Krishna Pillutla, Abhradeep Guha ThakurtaNeurIPS 2025 · 12 次引用
  3. Attributing Response to Context: A Jensen–Shannon Divergence Driven Mechanistic Study of Context Attribution in Retrieval-Augmented GenerationRuizhe Li, Chen Chen, Yuchen Hu, Yanjun Gao 等ICLR 2026 · 11 次引用
  4. InversionView: A General-Purpose Method for Reading Information from Neural ActivationsXinting Huang, Madhur Panwar, Navin Goyal, Michael HahnNeurIPS 2024 · 10 次引用
  5. Quantifying the Plausibility of Context Reliance in Neural Machine TranslationGabriele Sarti, Grzegorz Chrupala, Malvina Nissim, Arianna BisazzaICLR 2024 · 8 次引用

它引用的 Paper8

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. A Diagnostic Study of Explainability Techniques for Text ClassificationPepa Atanasova, Jakob Grue Simonsen, Christina Lioma, Isabelle AugensteinEMNLP 2020 · 158 次引用
  3. Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 SmallKevin Ro Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris 等ICLR 2023 · 50 次引用
  4. Analyzing Transformers in Embedding SpaceGuy Dar, Mor Geva, Ankit Gupta, Jonathan BerantACL 2023 · 36 次引用
  5. Interpreting Language Models with Contrastive ExplanationsKayo Yin, Graham NeubigEMNLP 2022 · 32 次引用

相关 Paper

  1. Attention Weights in Transformer NMT Fail Aligning Words Between Sequences but Largely Explain Model PredictionsJavier Ferrando, Marta R. Costa-jussàEMNLP Findings 2021 · 14 次引用
  2. 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 次引用
  3. XAI for Transformers: Better Explanations through Conservative PropagationAmeen Ali, Thomas Schnake, Oliver Eberle, Grégoire Montavon 等ICML 2022 · 144 次引用
  4. Language models and brains align due to more than next-word prediction and word-level informationGabriele Merlin, Mariya TonevaEMNLP 2024 · 2 次引用
  5. Interpreting Language Reward Models via Contrastive ExplanationsJunqi Jiang, Tom Bewley, Saumitra Mishra, Freddy Lécué 等ICLR 2025
黄昏的海面,两侧是细线勾勒的悬崖