8000 GitHub - p16i/drsa-demo
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

p16i/drsa-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disentangled Explanations of Neural Network Predictions by Finding Relevant Subspaces (Demo Code)

TPAMI arXiv Unit Test

The repository contains demo code for our paper

P Chormai, J Herrmann, KR Müller, G Montavon, "Disentangled Explanations of Neural Network Predictions by Finding Relevant Subspaces", IEEE TPAMI 2024.


The repository includes two Jupyter notebooks, namely

  1. ./notebooks/demo.ipynb demonstrates our disentangled explanation framework. More specifically, the notebook shows how to obtain disentanged explanations from PRCA and DRSA for class basketball using activation and LRP context vectors from VGG16-TV at Conv4_3. The demonstration reproduces Fig. 1 in the main paper.

  2. ./notebooks/lrp-nfnet.ipynb demonstrates our LRP implementation for NFNet-F0. It reproduces heatmaps similar to the ones in Fig. D.2 in Supplementary Note D.

Remark: Make sure that PYTHONPATH includes $(pwd)/cxai when starting a Jupyter instance. Or, start the instance using PYTHONPATH=$(pwd)/cxai jupyter notebook.

If you find our demo code for your research, please consider citing our paper:

@ARTICLE{10497845,
  author={Chormai, Pattarawat and Herrmann, Jan and Müller, Klaus-Robert and Montavon, Grégoire},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={Disentangled Explanations of Neural Network Predictions by Finding Relevant Subspaces}, 
  year={2024},
  pages={1-18},
  doi={10.1109/TPAMI.2024.3388275}
}

Setup

We use Python version 3.8.6. Necessary dependencies can be installed via

pip install -r requirements.txt

Please run the unit test command below to check that necessary functionalities work.

# testing important functions (approximately 3 minutes on CPUs)
make fast-test

# test all functions (approximately 6 minutes on Tesla V100)
make test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published
0