This project is for the paper: A Causal Inspired Explanations for Understanding Black-box Models, Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery & Data Mining. 2023.
The code was developed on Python 3.8 and Pytorch 1.12.1
1. run train_bert.py: training black-box model Bert (or use our pre-trained bert model: Download BERT model and put it in the save folder.)
usage: python train_bert.py [--device GPU_ID] [--dataset DATASET_NAME]
arguments:
--device GPU_ID
GPU ID, default is 0.
--dataset DATASET_NAME
support: clickbait, hate, yelp, imdb.
usage: python CIMI.py [--device GPU_ID] [--dataset DATASET_NAME] [--batch_size BATCH_SIZE] --train_stack
arguments:
--device GPU_ID
GPU ID, default is 0.
--dataset DATASET_NAME
support: clickbait, hate, yelp, imdb.
--batch_size BATCH_SIZE
batch size, default is 8.
usage: python eval.py [--device GPU_ID] [--dataset DATASET_NAME]
arguments:
--device GPU_ID
GPU ID, default is 0.
--dataset DATASET_NAME
support: clickbait, hate, yelp, imdb.