Code for our paper Invertible Concept-based Explanations for CNN Models with Non-negative Concept Activation Vectors published in AAAI 2021
It's a powerful CNN explanation framework. It learns domain related concepts based on given datasets and provide both global (class level) and local (instance level) explanations. Learned concepts could be easily understanded by human.
Two Colab jupyter notebook demos are available. In ImageNet.ipynb, you can have fun with different dog concepts and explanations from torchvision pretrained models.
If you want a guide for your own model and dataset, have a try with MNIST.ipynb.
You need to install graphviz for explanation visualization. It could not be installed with pip or conda.
It's a pytorch based implement. All dependent packages are included in requirements.txt
pip install -r requirements.txt