mlsanityData to 14 Oct 2026

Attention Flows for General Transformers

arXiv 2205.15389 ↗First posted 30 May 2022cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

In this paper, we study the computation of how much an input token in a Transformer model influences its prediction. We formalize a method to construct a flow network out of the attention values of encoder-only Transformer models and extend it to general Transformer architectures including an auto-regressive decoder. We show that running a maxflow algorithm on the flow network construction yields Shapley values, which determine the impact of a player in cooperative game theory. By interpreting the input tokens in the flow network as players, we can compute their influence on the total attention flow leading to the decoder's decision. Additionally, we provide a library that computes and visualizes the attention flow of arbitrary Transformer models. We show the usefulness of our implementation on various models trained on natural language processing and reasoning tasks.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 27 of its 47 references that are in the map. First posted on arXiv 30 May 2022.

Builds on

27 of 47 references.

References · 27

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  6. 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
  7. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  8. 2017Axiomatic Attribution for Deep Networkscited by 3,384
  9. 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,312
  10. 2021Transformers in Vision: A Surveycited by 1,013
  11. 2019DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generationcited by 842
  12. 2020Quantifying Attention Flow in Transformerscited by 775
15 more
  1. 2019Data Shapley: Equitable Valuation of Data for Machine Learningcited by 629
  2. 2020Transformer Interpretability Beyond Attention Visualizationcited by 627
  3. 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 417
  4. 2019The many Shapley values for model explanationcited by 344
  5. 2019A Multiscale Visualization of Attention in the Transformer Modelcited by 292
  6. 2018Consistent Individualized Feature Attribution for Tree Ensemblescited by 285
  7. 2019Deep Learning for Symbolic Mathematicscited by 270
  8. 2015Explaining NonLinear Classification Decisions with Deep Taylor Decompositioncited by 250
  9. 2020A Survey on the Explainability of Supervised Machine Learningcited by 227
  10. 2019Explaining individual predictions when features are dependent: More accurate approximations to Shapley valuescited by 208
  11. 2021Proof Artifact Co-training for Theorem Proving with Language Modelscited by 132
  12. 2020Teaching Temporal Logics to Neural Networkscited by 51
  13. 2021Attention Flows are Shapley Value Explanationscited by 30
  14. 2021Dodrio: Exploring Transformer Models with Interactive Visualizationcited by 28
  15. 2021Neural Circuit Synthesis from Specification Patternscited by 17

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.