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.
pip install foolbox
pip install adversarial-robustness-toolbox
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
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.
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.
Please see LICENSE.