LIME — Local Interpretable Model-agnostic Explanations — is the library that popularized explaining black-box machine learning predictions one instance at a time. It shows which words, image regions or data fields actually drove a specific prediction, for any classifier, and it has earned about 12,200 stars on GitHub.
LIME’s idea is simple and general: whatever the global model does, its behavior near one prediction can be approximated by a simple, interpretable model. LIME samples perturbed versions of the instance, gets the black box’s predictions for them, and fits a sparse linear model (or decision tree) weighted by proximity — the result is a local explanation a human can read: these words pushed the review toward ‘positive’, these pixels made the model see a dog, these fields drove the credit decision. The library supports tabular data, text and images out of the box, and works with scikit-learn, TensorFlow, PyTorch or any model you can wrap in a prediction function. Introduced in the 2016 paper ‘Why Should I Trust You?’, LIME became foundational explainable-AI infrastructure and a standard teaching tool; the repository was last updated in 2024 and remains the reference implementation.
LIME is completely free and open source under the BSD-2-Clause license. There are no paid tiers; it runs wherever your models run.
LIME is for data scientists and ML engineers who need to debug, audit or communicate model behavior — verifying a classifier uses sensible evidence, explaining individual decisions to stakeholders, or teaching and researching interpretable machine learning.