Skip to content

Commit

Permalink
issue #724 improved link to RISE paper- the conference publicaiton, n…
Browse files Browse the repository at this point in the history
…ot the argxiv one
  • Loading branch information
elboyran committed Apr 17, 2024
1 parent 7d9e813 commit 56be516
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 37 deletions.
5 changes: 2 additions & 3 deletions tutorials/explainers/RISE/rise_imagenet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
"\n",
"This notebook demonstrates how to apply the RISE explainability method on pretrained ImageNet model using a bee image. It visualizes the relevance scores for all pixels/super-pixels by displaying them on the image.<br>\n",
"\n",
"RISE is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates importance empirically by probing the model with randomly masked versions of the input image and obtaining the corresponding outputs.<br>\n",
"\n",
"More details about this method can be found in the paper https://arxiv.org/abs/1806.07421.<br>\n"
"[RISE](http://bmvc2018.org/contents/papers/1064.pdf) is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates importance empirically by probing the model with randomly masked versions of the input image and obtaining the corresponding outputs.<br>\n",
"\n"
]
},
{
Expand Down
26 changes: 3 additions & 23 deletions tutorials/explainers/RISE/rise_mnist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"cells": [
{
"cell_type": "markdown",
"id": "92d7325c",
"metadata": {},
"source": [
"<img width=\"150\" alt=\"Logo_ER10\" src=\"https://user-images.githubusercontent.com/3244249/151994514-b584b984-a148-4ade-80ee-0f88b0aefa45.png\">\n",
Expand All @@ -11,14 +10,11 @@
"\n",
"This notebook demonstrates how to apply the RISE explainability method on a pretrained binary MNIST model using a hand-written digit image. It visualizes the relevance attributions for each pixel/super-pixel by displaying them on top of the input image.<br>\n",
"\n",
"RISE is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates the relevance empirically by probing the model with randomly masked versions of the input image to obtain the corresponding outputs.<br>\n",
"\n",
"More details about this method can be found in the paper https://arxiv.org/abs/1806.07421.<br>"
"[RISE](http://bmvc2018.org/contents/papers/1064.pdf) is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates the relevance empirically by probing the model with randomly masked versions of the input image to obtain the corresponding outputs.<br>"
]
},
{
"cell_type": "markdown",
"id": "293e83ff",
"metadata": {},
"source": [
"### Colab Setup"
Expand All @@ -27,7 +23,6 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "8d3eb1d8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -46,7 +41,6 @@
},
{
"cell_type": "markdown",
"id": "fc18a3f6",
"metadata": {},
"source": [
"### Libraries"
Expand All @@ -55,7 +49,6 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "84d588b8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -73,7 +66,6 @@
},
{
"cell_type": "markdown",
"id": "c15254cf",
"metadata": {},
"source": [
"#### 1 - Loading the model and the dataset\n",
Expand All @@ -82,7 +74,6 @@
},
{
"cell_type": "markdown",
"id": "f7ee0349",
"metadata": {},
"source": [
"Load saved binary MNIST data."
Expand All @@ -91,7 +82,6 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "dde4c313",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -104,7 +94,6 @@
},
{
"cell_type": "markdown",
"id": "4de48ca0",
"metadata": {},
"source": [
"Load the pretrained binary MNIST model and define a model runner."
Expand All @@ -113,7 +102,6 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "7f3d743e",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -134,7 +122,6 @@
},
{
"cell_type": "markdown",
"id": "1060bb89",
"metadata": {},
"source": [
"Print class and image of a single instance in the test data for preview."
Expand All @@ -143,7 +130,6 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "3828b316",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -187,7 +173,6 @@
},
{
"cell_type": "markdown",
"id": "ec223bf7",
"metadata": {},
"source": [
"#### 2 - Compute and visualize the relevance attributions\n",
Expand All @@ -196,7 +181,6 @@
},
{
"cell_type": "markdown",
"id": "c9eed64b",
"metadata": {},
"source": [
"RISE masks random portions of the input image and passes the masked image through the model — the portion that decreases the accuracy the most is the most “important” portion.<br>\n",
Expand All @@ -206,7 +190,6 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "87d79611",
"metadata": {},
"outputs": [
{
Expand All @@ -226,7 +209,6 @@
},
{
"cell_type": "markdown",
"id": "305412e3",
"metadata": {},
"source": [
"Visualize the relevance scores for the predicted class on top of the image."
Expand All @@ -235,7 +217,6 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "a61a1f43",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -263,7 +244,6 @@
},
{
"cell_type": "markdown",
"id": "4b661037",
"metadata": {},
"source": [
"#### 3 - Conclusions\n",
Expand All @@ -275,7 +255,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -289,7 +269,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
4 changes: 1 addition & 3 deletions tutorials/explainers/RISE/rise_text.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"### Interpreting a movie review sentiment model with RISE\n",
"This notebook demonstrates the use of DIANNA with the RISE method on the [Stanford Sentiment Treebank dataset](https://nlp.stanford.edu/sentiment/index.html) which contains one-sentence movie reviews. See also [their paper](https://nlp.stanford.edu/~socherr/EMNLP2013_RNTN.pdf). A pre-trained neural network classifier is used, which identifies whether a movie review is positive or negative.\n",
"\n",
"RISE is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates each word's relevance to the model's decision empirically by probing the model with randomly masked versions of the input image and obtaining the corresponding outputs. \n",
"\n",
"More details about this method can be found in the paper https://arxiv.org/abs/1806.07421.\n",
"[RISE](http://bmvc2018.org/contents/papers/1064.pdf) is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates each word's relevance to the model's decision empirically by probing the model with randomly masked versions of the input image and obtaining the corresponding outputs. \n",
"\n",
"*NOTE*: This tutorial is still work-in-progress, the final results need to be improved by tweaking the RISE parameters"
]
Expand Down
4 changes: 1 addition & 3 deletions tutorials/explainers/RISE/rise_timeseries_frb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"### Model interpretation using RISE for astronomical timeseries data\n",
"This notebook shows how to apply the RISE explainability method on a model trained to classify Fast Radio Burst (FRB) timeseries data. The model is a binary classifier that classifies the input as either noise or a real FRB.<br>\n",
"\n",
"RISE is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates the relevance empirically by probing the model with randomly masked versions of the input image to obtain the corresponding outputs.<br>\n",
"\n",
"More details about this method can be found in the paper https://arxiv.org/abs/1806.07421.<br>"
"[RISE](http://bmvc2018.org/contents/papers/1064.pdf) is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates the relevance empirically by probing the model with randomly masked versions of the input image to obtain the corresponding outputs.<br>"
]
},
{
Expand Down
8 changes: 3 additions & 5 deletions tutorials/explainers/RISE/rise_timeseries_weather.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"\n",
"It visualizes the relevance attributions for each segmentation of timeseries by displaying them on top of the timeseries.<br>\n",
"\n",
"RISE is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates the relevance empirically by probing the model with randomly masked versions of the input image to obtain the corresponding outputs.<br>\n",
"\n",
"More details about this method can be found in the paper https://arxiv.org/abs/1806.07421.<br>"
"[RISE](http://bmvc2018.org/contents/papers/1064.pdf) is short for Randomized Input Sampling for Explanation of Black-box Models. It estimates the relevance empirically by probing the model with randomly masked versions of the input image to obtain the corresponding outputs.<br>"
]
},
{
Expand Down Expand Up @@ -1100,7 +1098,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1114,7 +1112,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.7.3"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 56be516

Please sign in to comment.