Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

placeholder

NotificationsYou must be signed in to change notification settings

situsnow/L2E

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code implementation for paperLearning to Explain: Generating Stable Explanations Fast at ACL 2021, by Xuelin Situ, Ingrid Zukerman, Cecile Paris, Sameen Maruf and Reza Haffari.

Requirements and Installation

  • 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

Experiments (steps to replicate the results from the paper)

  1. Collect explanations from different baselines >>preprocess.collect_base_explanations.py

  2. Train L2E explainer (also refer to folder hyperparameters) >>learning2explain.py

  3. Find neighbours for each test example (for stability evaluation):

    • For IMDB_R >>evaluation.find_neighbours_imbdr.py
    • For other datasets >>evaluation.find_neighbours.py
  4. Faithfulness evaluation:

    • Prediction based >>evaluation.compare_faithfulness_agreement.py
    • Confidence based >>evaluation.compare_faithfulness.py
    • Prcision/Recall (for IMDB_R only) >>evaluation.compare_imdbr_faithfulness.py
  5. Stability evaluation:

    • For IMDB_R >>evaluation.compare_imdbr_stability.py
    • For other datasets >>evaluation.compare_stability.py
  6. Efficiency evaluation >>compare_efficiency.py

About

placeholder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp