Skip to main content

demo

Project description

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>

Pytorch iAlgebra

Document|Paper|References

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.


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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pytorch_ialgebra-1.0.1-py2.py3-none-any.whl (28.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page