Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
102 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Explaining How Transformers Use Context to Build Predictions (2305.12535v1)

Published 21 May 2023 in cs.CL, cs.AI, and cs.LG

Abstract: 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.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Javier Ferrando (15 papers)
  2. Gerard I. Gállego (19 papers)
  3. Ioannis Tsiamas (12 papers)
  4. Marta R. Costa-jussà (73 papers)
Citations (27)

Summary

We haven't generated a summary for this paper yet.