lixingqiao / XAI_Transformers

Official Code Implementation of the paper : XAI for Transformers: Better Explanations through Conservative Propagation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Official Code Implementation of The Paper : XAI for Transformers: Better Explanations through Conservative Propagation

For the SST-2 and IMDB expermints follow the following instructions :


- For reproducing the results over SST-2 dataset , please run the following :
$ python /sst2/run_sst.py
  • This will yield the following files:
    • all_flips_pruning.p , all_flips_generate.p
    • These pickle files can be loaded inside the notebook "paper_plots" to generate the pertubation plots reported in the paper.
  • For IMDB dataset, the starting code can be found at /imdb/run_imdb.py
    • Follow the same instructions of SST-2 dataset above.

About

Official Code Implementation of the paper : XAI for Transformers: Better Explanations through Conservative Propagation

License:MIT License


Languages

Language:Jupyter Notebook 74.4%Language:Python 25.6%