arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.14243cs.CL
收藏

走向透明和可解释的注意力模型

Towards Transparent and Explainable Attention Models

Indian Institute of Technology Madras(马德拉斯印度理工学院);Robert Bosch Center for Data Science and Artificial Intelligence, IIT Madras(印度理工学院马德拉斯分校罗伯特·博世数据科学与人工智能中心);Adobe Research(Adobe研究院)

Akash Kumar Mohankumar, Preksha Nema, Sharan Narasimhan, Mitesh M. Khapra, Balaji Vasan Srinivasan, Balaraman Ravindran

摘要:

最近关于注意力分布的可解释性的研究导致了对模型预测的可信和合理解释的概念。注意力分布可以被认为是一个忠实的解释,如果一个较高的注意力权重意味着更大的影响模型的预测。如果它们为模型的预测提供了人类可以理解的理由,它们可以被认为是一个合理的解释。在这项工作中,我们首先解释了为什么基于LSTM的编码器中当前的注意力机制既不能对模型的预测提供忠实的解释,也不能提供合理的解释。我们观察到,在基于LSTM的编码器中,不同时间步长的隐藏表示彼此非常相似(高锥度),并且在这些情况下注意力权重没有太大意义,因为即使注意力权重的随机排列也不会影响模型的预测。基于对各种任务和数据集的实验,我们观察到注意力分布通常将模型的预测归因于标点符号等不重要的单词,并且无法为预测提供合理的解释。为了使注意力机制更加可信和合理,我们提出了一个具有多样性驱动的训练目标的修改的LSTM单元,以确保在不同的时间步学习的隐藏表示是多样的。我们发现,由此产生的注意力分布提供了更大的透明度,因为它们(i)提供了更精确的隐藏状态的重要性排名(ii)更好地指示了对模型预测重要的单词(iii)与基于梯度的归因方法更好地相关。人类的评估表明,我们的模型所学到的注意力分布为模型的预测提供了一个合理的解释。我们的代码已在https://github.com/akashkm99/Interpretable-Attention上公开发布

英文摘要:

Recent studies on interpretability of attention distributions have led to notions of faithful and plausible explanations for a model's predictions. Attention distributions can be considered a faithful explanation if a higher attention weight implies a greater impact on the model's prediction. They can be considered a plausible explanation if they provide a human-understandable justification for the model's predictions. In this work, we first explain why current attention mechanisms in LSTM based encoders can neither provide a faithful nor a plausible explanation of the model's predictions. We observe that in LSTM based encoders the hidden representations at different time-steps are very similar to each other (high conicity) and attention weights in these situations do not carry much meaning because even a random permutation of the attention weights does not affect the model's predictions. Based on experiments on a wide variety of tasks and datasets, we observe attention distributions often attribute the model's predictions to unimportant words such as punctuation and fail to offer a plausible explanation for the predictions. To make attention mechanisms more faithful and plausible, we propose a modified LSTM cell with a diversity-driven training objective that ensures that the hidden representations learned at different time steps are diverse. We show that the resulting attention distributions offer more transparency as they (i) provide a more precise importance ranking of the hidden states (ii) are better indicative of words important for the model's predictions (iii) correlate better with gradient-based attribution methods. Human evaluations indicate that the attention distributions learned by our model offer a plausible explanation of the model's predictions. Our code has been made publicly available at https://github.com/akashkm99/Interpretable-Attention

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑