Despite the popularity of Vision Transformers (ViTs) and eXplainable AI (XAI), only a few explanation methods have been designed specially for ViTs thus far. They mostly use attention weights of the [CLS] token on patch embeddings and often produce unsatisfactory saliency maps. This paper proposes a novel method for explaining ViTs called ViT-CX. It is based on patch embeddings, rather than attentions paid to them, and their causal impacts on the model output. Other characteristics of ViTs such as causal overdetermination are also considered in the design of ViT-CX. The empirical results show that ViT-CX produces more meaningful saliency maps and does a better job revealing all important evidence for the predictions than previous methods. The explanation generated by ViT-CX also shows significantly better faithfulness to the model. The codes and appendix are available at https://github.com/vaynexie/CausalX-ViT.
翻译:尽管视觉Transformer(ViT)与可解释人工智能(XAI)广受欢迎,但迄今仅有少量解释方法专门针对ViT设计。这些方法大多利用[CLS]标记对图像块嵌入的注意力权重,常常生成欠佳的显著性图。本文提出一种解释ViT的新方法ViT-CX,它基于图像块嵌入(而非对其施加的注意力)及其对模型输出的因果影响。ViT-CX的设计还考虑了因果过度决定等ViT的其他特性。实验结果表明,相比现有方法,ViT-CX能生成更具意义的显著性图,更有效地揭示预测所需的所有关键证据。ViT-CX生成的解释在模型忠实度方面也显著更优。代码与附录可通过https://github.com/vaynexie/CausalX-ViT获取。