LIME (Local Interpretable Model-Agnostic Explanations)
An XAI technique that approximates any black-box model locally with an interpretable surrogate model to explain individual predictions.
LIME (Local Interpretable Model-Agnostic Explanations) was introduced by Ribeiro et al. (2016) as one of the first practical, model-agnostic post-hoc explanation methods. It works by perturbing the input around a specific prediction and fitting a simple (linear or decision tree) model to approximate the complex model's local behaviour.
How LIME works: For a prediction to explain, LIME generates a neighbourhood of perturbed inputs (e.g., randomly masking features), gets the model's prediction for each, and fits a simple interpretable model weighted by proximity to the original input. The coefficients of this surrogate model serve as the explanation.
Strengths: Model-agnostic (works with any ML model), fast relative to SHAP for deep models, produces human-readable explanations.
Limitations: Explanations are unstable — running LIME twice on the same prediction may produce slightly different results due to random sampling. The choice of neighbourhood size also affects explanation quality. LIME does not have the theoretical guarantees of SHAP (local accuracy, consistency).
LIME vs. SHAP in practice: In enterprise governance contexts, SHAP is preferred for regulatory documentation due to its mathematical properties. LIME is valuable as a cross-validation tool — if SHAP and LIME agree on the top features for a prediction, the explanation is more credible. Claris's XAI Consensus Engine uses this agreement as a quality signal.