This repository contains the code of our ICLR 2022 paper.
Missingness Bias in Model Debugging
Saachi Jain*, Hadi Salman*, Eric Wong, Pengchuan Zhang, Vibhab Vineet, Sai Vemprala, Aleksander Madry
@inproceedings{jain2022missingness,
title={Missingness Bias in Model Debugging},
author={Saachi Jain and Hadi Salman and Eric Wong and Pengchuan Zhang and Vibhav Vineet and Sai Vemprala and Aleksander Madry},
booktitle={International Conference on Learning Representations},
year={2022},
url={https://openreview.net/forum?id=Te5ytkqsnl}
}
All scripts to run the experiments in the paper are in patch_ablation/
.
To generate the patch ablation experiments, run the script run_patch_ablation.py
. For example, to run the basic patch ablation experiments for a ResNet50:
python run_patch_ablation.py --arch resnet50 --out-dir OUT_DIR --methods Saliency_reverse --methods Saliency --ablation-patch-size 16 --saliency-map-pkl model_checkpoints/resnet_50_sal_map.pkl --filler-values 0 0 0 --skip-factor 2
and for a ViT-S:
python run_patch_ablation.py --arch deit_small_resnet_aug --out-dir OUT_DIR --methods Saliency_reverse --methods Saliency --ablation-patch-size 16 --saliency-map-pkl model_checkpoints/resnet_50_sal_map.pkl --filler-values 0 0 0 --skip-factor 2 --use-missingness
Run run_lime.py
to generate LIME explanations for a given image (using either blacking out or dropping tokens for ViTs). Example:
python run_lime.py --out-dir OUTDIR --ablation-patch-size 16 --filler-values 0 0 0 --superpixel-type patches --arch resnet50 --num-perturbations 1000 --batch-size 64
python run_lime.py --out-dir OUTDIR --ablation-patch-size 16 --filler-values 0 0 0 --superpixel-type patches --arch deit_small_resnet_aug --num-perturbations 1000 --batch-size 64 --use-missingness
Run run_lime_ablation.py
to perform the top K ablation test on LIME explanations. Example:
python run_lime_ablation.py --model-name resnet50 --out-pkl OUT_PKL.pkl --lime-pkl LIME_PKL --ablation-patch-size 16 --num-features 50 --feature-skip 2 --superpixel-type patches
python run_lime_ablation.py --model-name deit_small_resnet_aug_missingness --out-pkl OUT_PKL.pkl --lime-pkl LIME_PKL --ablation-patch-size 16 --num-features 50 --feature-skip 2 --superpixel-type patches
We further have the following files on dropbox since they were too large:
-
Superpixels: The SLIC superpixel segmentation maps for experiments in Appendix C.6 and D.2.
-
ResNet-50 Saliency Map: The saliency map used to determine the order of patches removed in Section 3.
-
Model Checkpoints: The checkpoints for models used in this paper,
-
Missingness Results: The data from the saved results of experiments in the paper.
Feel free to raise issues or contact us!