GithubHelp home page GithubHelp logo

zeruiw / faith-shap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chepingt/faith-shap

0.0 0.0 0.0 10.36 MB

Code release for Faith-Shap: The Faithful Shapley Interaction Index.

Shell 1.50% Python 98.50%

faith-shap's Introduction

Faith-Shap: The Faithful Shapley Interaction Index

This is the code for our JMLR paper "Faith-Shap: The Faithful Shapley Interaction Index".

Compatability

This code is tested on Python3.7 with the following packages:

  • ktrain == 0.25.1
  • tensorflow == 2.1.0
  • transformers == 3.1.0
  • xgboost == 1.6.2
  • h5py == 2.10.0

Instructions

  • To replicate the computational efficiency experiment, run bash run_exp1.sh.
  • solver.py contains our implementation of Faithful Shapley, shapley Taylor, and Shapley interaction indices.
  • To compute Faith-Shap, we first sample each coalition $S \subseteq [d]$ with probability $\propto \frac{d-1}{{d \choose |S|}|S|(d-|S|)}$ in generate_perturbation.py, and solve the constrained regression.
  • example.sh contains an example of applying faith-Shap to generate explanations on Bert trained on IMDB data.

Citation

If you find this code useful, please cite the following paper:

@article{tsai2022faith,
  title={Faith-shap: The faithful shapley shapley interaction index},
  author={Tsai, Che-Ping and Yeh, Chih-Kuan and Ravikumar, Pradeep},
  journal={arXiv preprint arXiv:2203.00870},
  year={2022}
}

faith-shap's People

Contributors

chepingt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.