Telling BERT's full story: from Local Attention to Global Aggregation
Not on the map. Why?
Abstract (arXiv)
We take a deep look into the behavior of self-attention heads in the transformer architecture. In light of recent work discouraging the use of attention distributions for explaining a model's behavior, we show that attention distributions can nevertheless provide insights into the local behavior of attention heads. This way, we propose a distinction between local patterns revealed by attention and global patterns that refer back to the input, and analyze BERT from both angles. We use gradient attribution to analyze how the output of an attention attention head depends on the input tokens, effectively extending the local attention-based analysis to account for the mixing of information throughout the transformer layers. We find that there is a significant discrepancy between attention and attribution distributions, caused by the mixing of context inside the model. We quantify this discrepancy and observe that interestingly, there are some patterns that persist across all layers despite the mixing.
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). First posted on arXiv 10 Apr 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 4; 2022: 4; 2023: 4; 2024: 0; 2025: 1; 2026: 2.
15 papers.
Sort:
By area:
- 2022Towards Faithful Model Explanation in NLP: A Surveycited by 129
- 2022Measuring the Mixing of Contextual Information in the Transformercited by 63
- 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
- 2023Quantifying Context Mixing in Transformerscited by 43
- 2023DecompX: Explaining Transformers Decisions by Propagating Token Decompositioncited by 31
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compressioncited by 26
- 2021Towards BERT-based Automatic ICD Coding: Limitations and Opportunitiescited by 25
- 2022AdapLeR: Speeding up Inference by Adaptive Length Reductioncited by 19
- 2021Of Non-Linearity and Commutativity in BERTcited by 16
- 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Saliencecited by 16
- 2021On the Distribution, Sparsity, and Inference-time Quantization of Attention Values in Transformerscited by 14
- 2023Insights Into the Inner Workings of Transformer Models for Protein Function Predictioncited by 2
3 more
- 2026BOSCH: Black-Box Binary Optimization for Short-Context Attention-Head Selection in LLMs7 Apr 2026
- 2026Layer-wise Positional Bias in Short-Context Language Modeling7 Jan 2026
- 2025Contrast-CAT: Contrasting Activations for Enhanced Interpretability in Transformer-based Text Classifiers27 Jul 2025
- 2023Insights Into the Inner Workings of Transformer Models for Protein Function Prediction7 Sep 2023
- 2023DecompX: Explaining Transformers Decisions by Propagating Token Decomposition5 Jun 2023
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compression17 May 2023
- 2023Quantifying Context Mixing in Transformers30 Jan 2023
- 2022Towards Faithful Model Explanation in NLP: A Survey22 Sep 2022
- 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformers6 May 2022
- 2022AdapLeR: Speeding up Inference by Adaptive Length Reduction16 Mar 2022
- 2022Measuring the Mixing of Contextual Information in the Transformer8 Mar 2022
- 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Salience31 Aug 2021
- 2022Towards Faithful Model Explanation in NLP: A Surveycited by 129
- 2022Measuring the Mixing of Contextual Information in the Transformercited by 63
- 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
- 2023Quantifying Context Mixing in Transformerscited by 43
- 2023DecompX: Explaining Transformers Decisions by Propagating Token Decompositioncited by 31
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compressioncited by 26
- 2021Towards BERT-based Automatic ICD Coding: Limitations and Opportunitiescited by 25
- 2022AdapLeR: Speeding up Inference by Adaptive Length Reductioncited by 19
- 2021Of Non-Linearity and Commutativity in BERTcited by 16
- 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Saliencecited by 16
- 2021On the Distribution, Sparsity, and Inference-time Quantization of Attention Values in Transformerscited by 14
- 2023Insights Into the Inner Workings of Transformer Models for Protein Function Predictioncited by 2
12 most cited of 14 All 14 (JSON)
- 2026Layer-wise Positional Bias in Short-Context Language Modeling7 Jan 2026
- 2025Contrast-CAT: Contrasting Activations for Enhanced Interpretability in Transformer-based Text Classifiers27 Jul 2025
- 2023Insights Into the Inner Workings of Transformer Models for Protein Function Prediction7 Sep 2023
- 2023DecompX: Explaining Transformers Decisions by Propagating Token Decomposition5 Jun 2023
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compression17 May 2023
- 2023Quantifying Context Mixing in Transformers30 Jan 2023
- 2022Towards Faithful Model Explanation in NLP: A Survey22 Sep 2022
- 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformers6 May 2022
- 2022AdapLeR: Speeding up Inference by Adaptive Length Reduction16 Mar 2022
- 2022Measuring the Mixing of Contextual Information in the Transformer8 Mar 2022
- 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Salience31 Aug 2021
- 2021On the Distribution, Sparsity, and Inference-time Quantization of Attention Values in Transformers2 Jun 2021
12 newest of 14 All 14 (JSON)