Giter VIP home page Giter VIP logo

interpretability-adversarial's Introduction

Improving Interpretability in Medical Imaging Diagnosis using Adversarial Training

License: MIT Python 3.7+

Official code for the NeurIPS 2020 Workshop paper Improving Interpretability in Medical Imaging Diagnosis using Adversarial Training (Andrei Margeloiu, Nikola Simidjievski, Mateja Jamnik, Adrian Weller)

SlidesShare VIDEO presentation

Interpretability results on Gradient and Integrated Gradience of Standard Training vs Adversarial Training (proposed method)

Abstract

We investigate the influence of adversarial training on the interpretability of convolutional neural networks (CNNs), specifically applied to diagnosing skin cancer. We show that gradient-based saliency maps of adversarially trained CNNs are significantly sharper and more visually coherent than those of standardly trained CNNs. Furthermore, we show that adversarially trained networks highlight regions with significant color variation within the lesion, a common characteristic of melanoma. We find that fine-tuning a robust network with a small learning rate further improves saliency maps' sharpness. Lastly, we provide preliminary work suggesting that robustifying the first layers to extract robust low-level features leads to visually coherent explanations.

Getting started

We used python 3.7 for this project. All packge requirements were frozen in requirements.txt

Google Colab (fastest way)

  1. https://colab.research.google.com/
  2. File -> Open notebook -> Github -> paste the link of this repository https://github.com/margiki/Interpretability-Adversarial
  3. Open the /notebooks/evaluate_model.ipynb
  4. Download the trained models and data splits and upload them to your personal Google Drive (you will need to provide the path to your Google Drive in the notebooks)
  5. Enjoy! The scripts automatically installs all package requirements in Google Colab.

Locally:

Download the trained models and data splits and upload them to your personal Google Drive (you will need to provide the path to your Google Drive in the notebooks)

cd PATH_TO_THE_PROJECT
conda create -n robustness python=3.7
pip install requirements.txt

Citation

For attribution in academic contexts, please cite this work as

@article{margeloiu2020adversarial,
	title="Improving Interpretability in Medical Imaging Diagnosis using Adversarial Training",
	author={Andrei {Margeloiu} and Nikola {Simidjievski} and Adrian {Weller} and Mateja {Jamnik}},
	journal="34th Conference in Advances in Neural Information Processing Systems (NeurIPS) Workshop: Medical Imaging meets NeurIPS",
	year="2020"
}

References

The subfolder ./robustness is forked from https://github.com/MadryLab/robustness. I implemented some changes (e.g. run on CPU, custom datasets and models) that were useful in this project.

Known bugs:

There is a (known bug)[pytorch/captum#393] in the Pytorch Captum library v0.2.0, which doesn't rescale the values in the saliency map when they are too small. This makes the display saliency map to be all white. To fix this bug:

  1. Open the file: "captum/attr/_utils/visualization.py"
  2. Delete lines 42-47
  3. Now you solved the bug and can run this project smoothly.

interpretability-adversarial's People

Contributors

andreimargeloiu avatar

Stargazers

Muhammad Junaid Ali avatar Prarita  avatar Wut Hmone Hnin Hlaing aka Alex ~ avatar Wang Bomin avatar

Watchers

Nikola Simidjievski avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.