Skip to main content
QUICK REVIEW

[论文解读] On the Interpretability of Attention Networks

Lakshmi Narayan Pandey, Rahul Vashisht|arXiv (Cornell University)|Dec 30, 2022
Explainable Artificial Intelligence (XAI)被引用 4
一句话总结

本文提出了选择性依赖分类(Selective Dependence Classification, SDC)任务以及聚焦-分类注意力模型(Focus-Classify Attention Model, FCAM),以实现对注意力模型可解释性的客观、定量评估。结果表明,标准注意力模型虽具有高准确率但可解释性差,而通过稀疏性诱导方法(如sparsemax)可显著提升可解释性,且不损失准确率。

ABSTRACT

Attention mechanisms form a core component of several successful deep learning architectures, and are based on one key idea: ''The output depends only on a small (but unknown) segment of the input.'' In several practical applications like image captioning and language translation, this is mostly true. In trained models with an attention mechanism, the outputs of an intermediate module that encodes the segment of input responsible for the output is often used as a way to peek into the `reasoning` of the network. We make such a notion more precise for a variant of the classification problem that we term selective dependence classification (SDC) when used with attention model architectures. Under such a setting, we demonstrate various error modes where an attention model can be accurate but fail to be interpretable, and show that such models do occur as a result of training. We illustrate various situations that can accentuate and mitigate this behaviour. Finally, we use our objective definition of interpretability for SDC tasks to evaluate a few attention model learning algorithms designed to encourage sparsity and demonstrate that these algorithms help improve interpretability.

研究动机与目标

  • 定义一个正式的、定量的框架,用于衡量注意力模型中的可解释性,摆脱主观评估。
  • 识别并分析注意力模型在准确率高但可解释性差的错误模式,其根源在于注意力分布错位。
  • 评估各种注意力学习算法(尤其是促进稀疏性的方法)在SDC任务中提升可解释性的有效性。
  • 证明可解释性与准确率是两个独立目标,高准确率并不意味着高可解释性。
  • 通过受控数据集(CIFAR-SDC与合成SDC)提供注意力模型可解释性的实证基准。

提出的方法

  • 提出选择性依赖分类(SDC)问题,一种简化的分类任务,其中仅一个输入片段(即‘前景’)与输出相关。
  • 提出聚焦-分类注意力模型(FCAM),一种两阶段架构:聚焦网络计算注意力权重 α,分类器使用经过注意力加权的输入片段。
  • 通过聚焦得分定义可解释性:真实前景片段 j* 的注意力权重 α_j* 必须高且占主导地位。
  • 使用三项指标量化可解释性:真实占比(FT)、非零元素数(NNZ)以及注意力向量 α 的熵。
  • 采用带稀疏性正则化的损失函数(如熵正则化)以及替代激活函数(sparsemax、球面softmax),以促使注意力集中于真实片段。
  • 在两个数据集上评估模型:合成SDC数据集与CIFAR-SDC,通过重复运行确保统计可靠性。

实验结果

研究问题

  • RQ1我们能否为分类任务中的注意力模型定义一种定量、客观的可解释性度量?
  • RQ2在何种条件下注意力模型可实现高准确率但不可解释?其根本故障模式是什么?
  • RQ3旨在促进稀疏性的注意力学习算法(如sparsemax、熵正则化)是否能在不降低准确率的前提下提升可解释性?
  • RQ4聚焦网络的输入选择(原始输入 vs. 最终隐藏层)如何影响可解释性?
  • RQ5在硬注意力机制中,准确率与可解释性之间是否存在权衡?

主要发现

  • 标准注意力模型(如普通softmax)在CIFAR-SDC上测试准确率高达约95%,但可解释性差,仅约80%的测试样本能通过注意力正确识别真实前景。
  • sparsemax与球面softmax激活函数使真实占比(FT)指标提升超过10个百分点(例如,从81.11%提升至91.43%),表明注意力定位能力显著增强。
  • 熵正则化及其他稀疏性诱导方法虽降低了注意力向量的熵与NNZ,但对FT无显著改善,表明其未能提升可解释性。
  • 使用聚焦网络的最终隐藏层而非原始输入,可在低维合成数据中使FT提升最多达10%,表明特征层面聚合可增强可解释性。
  • 硬注意力模型虽实现高可解释性(FT ≈ 87.63%),但准确率显著下降(74.45%),凸显可解释性与性能之间的强烈权衡。
  • 结果证实,可解释性与准确率是解耦的:模型可高度准确但可解释性差,反之亦然,因此必须显式引入可解释性目标。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。