GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
★ Read firstKDD 2016

"Why Should I Trust You?": Explaining the Predictions of Any Classifier

Explain one prediction of any model by nudging its input and fitting a small linear model to what changes. With LIME, users spotted a classifier that keyed on snow instead of wolves.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2016
AUTHORS
Ribeiro, Singh, Guestrin
FROM
University of Washington
PUBLISHED
Feb 2016 · KDD 2016
CITED BY
25,897Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 22% of this breakdown.

01

The paper in one minute

A model can be accurate on its test set for reasons that will not hold in use. The paper's running example is a text classifier separating posts about Christianity from posts about atheism in the 20 Newsgroups dataset: it scores 94% on held-out posts by relying on email headers and author names, and drops to 57% on a new set of web pages. Looking at accuracy alone, you would pick it over a classifier trained on cleaned data that scores lower on the test split but generalizes better.

LIME (Local Interpretable Model-agnostic Explanations) explains individual predictions so a person can catch this. It treats the model as a black box. Around the input being explained, it creates many perturbed versions in a representation people understand: for text, the same document with random subsets of its words removed; for images, the same image with random "superpixel" regions grayed out. It asks the model for a prediction on each, weights each sample by how close it is to the original, and fits a linear model limited to K features. Those K weights, such as "the word 'Posting' pushed toward atheism", are the explanation, and they are meant to be faithful only near that input.

One explanation is not a view of the whole model, and users have limited time. SP-LIME picks a small set of instances whose explanations together cover the features that matter most across the data, without repeating each other, using a greedy algorithm for a submodular objective.

The evaluation has two parts. With simulated users, LIME recovered over 90% of the features that interpretable models actually used, and helped flag untrustworthy predictions and choose between models whose validation accuracy was the same. With real users, Mechanical Turk workers chose the better religion classifier 89% of the time with six SP-LIME explanations, removed non-generalizing words to improve a classifier, and graduate students who saw explanations for a deliberately flawed husky-versus-wolf image classifier noticed that it relied on snow.

THE IDEA, VISUALLY
LOCAL SURROGATE (ALGORITHM 1) one input x to explain perturb switch off parts query model black box f weight and fit closeness kernel, K-feature linear The weights are the explanation; they hold only near x. HUSKY VS WOLF, 27 STUDENTS (TABLE 2) trusted the bad model 10/27 before 3/27 after named snow as the cue 12/27 before 25/27 after PICKED THE BETTER CLASSIFIER (FIGURE 9) greedy 68% random pick 80% submodular LIME 75% random pick 89% submodular arXiv 1602.04938, University of Washington, KDD 2016 OUR RUN: SAME TOP-3 FEATURES IN N OF 10 SEEDS kernel width 0.5 1.0 3.0 100 samples 3/10 5/10 5/10 500 samples 5/10 6/10 9/10 5,000 samples 4/10 10/10 10/10 A model with an interaction (2 x0 x1) and a squared term, explained at one point. Wide kernels and many samples agree with the true local slopes; a narrow kernel leaves few effective samples, and 100 samples gave up to 7 different top-3 sets across seeds. On a sparse linear model over 300 words, the same code recovered 100% of the words the model used.
Left: LIME's local surrogate, and two of the paper's human studies: trust in a deliberately bad husky-versus-wolf model and recognition of its snow cue before and after explanations (Table 2), and how often users picked the better of two text classifiers (Figure 9). Right: our stability test, how many of 10 random seeds gave the same top three features, by number of samples and kernel width.
Research notes: the problem, approach and results
> 90%

recall of the features a sparse logistic regression or decision tree actually used, on books and DVD reviews (Figures 6 and 7)

89%

Mechanical Turk users who chose the classifier that generalized, shown 6 LIME explanations picked by submodular pick (Figure 9)

10 -> 3 of 27

graduate students who trusted a snow-detecting husky-vs-wolf model, before vs after seeing explanations (Table 2)

THE PROBLEM

People are asked to trust models they cannot inspect, and accuracy on a validation set can be high for the wrong reasons, such as leaked headers or background artifacts. Users need a way to see why a single prediction was made, for any kind of model.

THE IDEA

Perturb the input around the instance, for example by removing words or graying out image regions, query the model on each perturbation, weight samples by closeness to the original, and fit a sparse linear model whose few weights explain that one prediction. Pick a small, diverse set of such explanations to summarize the whole model.

THE RESULT

On models whose true features were known, LIME recovered over 90% of them. Non-experts used explanations to pick the classifier that generalized (89% with LIME's chosen examples) even though its test accuracy was lower, and to remove spurious words; graduate students spotted a snow-detecting 'wolf' classifier.

02

Why it matters to an FDE

Explanations catch leakage that accuracy hides. The religion classifier's 94% came from headers and names. Customer data has the same traps: ticket IDs that encode the outcome, a region field that stands in for the label, a template phrase that only appears in one class. Running a handful of local explanations on a new model is a cheap way to find them before launch.

They help customers trust or reject a model for the right reasons. In the paper, users shown explanations stopped trusting a model that keyed on snow. In a deployment review, a few explained examples per segment do more for a skeptical domain expert than another accuracy table.

Model-agnostic matters in practice. LIME needs only a prediction function. It works the same on a gradient-boosted model, a neural network or a hosted model behind an API, which is often all an FDE has.

Explanations are approximations, so test them. Our run shows that one explanation of a nonlinear model can change with the random seed, the number of samples and the kernel width. Fix the seed, use enough samples, check stability, and do not present weights as exact causes.

Pick examples deliberately. The paper's submodular pick beat random examples by 12 to 14 points in helping users choose models. When presenting explanations to a customer, select examples that cover the important features and segments, not the first few rows.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The objective, interpretable features, sampling and weighting, K-LASSO, SP-LIME, results

    Free account
  2. 04How it works

    The weighted objective, sampling and kernels, K-LASSO, SP-LIME coverage, experiment designs

    Premium
  3. 05The numbers that matter

    Faithfulness recall, the model-choice and trust results, the religion and husky studies, and timing

    Premium
  4. 06Try it yourself

    Recompute the studies, build LIME from its equations, test faithfulness, then test stability

    Premium
  5. 07Where it breaks

    Representation limits, local nonlinearity, sensitivity to settings, studies built to succeed

    Premium
  6. 08Using it on a deployment

    Explain in model review, pick covering examples, check stability, document the limits

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →