Pytorch iAlgebra
Pytorch iAlgebra is an interactive interpretation library for deep learning on Pytorch.
Pytorch iAlgebra provides an interactive frame for interpreting a group of deep leanring models using a set of interpretation methods.
iAlgebra Operations
Operators
Identity
$$ [\phi(x)]{i}=\frac{1}{d} \sum{k=0}^{d-1} \mathbb{E}{I{k}}\left[f\left(x_{I_{k} \cup{i}}\right)-f\left(x_{I_{k}}\right)\right] $$
Projection
$$ \left[\Pi_{w}(x)\right]{i}=\left{\begin{array}{cc}{\frac{1}{|w|} \sum{k=0}^{|w|-1} \mathbb{E}{I{k}}\left[f\left(x_{I_{k} \cup{i}}\right)-f\left(x_{I_{k}}\right)\right]} & {i \in w} \ {0} & {i \notin w}\end{array}\right. $$
Selection $$ \left[\sigma_{l}(x)\right]{i}=\left[\phi\left(x ; \bar{x}, f{l}\right)\right]_{i} $$
Join
$$ \left[x \bowtie x^{\prime}\right]{i}=\frac{1}{2}\left([\phi(x ; \bar{x}, f)]{i}+\left[\phi\left(x^{\prime} ; \bar{x}, f\right)\right]_{i}\right) $$
Anti-Join
$$ \left[x \diamond x^{\prime}\right]{i}=\left(\left[\phi\left(x ; x^{\prime}, f\right)\right]{i},\left[\phi\left(x^{\prime} ; x, f\right)\right]_{i}\right) $$
Supportive DNN and Interpretation Models
DNN Models
Model Performance on dataset Mnist
| Dataset | Models | |
|---|---|---|
| Mnist | LeNet-L1 | LeNet-L2 |
| Accuracy | 98.866% | 99.020% |
Model Performance on dataset Cifar10
| Dataset | Models | |
|---|---|---|
| Cifar10 | Vgg19 -L1 | Vgg19-L2 |
| Accuracy | 98.866% | 99.020% |
Interpretation Methods
In detail, we implement the following interpretation methods as the identity in Pytorch-iAlgebra.
-
GradSaliency from Simonyan et al.:Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps (CVPR 2013)
-
SmoothGrad from Smilkov et al.:SmoothGrad: removing noise by adding noise
-
Mask from Fong et al.:Interpretable Explanations of Black Boxes by Meaningful Perturbation (ICCV 2017)
-
GradCam from Selvaraju et al.: Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization (ICCV 2017)
-
GuidedBackpropGrad from Springenberg et al.:Striving for Simplicity: The All Convolutional Net (ICLR 2015)
Installation
Library dependencies for the Pytorch-iAlgebra. Before installation, you need to install these with
$ pip install -r requirements.txt
Then Pytorch-iAlgebra can be installed by:
$ pip install pytorch-ialgebra
Metadata
Release files for pytorch-ialgebra 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytorch_ialgebra-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pytorch_ialgebra-1.0.1-py2.py3-none-any.whl |
Release files / pytorch_ialgebra-1.0.1-py2.py3-none-any.whl
| Download URL | pytorch_ialgebra-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 28.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8811313b615969963f190ad3e9ef1b869fefb051dc2ec1939bff4b0477af0cf5
|
|
BLAKE2b-256 checksum How to use checksums |
89122fa3195c26bd7b4dd3bbb55df51299801ebba4d10b2abe8e751778e8a9c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for pytorch-ialgebra 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.