# CIMI **Repository Path**: Eating_L/cimi ## Basic Information - **Project Name**: CIMI - **Description**: 复现 - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-12 - **Last Updated**: 2024-06-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # A Causal Inspired Explanations for Understanding Black-box Models 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 ## Usage ### 1. run train_bert.py: training black-box model Bert (or use our pre-trained bert model: Download [BERT model](https://drive.google.com/file/d/1rHN8yYOysZ1574dfZ8vBhdfZPnjf7clc/view?usp=sharing) 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. ``` ### 2. run CIMI.py: training the interpreter in CIMI ``` 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. ``` ### 3. run eval.py: evaluating CIMI's performance ``` 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. ```