Coder Social home page Coder Social logo

expl_perf_drop's Introduction

"Why did the Model Fail?": Attributing Model Performance Changes to Distribution Shifts

A method to attribute model performance changes to distribution shifts in causal mechanisms. For more details please see our ICML 2023 paper.

Installation

Our package is available on PyPI. Simply run the following with Python >= 3.7:

pip install expl_perf_drop

Usage

We provide the following examples as Jupyter Notebooks:

  1. Spurious Synthetic Example
  2. More to come!

Reproducing the Paper

If reproducing the experiments in the paper, we recommend creating a separate Conda environment:

git clone https://github.com/MLforHealth/expl_perf_drop
cd expl_perf_drop/
conda env create -f environment.yml
conda activate expl_perf_drop

To reproduce the experiments in the paper which involve training grids of models and then generating explanations for them, use sweep.py as follows:

python -m expl_perf_drop.sweep launch \
    --experiment {experiment_name} \
    --output_dir {output_root} \
    --command_launcher {launcher} 

where:

  • experiment_name corresponds to experiments defined as classes in experiments.py
  • output_root is a directory where experimental results will be stored.
  • launcher is a string corresponding to a launcher defined in scripts/launchers.py (i.e. slurm or local).

The train_model experiment should be ran first. The remaining experiments can be ran in any order.

Alternatively, a single explanation can also be generated by calling explain.py with the appropriate arguments.

Acknowledgements

The CausalGAN portion of our CelebA experiment is heavily based on an experiment in the parametric-robustness-evaluation codebase. Our Shapley Value estimation functions are taken from the DoWhy package.

Citation

If you use this code or package in your research, please cite the following publication:

@inproceedings{zhang2023did,
  title={"Why did the Model Fail?": Attributing Model Performance Changes to Distribution Shifts},
  author={Zhang, Haoran and Singh, Harvineet and Ghassemi, Marzyeh and Joshi, Shalmali},
  booktitle={International Conference on Machine Learning},
  year={2023}
}

expl_perf_drop's People

Contributors

hzhang0 avatar

Stargazers

Liang Ruobing avatar Fengchun Qiao avatar ChrisXue avatar  avatar  avatar

Watchers

Marzyeh Ghassemi avatar Nathan Ng avatar  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.