アテンションメカニズムはニューラルNLPモデルに広く採用されている。予測性能を向上させることに加えて、これらはしばしば透明性を提供していると言われている:アテンションを備えたモデルは、アテンションされた入力ユニットの分布を提供し、これはしばしば(少なくとも暗黙のうちに)入力の相対的な重要性を伝えるものとして提示される。しかし、注目度とモデルの出力の間にどのような関係があるのかは不明である。この研究では、様々なNLPタスクを対象とした大規模な実験を行い、注目度が予測に対して意味のある「説明」を提供する度合いを評価することを目的とする。その結果、ほとんどの場合はそうではないことがわかった。例えば、学習した注目度は勾配に基づいた特徴の重要度の測定値とは相関が無いことが多く、それにもかかわらず同等の予測値を得ることができる全く異なる注目度分布を識別することができる。我々の発見は、標準的なアテンションモジュールが意味のある説明を提供しておらず、あたかも提供しているかのように扱うべきではないことを示している。すべての実験のコードは https://github.com/successar/AttentionExplanation から入手可能。
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.