All Projects → BioroboticsLab → Iba Paper Code

BioroboticsLab / Iba Paper Code

Code for the Paper "Restricting the Flow: Information Bottlenecks for Attribution"

Projects that are alternatives of or similar to Iba Paper Code

Niwidgets
Neuroimaging widgets for jupyter notebooks
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Codingworkshops
Programming challenges for python, webdev, data science Python Project Night
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Sudo rm rf
Code for SuDoRm-Rf networks for efficient audio source separation. SuDoRm-Rf stands for SUccessive DOwnsampling and Resampling of Multi-Resolution Features which enables a more efficient way of separating sources from mixtures.
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Anomaly detection for cern
This is code for my CERN presentation
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Tutorials 2017
Geophysical Tutorials column for 2017
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Pysparkgeoanalysis
🌐 Interactive Workshop on GeoAnalysis using PySpark
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Deeplabv3p gluon
DeepLab v3+ in MXNet Gluon
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Icpr2020dfdc
Video Face Manipulation Detection Through Ensemble of CNNs
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Hmms
Continuous-time Hidden Markov Model
Stars: ✭ 62 (-3.12%)
Mutual labels:  jupyter-notebook
Recsyspuc 2020
Material del curso de Sistemas Recomendadores IIC3633 PUC Chile
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Ipybind
IPython / Jupyter integration for pybind11
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
How to make a tensorflow image classifier live
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Pizzafire
Run your own DeepStyle factory on the cloud.
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Openmomo
Sounding Rocket "MOMO"
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Learners Space
This repository contains all the content for these courses to be covered in Learner's Space -
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Relaynet pytorch
Pytorch Implementation of retinal OCT Layer Segmentation (with trained models)
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Deep3dpose
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Xcos
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Decisiveml
Machine learning end-to-end research and trade execution
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Deeplearning Nlp Models
A small, interpretable codebase containing the re-implementation of a few "deep" NLP models in PyTorch. Colab notebooks to run with GPUs. Models: word2vec, CNNs, transformer, gpt.
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook

Code for the Paper "Restricting the Flow: Information Bottlenecks for Attribution"

For an easy-to-use implementation (nice API, examples & documentatio), see BioroboticsLab/IBA.

This is the source code for the paper "Restricting the Flow: Information Bottlenecks for Attribution" accepted as an Oral at ICLR2020.

Example GIF
Iterations of the Per-Sample Bottleneck

Setup

  1. Clone this repository:

    $ git clone https://github.com/attribution-bottleneck/attribution-bottleneck-pytorch.git && cd attribution-bottleneck-pytorch
    
  2. Create a conda environment with all packages:

    $ conda create -n new environment --file requirements.txt
    
  3. Using your new conda environment, install this repository with pip:

    $ pip install .
    
  4. Download the model weights from the release page and unpack them in the repository root directory:

    $ tar -xvf bottleneck_for_attribution_weights.tar.gz
    

Optional:

  1. If you want to retrain the Readout Bottleneck, place the imagenet dataset under data/imagenet. You might just create a link with ln -s [image dir] data/imagenet.

  2. Test it with:

    $ python ./scripts/eval_degradation.py resnet50 8 Saliency test
    

Usage

We provide some jupyter notebooks to demonstrate the usage of both per-sample and readout bottleneck.

  • example_per-sample.ipynb : Usage of the Per-Sample Bottleneck on an example image
  • example_readout.ipynb : Usage of the Readout Bottleneck on an example image
  • compare_methods.ipynb : Visually compare different attribution methods on an example image

Scripts

The scripts to reproduce our evaluation can be found in the scripts directory. Following attributions are implemented:

For the bounding box task, replace the model with either vgg16 or resnet50.

$eval_bounding_boxes.py [model] [attribution]

For the degradation task, you also have specify the tile size. In the paper, we used 8 and 14.

$ eval_degradation.py [model] [tile size] [attribution]

The results on sensitivity-n can be calculated with:

eval_sensitivity_n.py [model] [tile size] [attribution]

Citation

If you use this code, please consider citing our work:

@inproceedings{
schulz2020iba,
title={Restricting the Flow: Information Bottlenecks for Attribution},
author={Schulz, Karl and Sixt, Leon and Tombari, Federico and Landgraf, Tim},
booktitle={International Conference on Learning Representations},
year={2020},
url={https://openreview.net/forum?id=S1xWh1rYwB}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].