Explain a loan denial with LIME or SHAP
local explainability and its limits.
LIME fits a local surrogate, SHAP attributes the prediction across features via Shapley values, both give per-feature contributions.
What's really being asked
Whether you can generate an explanation for one specific prediction from an opaque model and, critically, whether you understand that post-hoc attributions are approximations, not ground-truth reasoning, which matters for high-stakes lending decisions.
The full answer
For a single denied application, both LIME and SHAP produce per-feature contributions. LIME works locally by perturbing the applicant's features, querying the black-box model on those perturbed points, weighting them by closeness to the original, and fitting a simple interpretable model such as sparse linear regression to approximate the decision boundary in that neighborhood. Its coefficients become the explanation. SHAP is grounded in cooperative game theory, treating each feature as a player and assigning Shapley values that fairly distribute the difference between this prediction and a baseline across all features, with desirable properties like local accuracy and consistency. You could tell the stakeholder which factors, such as high debt-to-income ratio and short credit history, pushed the score toward denial and by how much.
The mistakes people make
Presenting the attributions as the model's actual causal reasoning, or as legally sufficient adverse-action reasons without validation. Ignoring that LIME explanations can be unstable across runs and sensitive to the perturbation and neighborhood settings.
What usually comes next
Why can two LIME runs disagree? How does SHAP handle correlated features? Are these explanations sufficient for regulatory adverse-action notices?
A concrete example
For one rejected applicant, SHAP shows debt-to-income contributed most to the denial, followed by recent missed payments, while income pushed slightly toward approval. The analyst presents these contributions but cautions that they approximate the model's behavior locally and can shift if the input changes, so they guide understanding rather than prove causation.
Interview question
What is a key limitation of presenting a LIME explanation as the reason a model denied a loan?
- a.It is a local approximation that can be unstable, not the model's true internal reasoningCorrect
- b.LIME requires retraining the original model from scratch
- c.LIME explanations are always identical to SHAP values
- d.LIME can only explain image models, not tabular data
Why? this is the answer
LIME fits a local surrogate that approximates behavior near one point and can vary across runs, so it is not ground-truth reasoning. It works on tabular data and does not retrain the model.
Just read this? Test yourself on what you have been reading.
Read the original → arxiv.org
- #explainability
- #shap
- #lime
- #interpretability
- #fairness
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles