Causality for Inherently Explainable Transformers: CAT-XPLAIN

Subash Khanal, Benjamin Brodie, Xin Xing, Ai-Ling Lin, Nathan Jacobs
6/29/2022
cs.CVcs.AIcs.LG
transformer-attention

Official code: mvrl/CAT-XPLAIN (4 stars, Python, last commit 2026-05-24).

Abstract

There have been several post-hoc explanation approaches developed to explain pre-trained black-box neural networks. However, there is still a gap in research efforts toward designing neural networks that are inherently explainable.

Show full abstract

In this paper, we utilize a recently proposed instance-wise post-hoc causal explanation method to make an existing transformer architecture inherently explainable. Once trained, our model provides an explanation in the form of top-$k$ regions in the input space of the given instance contributing to its decision. We evaluate our method on binary classification tasks using three image datasets: MNIST, FMNIST, and CIFAR. Our results demonstrate that compared to the causality-based post-hoc explainer model, our inherently explainable model achieves better explainability results while eliminating the need of training a separate explainer model. Our code is available at https://github.com/mvrl/CAT-XPLAIN.

View on arXivView PDF

Code Implementations(1)

mvrl/CAT-XPLAINOfficial100%
40Python, ShellJan 21, 20226 months ago

Similar Papers

Cite this paper

@article{khanal2022causality,
  title  = {Causality for Inherently Explainable Transformers: CAT-XPLAIN},
  author = {Subash Khanal and Benjamin Brodie and Xin Xing and Ai-Ling Lin and Nathan Jacobs},
  year   = {2022},
  eprint = {2206.14841},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.14841}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.14841.svg)](https://codeofpaper.com/paper/2206.14841)

Discussion