Abstract
Recent strides in interpretable machine learning (ML) research reveal that models exploit undesirable patterns in the data to make predictions, which potentially causes harms in deployment. However, it is unclear how we can fix these models. We present our ongoing work, GAM Changer, an open-source interactive system to help data scientists and domain experts easily and responsibly edit their Generalized Additive Models (GAMs). With novel visualization techniques, our tool puts interpretability into action—empowering human users to analyze, validate, and align model behaviors with their knowledge and values. Built using modern web technologies, our tool runs locally in users' computational notebooks or web browsers without requiring extra compute resources, lowering the barrier to creating more responsible ML models.
Introduction: The Actionability Gap in Interpretable ML
In high-stakes fields like healthcare and finance, "black-box" models are often distrusted because their decision-making logic is opaque. While interpretable models like Generalized Additive Models (GAMs) provide transparency, they often reveal a troubling reality: models frequently learn "dangerous" patterns from biased or noisy data.
A classic example in medical ML involves a model predicting that patients with asthma have a lower risk of dying from pneumonia. In reality, asthmatics were admitted to the ICU faster, leading to better outcomes in the training data. If a hospital used that model to triage patients, it might mistakenly send high-risk asthmatics home. The core challenge is actionability. While we have tools to identify these flaws, we have lacked a responsible, accessible way for experts to fix them without retraining the entire model on potentially flawed data.
The GAM Changer System
GAM Changer is a web-based system designed specifically for editing GAMs. GAMs are "glass-box" models where the final prediction is a sum of individual "shape functions" for each feature. This additive nature makes them uniquely suited for surgical edits. The system consists of four primary components:
- GAM Canvas: The primary visualization area where users view shape functions (e.g., how age affects pneumonia risk). Users can directly manipulate these curves using a Context Toolbar to interpolate points, enforce monotonicity, or "zero out" a feature's effect.
- Metric Panel: Provides real-time feedback. As a user modifies a curve, the tool instantly updates performance metrics—such as Accuracy, ROC AUC, and Confusion Matrices—for both the global dataset and specific data slices affected by the edit.
- Feature Panel: Addresses the risk of "whack-a-mole" editing. It uses linking and reordering techniques to show which other features are correlated with the region being edited, helping users spot potential fairness issues or unintended consequences.
- History Panel: A Git-like version control system that tracks every edit, allowing users to compare versions, revert changes, and document their motivations for each modification.
Case Study: Aligning Pneumonia Risk Models
The authors demonstrate the tool using a Pneumonia Risk Dataset (14,199 patients). In one scenario, a doctor identifies that the model originally predicted patients over 100 years old had a lower risk than 80-year-olds, likely due to small sample sizes in the extreme age range. Using the "Align to Left" tool, the doctor set the risk for the 100+ group to match their slightly younger neighbors—a more conservative and medically sound approach.
Furthermore, the doctor addressed the "asthma paradox" by using the Delete tool to remove the predictive effect of asthma entirely. This ensures the model does not assign asthmatics a dangerously low risk score based on treatment-correlated bias. Notably, these edits resulted in negligible drops in global accuracy (e.g., 0.0004), suggesting that aligning a model with domain knowledge often does not require sacrificing predictive power.
Discussion and Future Work
GAM Changer shifts the goal of interpretability from passive understanding to active alignment. By treating model weights like pixels in an image editor, the tool lowers the barrier for domain experts who possess critical knowledge but may not be expert coders.
However, the authors acknowledge risks, such as "over-editing" where users might inadvertently introduce their own biases. Future work will focus on formal observational user studies and exploring how model editing should be audited and regulated in sensitive industries. GAM Changer is available as an open-source tool at https://interpret.ml/gam-changer.
Summary updated