Code implementation for paper Lifelong Explainer for Lifelong Learners at EMNLP 2021, by Xuelin Situ, Sameen Maruf, Ingrid Zukerman, Cecile Paris and Reza Haffari.
- Python version >= 3.6.8
- PyTorch version >= 1.7.0
- HuggingFace transformers version >= 1.2.0
- LIME >= 0.1.1.36
- shap == 0.29.3
-
Train lifelong black-box classifier >> preprocess.train_lifelong_classifier.py
-
Collect explanations from different teachers >> preprocess.collect_teacher_explanations.py
-
Train LLE explainer (also refer to folder hyperparameters) >> lifelongexplanation.py
-
Faithfulness evaluation >> evaluation.compare_faithfulness.py
-
Stability evaluation >> evaluation.compare_stability.py
-
Efficiency evaluation >> evaluation.compare_efficiency.py
-
Ablation Study of Experience Replay:
- Faithfulness >> evaluation.ablation_faithfulness.py
- Stability >> evaluation.ablation_stability.py