Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 1.37 KB

File metadata and controls

25 lines (20 loc) · 1.37 KB

Model reconstruction using counterfactual explanations

This repository provides the code for the paper "Model reconstruction using counterfactual explanations: A perspective from polytope theory" by Pasan Dissanayake and Sanghamitra Dutta accepted at NeurIPS 2024.

Experiments

Setup

pip install foolbox
pip install adversarial-robustness-toolbox

Running the experiments

The script examples.sh contains a Bash script for running experiments. For more options, look into main.py.

python main.py --dir ./results/test --dataset heloc --use_balanced_df True --query_size 50 --cfgenerator mccf \
               --num_queries 8--ensemble_size 50 --target_archi 20 10 --surr_archi 20 10

Visualizing results

The experiments generate files containing the queries, models and statistics. To visualize the results, use the Jupyter Notebook visualize.ipynb. The directory results provides some results that are included in the paper.

Acknowledgement

Our code uses the codebase from the paper "Black, E., Wang, Z., Fredrikson, M., & Datta, A., Consistent Counterfactuals for Deep Models, ICLR 2021" from https://github.com/zifanw/consistency.

License

Please see LICENSE.