Interactive Visualization to empower domain experts to align ML model behaviors with their knowledge.

Overview

An interactive visualization system designed to helps domain experts responsibly edit Generalized Additive Models (GAMs).

build pypi license arxiv badge

For more information, check out our manuscript:

GAM Changer: Editing Generalized Additive Models with Interactive Visualization. Zijie J. Wang, Alex Kale, Harsha Nori, Peter Stella, Mark Nunnally, Duen Horng Chau, Mihaela Vorvoreanu, Jennifer Wortman Vaughan, Rich Caruana. Research2Clinics Workshop at NeurIPS, 2021.

Live Demo

For a live demo, visit: http://interpret.ml/gam-changer/

Running Locally

Clone or download this repository:

git clone [email protected]:interpretml/gam-changer.git

# use degit if you don't want to download commit histories
degit interpretml/gam-changer.git

Install the dependencies:

npm install

Then run GAM Changer:

npm run dev

Navigate to localhost:5000. You should see GAM Changer running in your browser :)

Credits

GAM Changer is created by Jay Wang, Alex Kale, Harsha Nori, Peter Stella, Mark Nunnally, Polo Chau, Mickey Vorvoreanu, Jenn Wortman Vaughan, and Rich Caruana, which was the result of a research collaboration between Microsoft Research, NYU Langone Health, Georgia Tech and University of Washington. Jay Wang and Alex Kale were summer interns at Microsoft Research.

We thank Steven Drucker, Adam Fourney, Saleema Amershi, Dean Carignan, Rob DeLine, and the InterpretML team for their support and constructive feedback.

Citation

@article{wangGAMChangerEditing2021,
  title = {{{GAM Changer}}: {{Editing Generalized Additive Models}} with {{Interactive Visualization}}},
  shorttitle = {{{GAM Changer}}},
  author = {Wang, Zijie J. and Kale, Alex and Nori, Harsha and Stella, Peter and Nunnally, Mark and Chau, Duen Horng and Vorvoreanu, Mihaela and Vaughan, Jennifer Wortman and Caruana, Rich},
  year = {2021},
  month = dec,
  journal = {arXiv:2112.03245 [cs]},
  url = {https://interpret.ml/gam-changer},
  archiveprefix = {arXiv}
}

License

The software is available under the MIT License.

Contact

If you have any questions, feel free to open an issue or contact Jay Wang.

Comments
  • GAMChanger fails to load data in some cases

    GAMChanger fails to load data in some cases

    I've found a bug where GAMChanger sometimes doesn't populate the 'metrics' / 'feature' / 'history' panel. It seems that when this happens, the GAMChanger interface has failed to load the validation samples, because the status bar says "0/0 validation samples selected".

    This seems to occur sometimes based on the data that is provided, and might have something to do with missing data points, but I'm struggling to figure out exactly what the cause is.

    ~Below is the smallest reproducing example I can come up with.~

    See following comment for a better MWE.

    
    import pandas as pd
    import gamchanger as gc
    from interpret.glassbox import ExplainableBoostingRegressor
    
    # Works
    X = pd.read_csv('demo-X-succeed.csv')
    y = pd.read_csv('demo-y-succeed.csv')['OrderedFractionOfEstate']
    
    # Doesn't work
    #X = pd.read_csv('demo-X-fail.csv')
    #y = pd.read_csv('demo-y-fail.csv')['OrderedFractionOfEstate']
    
    ebm = ExplainableBoostingRegressor(interactions=False)
    ebm.fit(X, y)
    
    gc.visualize(ebm, X, y)
    

    ~I've attached the CSV files, which differ in that the 'succeed' files have a single extra data point. That is, when loading 'demo-[X|y]-fail.csv' the GamChanger interface loads, but the side panel doesn't populate (unexpected behaviour). When loading 'demo-[X|y]-succeed.csv', the GamChanger interface loads and the side panel populates the metrics as expected.~

    demo-X-fail.csv demo-X-succeed.csv demo-y-fail.csv demo-y-succeed.csv

    opened by aaronsnoswell 9
  • Option to make the Contribution Scores more Interpretable

    Option to make the Contribution Scores more Interpretable

    In several domains, Contribution Scores/Shape Functions have real world meaning. It would be useful to visualise these learned shape functions on their correct scale.

    For example, when using an EBM to predict the effects of a individual Air Handler Unit's (AHU) heating valve on the energy used by an attached boiler system, these shape fucntions approximate the efficiency of the AHU. E.g. for each 1% increase in valve openness, 0.2kWh increase in energy usage. However, as you can see, the predicted values are in kWh (energy). In this domain, negative energy doesn't make sense, and then using 0% valve openess, we would expect 0 extra heat usage. Therefore, the ability to rescale the shape function so that it is non-negative (in this case) would be really useful for stateholder understanding and model interpretation.

    opened by joshdunnlime 3
  • End bins cannot be interpolated, extrapolated or split

    End bins cannot be interpolated, extrapolated or split

    When using GAM Changer on the outer/end bins, you cannot split these bins into extra bins. Also, as you cannot split this bin, it seems you cannot make a steped interpolation (either monotonic increasing or decreasing).

    Finally, it would be really useful to be able to increase the domain of the EBM past the upper (lower) most value in the training domain. These are likely to be the times expert knowledge is going to be most useful, when the model cannot "see" the data.

    P.s. Amazing work. This is soooo useful ⭐⭐⭐⭐⭐

    opened by joshdunnlime 3
  • Version 0.1.4 breaks gam-changer-adult.ipynb notebook

    Version 0.1.4 breaks gam-changer-adult.ipynb notebook

    Hello,

    There is a check for nans in 0.1.4 (line 268 of gamchanger.py) that breaks on string values. If I use version 0.1.3, the notebook still works. I think columns of string type should be encoded before this check.

    Thanks, Jessica

    [/usr/local/lib/python3.7/dist-packages/gamchanger/gamchanger.py](https://localhost:8080/#) in get_sample_data(ebm, x_test, y_test, resort_categorical)
        266 
        267     # Drop all rows with any NA values
    --> 268     if np.isnan(x_test_copy).any():
        269         na_row_indexes = np.isnan(x_test_copy).any(axis=1)
        270         x_test_copy = x_test_copy[~na_row_indexes]
    
    TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
    
    opened by msplants 2
  • Insufficient Zoom

    Insufficient Zoom

    I don't know if this is a bug or if the zoom is just limited, but when I try to modify the function for some features that are long-tailed distributed, the points end up overlapping, and I cannot continue using the interface. 🤔

    When displaying the explanations from the interpret package, this doesn't happen because plotly has an 'infinite' zoom-in.

    opened by mnaR99 1
  • Fix feature selection when no continuous features are available

    Fix feature selection when no continuous features are available

    I've got a model that has no continuous features. When I use the GAM changer, it fails to initialize the GAM view in the middle of the screen. This PR fixes the behavior so it chooses a categorical feature if no continuous features are available in the dropdown.

    opened by wmeints 0
Owner
InterpretML
If a tree fell in your random forest, would anyone notice?
InterpretML
Align before Fuse: Vision and Language Representation Learning with Momentum Distillation

This is the official PyTorch implementation of the ALBEF paper [Blog]. This repository supports pre-training on custom datasets, as well as finetuning on VQA, SNLI-VE, NLVR2, Image-Text Retrieval on MSCOCO and Flickr30k, and visual grounding on RefCOCO+. Pre-trained and finetuned checkpoints are released.

Salesforce 805 Jan 9, 2023
Gapmm2: gapped alignment using minimap2 (align transcripts to genome)

gapmm2: gapped alignment using minimap2 This tool is a wrapper for minimap2 to r

Jon Palmer 2 Jan 27, 2022
Variational Attention: Propagating Domain-Specific Knowledge for Multi-Domain Learning in Crowd Counting (ICCV, 2021)

DKPNet ICCV 2021 Variational Attention: Propagating Domain-Specific Knowledge for Multi-Domain Learning in Crowd Counting Baseline of DKPNet is availa

null 19 Oct 14, 2022
This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their coordinates and detected labels.

This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their

Liron Bdolah 8 May 22, 2022
[IJCAI-2021] A benchmark of data-free knowledge distillation from paper "Contrastive Model Inversion for Data-Free Knowledge Distillation"

DataFree A benchmark of data-free knowledge distillation from paper "Contrastive Model Inversion for Data-Free Knowledge Distillation" Authors: Gongfa

ZJU-VIPA 47 Jan 9, 2023
Official PyTorch implementation of MX-Font (Multiple Heads are Better than One: Few-shot Font Generation with Multiple Localized Experts)

Introduction Pytorch implementation of Multiple Heads are Better than One: Few-shot Font Generation with Multiple Localized Expert. | paper Song Park1

Clova AI Research 97 Dec 23, 2022
Tutel MoE: An Optimized Mixture-of-Experts Implementation

Project Tutel Tutel MoE: An Optimized Mixture-of-Experts Implementation. Supported Framework: Pytorch Supported GPUs: CUDA(fp32 + fp16), ROCm(fp32) Ho

Microsoft 344 Dec 29, 2022
EMNLP 2021: Single-dataset Experts for Multi-dataset Question-Answering

MADE (Multi-Adapter Dataset Experts) This repository contains the implementation of MADE (Multi-adapter dataset experts), which is described in the pa

Princeton Natural Language Processing 68 Jul 18, 2022
EMNLP 2021: Single-dataset Experts for Multi-dataset Question-Answering

MADE (Multi-Adapter Dataset Experts) This repository contains the implementation of MADE (Multi-adapter dataset experts), which is described in the pa

Princeton Natural Language Processing 39 Oct 5, 2021
This package implements THOR: Transformer with Stochastic Experts.

THOR: Transformer with Stochastic Experts This PyTorch package implements Taming Sparsely Activated Transformer with Stochastic Experts. Installation

Microsoft 45 Nov 22, 2022
Pytorch implementation of paper: "NeurMiPs: Neural Mixture of Planar Experts for View Synthesis"

NeurMips: Neural Mixture of Planar Experts for View Synthesis This is the official repo for PyTorch implementation of paper "NeurMips: Neural Mixture

James Lin 101 Dec 13, 2022
Interactive Terraform visualization. State and configuration explorer.

Rover - Terraform Visualizer Rover is a Terraform visualizer. In order to do this, Rover: generates a plan file and parses the configuration in the ro

Tu Nguyen 2.3k Jan 7, 2023
Character-Input - Create a program that asks the user to enter their name and their age

Character-Input Create a program that asks the user to enter their name and thei

PyLaboratory 0 Feb 6, 2022
Implementation for the EMNLP 2021 paper "Interactive Machine Comprehension with Dynamic Knowledge Graphs".

Interactive Machine Comprehension with Dynamic Knowledge Graphs Implementation for the EMNLP 2021 paper. Dependencies apt-get -y update apt-get instal

Xingdi (Eric) Yuan 19 Aug 23, 2022
TF2 implementation of knowledge distillation using the "function matching" hypothesis from the paper Knowledge distillation: A good teacher is patient and consistent by Beyer et al.

FunMatch-Distillation TF2 implementation of knowledge distillation using the "function matching" hypothesis from the paper Knowledge distillation: A g

Sayak Paul 67 Dec 20, 2022
Source Code for our paper: Understand me, if you refer to Aspect Knowledge: Knowledge-aware Gated Recurrent Memory Network

KaGRMN-DSG_ABSA This repository contains the PyTorch source Code for our paper: Understand me, if you refer to Aspect Knowledge: Knowledge-aware Gated

XingBowen 4 May 20, 2022
UmlsBERT: Clinical Domain Knowledge Augmentation of Contextual Embeddings Using the Unified Medical Language System Metathesaurus

UmlsBERT: Clinical Domain Knowledge Augmentation of Contextual Embeddings Using the Unified Medical Language System Metathesaurus General info This is

null 71 Oct 25, 2022
Large-scale open domain KNOwledge grounded conVERsation system based on PaddlePaddle

Knover Knover is a toolkit for knowledge grounded dialogue generation based on PaddlePaddle. Knover allows researchers and developers to carry out eff

null 607 Dec 31, 2022
[NeurIPS-2021] Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data

MosaicKD Code for NeurIPS-21 paper "Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data" 1. Motivation Natural images share common l

ZJU-VIPA 37 Nov 10, 2022