Skip to main content
QUICK REVIEW

[论文解读] Holistically Explainable Vision Transformers

Moritz Böhle, Mario Fritz|arXiv (Cornell University)|Jan 20, 2023
Explainable Artificial Intelligence (XAI)Computer Science被引用 8
一句话总结

论文引入了 B-cos transformer,旨在通过将每个组件设为动态线性,从而为 Vision Transformer 提供全局、模型内在的解释,能够得到一个依赖输入的整个模型的线性摘要。

ABSTRACT

Transformers increasingly dominate the machine learning landscape across many tasks and domains, which increases the importance for understanding their outputs. While their attention modules provide partial insight into their inner workings, the attention scores have been shown to be insufficient for explaining the models as a whole. To address this, we propose B-cos transformers, which inherently provide holistic explanations for their decisions. Specifically, we formulate each model component - such as the multi-layer perceptrons, attention layers, and the tokenisation module - to be dynamic linear, which allows us to faithfully summarise the entire transformer via a single linear transform. We apply our proposed design to Vision Transformers (ViTs) and show that the resulting models, dubbed Bcos-ViTs, are highly interpretable and perform competitively to baseline ViTs on ImageNet. Code will be made available soon.

研究动机与目标

  • 在注意力图之外,激发对变换器模型进行全局解释的需求。
  • 开发组件为动态线性的变换器,以实现对每个输入的单一线性摘要。
  • 将 ViT 的每个组件(tokenisation、attention、MLP、分类器)设计为在 B-cos 框架内可解释。
  • 引入一种机制来学习编码位置信息的注意力先验,而不牺牲可解释性。
  • 在 ImageNet 上经验性地评估分类性能和解释质量。

提出的方法

  • 将每个 ViT 组件表述为动态线性变换,以获得每个输入的权重矩阵 W(x)。
  • 用 B-cos 对应物替换标准 ViT 组件:B-cos Token、B-cos AttBlock、B-cos MLPBlock 和 B-cos Classifier。
  • 将注意力修改为带有界输出的 B-cos Attention Block,在注意分数前进行层归一化。
  • 使用 MaxOut 与 B-cos 变换来创建可解释的 MLP 块和分类器。
  • 引入加性或乘性注意力先验,以在可学习偏置 B 中编码位置信息。
  • 通过贡献映射 c_k(x) = W(x)^T_k ⊙ x 提供模型内在的解释,将权重与输入联系起来。

实验结果

研究问题

  • RQ1B-cos 设计是否能够为所有 ViT 组件提供全局、可解释的解释?
  • RQ2动态线性 ViT 是否产生有用的、类特异性的贡献来解释其决策?
  • RQ3学习到的注意力先验对准确性与可解释性有何影响?
  • RQ4B-cos ViT 与基线 ViT 在 ImageNet 的准确性和解释质量方面有何比较?
  • RQ5不同的位置信息策略如何影响性能与可解释性?

主要发现

  • B-cos ViT 在 Tiny、Small、Base 三种规模上与基线 ViT 相比,在 ImageNet 上取得具有竞争力的准确性。
  • 乘性注意力偏置先验持续提升 B-cos ViT 的性能。
  • 在评估的配置中,模型内在的解释在定位与扰动度量方面优于事后方法。
  • 由 W(x) 产生的贡献热地图提供详细、类特异的解释,与输入模式一致。
  • 在相同模型上,B-cos 的解释在定位度量方面显著优于基于 Rollout 的事后解释。
  • 定性可视化显示出与模型决策一致的连贯且特征对齐的解释。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。