[论文解读] Attention Interpretability Across NLP Tasks
本文提供一种系统性分析,表明注意力权重在多样的NLP任务中可以是可解释的,并且与特征重要性相关,但前提是注意力确实影响模型的预测;单序列任务表现得更像门控而非解释性权重。
The attention layer in a neural network model provides insights into the model's reasoning behind its prediction, which are usually criticized for being opaque. Recently, seemingly contradictory viewpoints have emerged about the interpretability of attention weights (Jain & Wallace, 2019; Vig & Belinkov, 2019). Amid such confusion arises the need to understand attention mechanism more systematically. In this work, we attempt to fill this gap by giving a comprehensive explanation which justifies both kinds of observations (i.e., when is attention interpretable and when it is not). Through a series of experiments on diverse NLP tasks, we validate our observations and reinforce our claim of interpretability of attention through manual evaluation.
研究动机与目标
- 将注意力可解释性分析扩展到文本分类以外的多种NLP任务。
- 识别注意力权重与特征重要性相关的条件。
- 解释为何注意力在单序列任务中可能充当门控,而在更复杂任务中则不是。
- 通过跨多个数据集与架构的人工评估来验证可解释性。
提出的方法
- 使用多种注意力机制(Bahdanau 风格、层次化、自注意力与 Transformer)在单序列、成对序列和生成任务中评估注意力。
- 比较具有统一、随机和置换注意力权重的模型,以评估对预测的影响。
- 给出将注意力作为单序列任务门控单元的理论解释。
- 使用人工标注来评估人类对注意力权重的可解释性。
- 在输入被消融时,通过 JS 散度分析注意力权重与特征重要性之间的相关性。
- 考察自注意力模型中层级对性能的影响。
实验结果
研究问题
- RQ1在何时注意力权重在NLP任务中具有可解释性?
- RQ2注意力权重是否与跨任务的特征重要性度量相关?
- RQ3在单序列、成对序列和生成任务中改变注意力权重如何影响模型预测?
- RQ4在不同NLP任务中,注意力权重对终端用户是否具有可解释性?
- RQ5自注意力层(如 Transformer)在跨层对置换后的注意力权重下的反应如何?
主要发现
| 模型 / 变体 | SST | IMDB | AG News | YELP |
|---|---|---|---|---|
| Bahdanau et al. (2015) | 83.4±0.5 | 90.7±0.7 | 96.4±0.1 | 66.7±0.1 |
| Uniform (Train+Infer / Infer) | -1.0 / -0.8 | -0.8 / -6.3 | -0.1 / -0.7 | -0.5 / -6.3 |
| Random (Train+Infer / Infer) | -1.1 / -0.9 | -0.6 / -6.4 | -0.0 / -0.7 | -0.4 / -6.4 |
| Permute (Infer) | -1.7 | -5.1 | -0.9 | -7.8 |
- 在单序列任务中,注意力并不总是可解释的;权重可能更多地充当门控,而非推理信号。
- 在成对序列和生成任务中,改变注意力权重对性能的影响远大于在单序列任务。
- 在注意力对预测至关重要的任务中,注意力权重与特征重要性相关,尤其是在非门控场景。
- 自注意力模型(Transformer)在跨层置换注意力权重时表现出显著的性能变化,表明这些架构对注意力确实有依赖。
- 人工标注评估显示,在单序列任务中注意力权重通常是有意义的,但在某些成对序列设置中则不那么如此。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。