lrp-pf-auc

Explain Neural Networks using Layer-Wise Relevance Propagation and evaluate the explanations using Pixel-Flipping and Area Under the Curve.

https://github.com/rodrigobdz/lrp

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

activation-curve area-under-curve au-mse auac dataloader ilsvrc2012 imagenet-dataset layer-wise-relevance-propagation lrp pf pixel-flipping pruning-curve pytorch qualitative-evaluation quantitative-evaluation region-perturbation xai xai-library
Last synced: 6 months ago · JSON representation ·

Repository

Explain Neural Networks using Layer-Wise Relevance Propagation and evaluate the explanations using Pixel-Flipping and Area Under the Curve.

Basic Info
Statistics
  • Stars: 16
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
activation-curve area-under-curve au-mse auac dataloader ilsvrc2012 imagenet-dataset layer-wise-relevance-propagation lrp pf pixel-flipping pruning-curve pytorch qualitative-evaluation quantitative-evaluation region-perturbation xai xai-library
Created about 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

Layer-Wise Relevance Propagation

DOI PyPI Version License

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**.

Classification scores of castle image with random perturbation mode

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

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

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

MIT © rodrigobdz

Owner

  • Name: Rodrigo
  • Login: rodrigobdz
  • Kind: user
  • Company: @scantist

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

All Time
  • Total Commits: 634
  • Total Committers: 2
  • Avg Commits per committer: 317.0
  • Development Distribution Score (DDS): 0.38
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 41 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 25.5%
Average: 30.3%
Forks count: 30.5%
Dependent repos count: 30.6%
Downloads: 58.5%
Maintainers (1)
Last synced: 6 months ago