Inherently Interpretable Models
When a transparent model is enough, and why Cynthia Rudin calls for preferring it in high-stakes decisions.
Common transparent models
| Model | How we read it | Warnings |
|---|---|---|
| Linear and logistic | The coefficients and their signs | Scales must be standardized, and beware of correlation between features |
| A small decision tree | The path of rules | A deep tree loses transparency and is unstable |
| Rule lists | If… then… | May lose some accuracy |
| GAM / EBM | A curve for each feature | Interactions are limited or explicit |
Logistic Regression
$$\log\frac{p}{1-p} = \beta_0 + \sum_j \beta_j x_j$$
\(e^{\beta_j}\) is the odds ratio for a one-unit increase in \(x_j\).
Additive models
$$g(\mathbb{E}[y]) = \beta_0 + f_1(x_1) + f_2(x_2) + \dots$$
# pip install interpret
from interpret.glassbox import ExplainableBoostingClassifier
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
X, y = load_breast_cancer(return_X_y=True, as_frame=True)
X_tr, X_te, y_tr, y_te = train_test_split(X, y, stratify=y, random_state=0)
ebm = ExplainableBoostingClassifier(random_state=0).fit(X_tr, y_tr)
print(ebm.score(X_te, y_te))
# ebm.explain_global() shows the effect curve of each featureRudin's argument
- A post-hoc explanation is an approximation; if it were completely accurate, why not use it as the model?
- In many tabular-data problems the difference in performance is small.
- A transparent model makes errors easier to detect and audit.
This does not apply as easily to raw images and texts, where deep networks clearly outperform; that is why we need the rest of the tools in this track.
Lesson terms
- Generalized additive model
- A model that writes the prediction as a sum of separate functions for each feature, so the effect of each feature can be plotted.
- Odds ratio
- The factor by which the odds of the outcome are multiplied when the feature increases by one unit in logistic regression.
Abstract
Some models are transparent by nature: linear and logistic regression (readable coefficients), small trees and rule lists, and generalized additive models (GAM), which add up simple functions for each feature. On a lot of tabular data their performance comes close to complex models. Rudin called for using transparent models instead of explaining black boxes in high-stakes decisions, because a post-hoc explanation is an approximation that may not be faithful.
Review questions
-
How do we interpret a coefficient of 0.7 for a feature in a logistic regression?
A one-unit increase in the feature multiplies the odds by e^0.7 ≈ 2, holding the other features fixed.
-
What is Rudin's main argument?
In high-stakes decisions we prefer a transparent model with similar performance over an approximate explanation of a black box.
Sources and references
Complete the lesson
You have completed all the lessons in the track! You can now request the track completion certificate.
Request the certificate