HackerPapers

arXiv:1902.10186cs.CL

Attention is not Explanation

Sarthak Jain, Byron C. Wallace

Abstract

Attention mechanisms have seen wide adoption in neural NLP models. In addition to improving predictive performance, these are often touted as affording transparency: models equipped with attention provide a distribution over attended-to input units, and this is often presented (at least implicitly) as communicating the relative importance of inputs. However, it is unclear what relationship exists between attention weights and model outputs. In this work, we perform extensive experiments across a variety of NLP tasks that aim to assess the degree to which attention weights provide meaningful `explanations' for predictions. We find that they largely do not. For example, learned attention weights are frequently uncorrelated with gradient-based measures of feature importance, and one can identify very different attention distributions that nonetheless yield equivalent predictions. Our findings show that standard attention modules do not provide meaningful explanations and should not be treated as though they do. Code for all experiments is available at https://github.com/successar/AttentionExplanation.

arXiv comments
Accepted as NAACL 2019 Long Paper
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Dec 2020 to Jan 2026. Found in 1 HN submission from Feb 2019 to Feb 2019. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

  1. The Q, K, V Matrices 1 comment
    • Read the third link / review paper, it is not at all the case that all attention is based on QKV projections. Your terms "sensitivity", "visibility", and "important" are too vague and lack any clear mathematical meaning, so IMO add nothing to any understanding. "Important" also…

      D-MachineView on HNParent context

    • The pair of these papers: (Don't read them in full.) 1.Attention is not explanation (https://arxiv.org/abs/1902.10186) 2.Attention is not not Explanation (https://arxiv.org/abs/1908.04626) Goes to show the complete lack of agreement between researchers in the explainability…

      screyeView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.