lrp-pf-auc
Explain Neural Networks using Layer-Wise Relevance Propagation and evaluate the explanations using Pixel-Flipping and Area Under the Curve.
Science Score: 41.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 9 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.1%) to scientific vocabulary
Keywords
Repository
Explain Neural Networks using Layer-Wise Relevance Propagation and evaluate the explanations using Pixel-Flipping and Area Under the Curve.
Basic Info
- Host: GitHub
- Owner: rodrigobdz
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://pypi.org/project/lrp-pf-auc/
- Size: 87.9 MB
Statistics
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Layer-Wise Relevance Propagation
PyTorch implementation of Layer-wise Relevance Propagation (LRP) algorithm together with quantitative evaluation metrics to compare heatmap explanations objectively part of master's thesis In-Depth Hyperparameter Selection For Layer-Wise Relevance Propagation at TU Berlin.
Special thanks to Dr. Grégoire Montavon for his insights, which shaped the development of this project.
Features
Explainability:
- Layer-wise Relevance Propagation (LRP)
Quantitative Evaluation:
- Pixel Flipping (PF), also known as Region Perturbation (RP)
- Perturbation modes:
- inpainting
- random
- Sort objectives:
- most relevant first (MoRF), also known as activation curve
- least relevant first (LRF), also known as pruning curve
- random
- AUC (Area Under the Curve), also known as AUAC (Area Under the Activation Curve) or AU-MSE (Area Under the Mean Squared Error Curve) depending on the sort objective
Showcase
LRP (lrp-tutorial composite) and PF with inpainting perturbation mode and sort objective MoRF.
Classification scores of castle image with inpainting perturbation mode
Number of simultaneous flips per perturbation step during Pixel-Flipping.
PF perturbation mode random
**LRP** ([lrp-tutorial](https://git.tu-berlin.de/gmontavon/lrp-tutorial) composite) and **PF** with **random** perturbation mode and sort objective **MoRF**.
Requirements
python3>= 3.9
Installation
sh
python3 -m pip install lrp-pf-auc
The PyPI distribution lrp-pf-auc provides the following two packages: lrp and pf.
The name lrp-pf-auc stands for Layer-wise Relevance Propagation (LRP), Pixel Flipping (PF), and Area Under the Curve (AUC) respectively.
Usage
Refer to demo.ipynb for an example of Layer-wise Relevance Propagation (LRP), Pixel-Flipping (PF) and Area under the Curve (AUC).
Feel free to check out the Jupyter notebooks under experiments/notebooks for a chronological overview of the project.
Related Projects
- Sequential LRP implementation: gmontavon/lrp-tutorial > Tutorial on how to implement LRP
- Updated version of
gmontavon/lrp-tutorial: rodrigobdz/lrp-tutorial - Forward-hook LRP implementation: chr5tphr/zennit > Implementation of LRP-based methods in PyTorch
innvestigate-based LRP implementation: moboehle/Pytorch-LRP- Caffe-based LRP implementation:
lrp_toolbox - Pixel-Flipping and Region Perturbation implementation: understandable-machine-intelligence-lab/Quantus
Citation
Cite as:
- Plaintext:
Rodrigo Bermúdez Schettino. (2022). rodrigobdz/lrp: v0.1.6 (v0.1.6). Zenodo. https://doi.org/10.5281/zenodo.6821295
- BibTeX:
text
@software{rodrigo_bermudez_schettino_2022_6821295,
author = {Rodrigo Bermúdez Schettino},
title = {rodrigobdz/lrp: v0.1.6},
month = jul,
year = 2022,
publisher = {Zenodo},
version = {v0.1.6},
doi = {10.5281/zenodo.6821295},
url = {https://doi.org/10.5281/zenodo.6821295}
}
Credits
The structure of this readme is based on minimal-readme
Scripts follow Personal Shell Style Guide
The
lrppackage uses two customized files originally from chr5tphr/zennit.The syntax for defining custom composites is inspired by this discussion on
zennit's repo.
This implementation is based on insights from:
- LRP overview paper
G. Montavon, A. Binder, S. Lapuschkin, W. Samek, K.-R. Müller Layer-wise Relevance Propagation: An Overview in Explainable AI: Interpreting, Explaining and Visualizing Deep Learning, Springer LNCS, vol. 11700, 2019
- Original LRP paper
S. Bach, A. Binder, G. Montavon, F. Klauschen, K.-R. Müller, W. Samek On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation PloS ONE 10 (7), e0130140, 2015
License
Owner
- Name: Rodrigo
- Login: rodrigobdz
- Kind: user
- Company: @scantist
- Website: https://www.linkedin.com/in/rodrigobdz/
- Repositories: 17
- Profile: https://github.com/rodrigobdz
Principal Software Engineer at @scantist | @cern alumnus
Citation (CITATION.bib)
@software{rodrigo_bermudez_schettino_2022_6821295,
author = {Rodrigo Bermúdez Schettino},
title = {rodrigobdz/lrp: v0.1.6},
month = jul,
year = 2022,
publisher = {Zenodo},
version = {v0.1.6},
doi = {10.5281/zenodo.6821295},
url = {https://doi.org/10.5281/zenodo.6821295}
}
GitHub Events
Total
- Watch event: 3
Last Year
- Watch event: 3
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Rodrigo Bermudez Schettino | r****z | 393 |
| Rodrigo Bermudez Schettino | r****o@g****m | 241 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 26 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- rodrigobdz (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 41 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
- Total maintainers: 1
pypi.org: lrp-pf-auc
Explain Neural Networks using Layer-Wise Relevance Propagation and evaluate the explanations using Pixel-Flipping and Area Under the Curve.
- Homepage: https://github.com/rodrigobdz/lrp
- Documentation: https://lrp-pf-auc.readthedocs.io/
- License: MIT
-
Latest release: 0.1.6
published over 3 years ago