Effective Attention Sheds Light On Interpretability
- URL: http://arxiv.org/abs/2105.08855v1
- Date: Tue, 18 May 2021 23:41:26 GMT
- Title: Effective Attention Sheds Light On Interpretability
- Authors: Kaiser Sun and Ana Marasovi\'c
- Abstract summary: We ask whether visualizing effective attention gives different conclusions than interpretation of standard attention.
We show that effective attention is less associated with the features related to the language modeling pretraining.
We recommend using effective attention for studying a transformer's behavior since it is more pertinent to the model output by design.
- Score: 3.317258557707008
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: An attention matrix of a transformer self-attention sublayer can provably be
decomposed into two components and only one of them (effective attention)
contributes to the model output. This leads us to ask whether visualizing
effective attention gives different conclusions than interpretation of standard
attention. Using a subset of the GLUE tasks and BERT, we carry out an analysis
to compare the two attention matrices, and show that their interpretations
differ. Effective attention is less associated with the features related to the
language modeling pretraining such as the separator token, and it has more
potential to illustrate linguistic features captured by the model for solving
the end-task. Given the found differences, we recommend using effective
attention for studying a transformer's behavior since it is more pertinent to
the model output by design.
Related papers
- On Explaining with Attention Matrices [2.1178416840822027]
This paper explores the possible explanatory link between attention weights (AW) in transformer models and predicted output.
We introduce and effectively compute efficient attention, which isolates the effective components of attention matrices in tasks and models in which AW play an explanatory role.
arXiv Detail & Related papers (2024-10-24T08:43:33Z) - Elliptical Attention [1.7597562616011944]
Pairwise dot-product self-attention is key to the success of transformers that achieve state-of-the-art performance across a variety of applications in language and vision.
We propose using a Mahalanobis distance metric for computing the attention weights to stretch the underlying feature space in directions of high contextual relevance.
arXiv Detail & Related papers (2024-06-19T18:38:11Z) - How Much Does Attention Actually Attend? Questioning the Importance of
Attention in Pretrained Transformers [59.57128476584361]
We introduce PAPA, a new probing method that replaces the input-dependent attention matrices with constant ones.
We find that without any input-dependent attention, all models achieve competitive performance.
We show that better-performing models lose more from applying our method than weaker models, suggesting that the utilization of the input-dependent attention mechanism might be a factor in their success.
arXiv Detail & Related papers (2022-11-07T12:37:54Z) - Shapley Head Pruning: Identifying and Removing Interference in
Multilingual Transformers [54.4919139401528]
We show that it is possible to reduce interference by identifying and pruning language-specific parameters.
We show that removing identified attention heads from a fixed model improves performance for a target language on both sentence classification and structural prediction.
arXiv Detail & Related papers (2022-10-11T18:11:37Z) - Is Sparse Attention more Interpretable? [52.85910570651047]
We investigate how sparsity affects our ability to use attention as an explainability tool.
We find that only a weak relationship between inputs and co-indexed intermediate representations exists -- under sparse attention.
We observe in this setting that inducing sparsity may make it less plausible that attention can be used as a tool for understanding model behavior.
arXiv Detail & Related papers (2021-06-02T11:42:56Z) - SparseBERT: Rethinking the Importance Analysis in Self-attention [107.68072039537311]
Transformer-based models are popular for natural language processing (NLP) tasks due to its powerful capacity.
Attention map visualization of a pre-trained model is one direct method for understanding self-attention mechanism.
We propose a Differentiable Attention Mask (DAM) algorithm, which can be also applied in guidance of SparseBERT design.
arXiv Detail & Related papers (2021-02-25T14:13:44Z) - Learning Hard Retrieval Decoder Attention for Transformers [69.40942736249397]
Transformer translation model is based on the multi-head attention mechanism, which can be parallelized easily.
We show that our hard retrieval attention mechanism is 1.43 times faster in decoding.
arXiv Detail & Related papers (2020-09-30T13:18:57Z) - Why Attentions May Not Be Interpretable? [46.69116768203185]
Recent research found that attention-as-importance interpretations often do not work as we expected.
We show that one root cause of this phenomenon is shortcuts, which means that the attention weights themselves may carry extra information.
We propose two methods to mitigate this issue.
arXiv Detail & Related papers (2020-06-10T05:08:30Z) - Explain and Improve: LRP-Inference Fine-Tuning for Image Captioning
Models [82.3793660091354]
This paper analyzes the predictions of image captioning models with attention mechanisms beyond visualizing the attention itself.
We develop variants of layer-wise relevance propagation (LRP) and gradient-based explanation methods, tailored to image captioning models with attention mechanisms.
arXiv Detail & Related papers (2020-01-04T05:15:11Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.