Extended definition
LIME, short for local interpretable model-agnostic explanations, is a method for explaining an individual prediction of any black-box model. The idea, proposed by Ribeiro and colleagues (2016), is local and model-agnostic: to explain why the model classified a specific case, LIME generates many small perturbations around that case, observes how the prediction changes, and fits a simple interpretable model, usually a linear regression, valid only in the neighborhood of that point. The perturbations are weighted by proximity to the original case, so that the linear surrogate captures the model’s local behavior, not its global behavior. The result is a set of weights indicating which features pushed the prediction in each direction, for that case. Guidotti and colleagues (2018), in the review of explanation methods, place LIME among the local model-agnostic explainers, alongside SHAP, and distinguish it from approaches that open the model’s internal structure.
When it applies
LIME applies when one wants to understand a specific decision of a model whose internal logic is opaque, without replacing the model with a simpler one. It applies to any architecture, from forests to deep networks, precisely because it is agnostic. Adadi and Berrada (2018), in the explainable-AI landscape, record LIME among the most-used tools for auditing individual predictions in high-stakes contexts such as credit, health, and justice. It applies well to tabular data, text, and images, with interpretable representations specific to each type: words present, in text, or regions of the image. It applies to dialogue with non-technical parties, offering an intuitive local explanation. And it applies as a complement to SHAP, when a second reading of the same prediction is wanted.
When it does not apply
LIME does not apply as a global explanation: it describes the model’s behavior in the neighborhood of a case, not the whole model, and extrapolating a local explanation into a general rule is misleading. It does not apply when stability is required without care: because it relies on random perturbations, LIME can produce different explanations for the same case across runs, a well-documented fragility. It does not apply without attention to the neighborhood definition and the weighting kernel, which change the result significantly. It does not apply as proof of causality: the weights indicate local association at the model’s decision boundary, not a causal effect in the world. And it does not apply when the linear surrogate cannot approximate a locally very curved boundary, in which case the explanation loses fidelity.
Applications by field
- Credit and risk: explanation of individual approval or denial decisions, required by audit and by regulation.
- Health: justification of a clinical prediction case by case, as support for the professional’s trust in the tool.
- Language processing: highlighting the words that weighed most in a text classification.
- Computer vision: identification of the regions of an image that supported the model’s prediction.
Common pitfalls
The first pitfall is generalizing a local explanation: LIME speaks of one case, and taking its weights as a global rule of the model distorts the reading. The second is ignoring instability: without fixing a seed and repeating, the same prediction may receive divergent explanations. The third is failing to revise the neighborhood and the weighting kernel, parameters that alter the result. The fourth is reading the weights as causality, when they indicate only association at the model’s local boundary. The fifth is trusting a single local explanation without confronting it with another tool, such as SHAP, missing the chance to detect when the linear surrogate failed to approximate the real behavior.