Key takeaways
A model can predict accurately without relying on appropriate or stable relationships.
Global explanations describe overall model behaviour; local explanations address individual predictions.
SHAP, LIME, permutation importance and response plots answer different questions rather than competing for a single best-method title.
Feature attribution describes model behaviour under specific assumptions, not necessarily a real-world cause.
For consequential decisions, compare inherently interpretable models before accepting the complexity of post-hoc explanations.
Validate explanations against the deployed model and the needs of the people who use them.
A prediction is only the beginning of the decision
Imagine a subscription business introducing a machine learning model to identify customers who are likely to leave. Every morning, the customer retention team receives a ranked list of accounts. The model performs well on its test data, yet the people making the calls have a problem: they cannot tell why any particular customer appears on the list.
Should they offer a discount? Investigate a service complaint? Check whether the customer has recently changed their usage habits? The score alone does not tell them. Worse, the model might be responding to an administrative field that happens to correlate with cancellations but is unrelated to an opportunity to retain the customer.
Machine learning explainability methods help organisations investigate how a model uses its inputs to produce predictions. They can help analysts detect unexpected relationships, support meaningful review and communicate model behaviour to the people responsible for decisions.
The challenge is selecting an explanation that answers the right question. A global feature ranking, an explanation for a single customer and an assessment of what might change a prediction are not interchangeable. Each offers a different view of the same model.
What exactly does your organisation need to explain?
Global explainability examines how a model behaves across a population. A product manager might ask which characteristics are most associated with predicted churn, while a validation team might investigate whether the model relies heavily on a potentially inappropriate proxy variable.
Local explainability focuses on a particular prediction. A service manager reviewing one account may need to know which recorded characteristics contributed to its unusually high risk score relative to a defined reference.
There is another distinction: explaining how a model produced a score is not the same as explaining how the organisation made a decision. Eligibility rules, business thresholds, manual overrides and policy restrictions may all change the final outcome. A useful decision explanation must account for those additional steps where relevant.
Begin with the intended recipient. A data scientist may need detailed attribution values and diagnostic plots. A customer-facing colleague needs accurate, understandable reasons and a practical next step. An independent reviewer needs enough information to reproduce and challenge the explanation.
Sometimes the best explanation is a simpler model
Not every prediction needs a separate explainability tool. A short decision tree, a carefully designed scorecard or a regularised logistic regression may be sufficiently interpretable for the task. Their internal structure can be inspected directly rather than approximated afterwards.
In a logistic regression without interaction terms, a coefficient describes how the modelled log-odds change with a unit increase in the corresponding input, holding other included inputs constant. Feature units and transformations matter; interactions require additional interpretation. A coefficient is not automatically a causal effect, and a large model with many derived variables may still be difficult to interpret.
Cynthia Rudin argues that inherently interpretable models deserve priority in high-stakes settings, rather than assuming black-box models must be explained after training.[1] This is a useful challenge to the common belief that more complex models are always more accurate.
Compare candidate models on representative held-out data using suitable discrimination, calibration and decision-cost measures. Where a simpler model satisfies the business and risk requirements, its transparency may avoid substantial explanation and maintenance work. Where a more complex model delivers a material, defensible advantage, post-hoc explanation methods can help investigate its behaviour.
Which explainability method answers which question?
A practical method comparison starts with the question the business is trying to resolve, not the popularity of a particular library.
Permutation feature importance — Which features does the fitted model rely on to achieve its measured performance? It evaluates the change in a selected score when feature values are shuffled on an evaluation dataset. It is useful for global diagnosis, but rankings depend on the chosen metric, dataset and relationships between features.[2]
SHAP (SHapley Additive exPlanations) — Which features contributed to this prediction relative to a reference? Inspired by cooperative game theory, SHAP allocates the difference between a reference output and a prediction among input features for a specified explanation setup. Individual values can also be aggregated to describe patterns across cases.[3]
LIME (Local Interpretable Model-agnostic Explanations) — Can a simple approximation describe how a complex model behaves around this case? LIME queries the original model on perturbed inputs and fits a weighted interpretable surrogate near the selected prediction. The result is local and approximate, not a substitute for the full model.[4]
Partial dependence plots (PDP) and individual conditional expectation (ICE) plots — How does the model respond as a feature is varied? PDP summarises average responses, while ICE shows responses for individual records. Accumulated local effects (ALE) plots offer a related approach that uses changes within local regions of observed feature values, helping reduce extrapolation problems when features are dependent.[5][6]
Counterfactual explanations — What alternative input values would produce a different model outcome? A counterfactual searches for a feasible alternative case that reaches a specified result. It can support discussions about recourse, but the proposed changes must be realistic, permissible and understood in the context of the full decision process.[7]
How SHAP and LIME differ in practice
SHAP distributes model output differences according to a defined attribution framework. Conceptually, it considers how the contribution of a feature varies depending on which other features are available, then combines these contributions using Shapley-value weighting. Practical algorithms use model-specific computations or approximations.
A SHAP explanation needs a clearly defined reference distribution, explained output and treatment of unavailable features. Tree-based implementations can be efficient for supported ensembles, while more general methods may require many model evaluations. Changing the background data or assumptions about feature dependence can change the explanation.
The units matter. Some configurations explain raw scores or log-odds, while others explain probabilities. Adding contributions measured in log-odds directly to a probability is incorrect. Even when the explanation is additive, its reference value is not necessarily the observed event rate.
LIME takes a different route. It constructs an understandable approximation of the model around a particular observation. Its usefulness depends on how nearby examples are generated, weighted and represented. Check local agreement between the surrogate and the original model; repeat the calculation to see whether materially different reasons emerge.
If explanations disagree, investigate their assumptions rather than simply choosing the more persuasive visualisation. They may be describing different output scales, neighbourhoods or reference populations. Agreement alone does not prove an explanation is correct.
Reading an individual customer risk explanation
Consider a hypothetical retention model whose predicted probability of churn for a customer is 35%. Suppose a probability-scale additive attribution method returns a reference of 20%, an attribution of +12 percentage points for declining usage, +8 for unresolved service issues and −5 for longer tenure.
In this simplified example, the contributions reconcile: 20% + 12 percentage points + 8 percentage points − 5 percentage points = 35%. The values are illustrative, not measurements from a real model. A production explanation would account for every feature or explicitly identify the remaining contributions.
If the business has chosen a hypothetical review threshold of 30%, the case would enter the retention queue. Declining usage and outstanding service issues are sensible starting points for investigation, but the team must confirm that these records are accurate and that the customer can appropriately be contacted.
It would be incorrect to promise that resolving the complaint will reduce the customer’s actual churn probability by eight percentage points. The attribution accounts for a prediction relative to a reference. Measuring the effect of service recovery on customer retention requires separate evidence, such as a suitably designed controlled experiment.
This is why explanation should support professional judgement rather than replace it. It helps identify what to investigate, not necessarily what intervention will work.
When attractive charts hide important modelling problems
Correlated features complicate interpretation. Imagine a model using both monthly usage and quarterly usage. Shuffling one while keeping the other intact may leave much of the same predictive information available. A low permutation importance for either feature does not prove that usage is irrelevant. Consider grouped importance and test the sensitivity of results to alternative feature definitions.[2]
Feature rankings also do not describe direction or shape. If a feature is important, use suitable response plots to investigate whether increasing it raises or lowers the predicted risk, whether the relationship changes at certain values and whether different customers behave differently.
Standard PDP and ICE calculations can evaluate implausible input combinations when features are dependent. For example, varying account age while leaving time-related usage history unchanged may create records the model never encountered during training. ALE plots can help address this concern, although sparse regions and interactions still require careful interpretation.[5][6]
An unexpected attribution may reveal target leakage: a model might use a cancellation-processing flag recorded only after the event it is supposed to predict. No explanation method can repair such a model. The team must investigate data availability at prediction time, correct the feature design and repeat independent validation.
Similarly, an explanation that does not mention a protected characteristic does not demonstrate fairness. Other inputs may act as proxies, and unequal outcomes may arise through data, thresholds or processes. Assess subgroup performance and relevant fairness measures separately, with appropriately authorised data.
Make explanation quality a measurable requirement
The National Institute of Standards and Technology (NIST) proposes four principles for explainable artificial intelligence: providing explanations, making them meaningful to their recipients, ensuring explanation accuracy and recognising knowledge limits.[8] These are useful evaluation principles, not a certification or legal compliance guarantee.
Assess fidelity: does the explanation represent the model behaviour it claims to describe? Check additive reconstruction where applicable, surrogate performance in the intended neighbourhood and the effect of carefully designed perturbations. These checks measure different properties; arithmetic reconciliation alone is insufficient.
Assess stability: does a small, immaterial input change or a different sampling seed produce substantially different reasons? Define what counts as an immaterial change for the business and investigate unstable explanations, while recognising that genuine changes near a decision boundary may legitimately alter attribution.
Assess usefulness with real decision-makers. Can reviewers identify an incorrect data record, distinguish model reasons from business rules and choose an appropriate escalation? Measure comprehension, review time and the quality of actions taken against a suitable baseline, rather than assuming users benefit from a new chart.
For counterfactuals, test whether the proposed inputs actually achieve the target prediction, respect immutable characteristics and business constraints, and remain plausible when related features change. Never promise a future decision based solely on a model version’s hypothetical outcome.
How to move explainability into everyday operations
Select a pilot model with a clearly defined business decision and an accountable owner. Document the users, decisions, relevant risks, output scale and the kind of explanation each audience needs. Compare a transparent baseline with more complex candidates before choosing an explanation architecture.
For the development team, a combination of global importance, response plots and carefully selected local examples may expose more issues than any single method. Include cases close to the decision threshold, unusual inputs and important population groups. Keep an independent evaluation dataset for validation.
For operational use, connect explanations to the exact model version, input data, preprocessing pipeline, background dataset and explanation configuration. Translate technical features into verified business terms without changing their meaning. Record the policy or human decision separately where it affects the outcome.
Decide whether explanations must be available in real time or can be computed during batch review. Generic model-agnostic methods may require repeated predictions and add latency. Benchmark computing cost and explanation coverage against the intended workflow. Protect sensitive data in explanations and logs using access controls and appropriate retention policies.
Monitor explanation coverage, changes in attribution distributions, stability failures, reviewer escalations and decision outcomes alongside model performance. Attribution shifts are signals to investigate, not automatic proof of model deterioration. Review the explanation process when the model, input data or decision policy changes.
The real test is whether explanations improve decisions
An organisation does not need to deploy every explainability method. A modest forecasting model may need little more than a transparent specification, diagnostic plots and documented assumptions. A consequential classification model may require a much stronger combination of model transparency, independent validation, appropriate reason communication and operational controls.
If your business already uses predictive models but struggles to understand their outputs, start by selecting a few representative decisions and asking the people involved what they cannot currently explain. That exercise can identify whether the real gap is model complexity, poor data, incomplete decision documentation or the absence of a suitable explanation method.
A focused review of existing models, validation evidence and decision workflows can help determine which explainability capabilities are worth investing in. The goal is not to make every prediction look convincing. It is to make model behaviour sufficiently understandable that people can challenge it, recognise its limits and act responsibly.
References and further reading
[1] Rudin, C. (2019). Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1, 206–215. https://doi.org/10.1038/s42256-019-0048-x
[2] Scikit-learn documentation. Permutation feature importance. https://scikit-learn.org/stable/modules/permutation_importance
[3] Lundberg, S. M. and Lee, S.-I. (2017). A Unified Approach to Interpreting Model Predictions. Advances in Neural Information Processing Systems, 30. https://proceedings.neurips.cc/paper_files/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html
[4] Ribeiro, M. T., Singh, S. and Guestrin, C. (2016). “Why Should I Trust You?”: Explaining the Predictions of Any Classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. https://doi.org/10.1145/2939672.2939778
[5] Scikit-learn documentation. Partial Dependence and Individual Conditional Expectation plots. https://sklearn.org/stable/modules/partial_dependence.html
[6] Apley, D. W. and Zhu, J. (2020). Visualizing the Effects of Predictor Variables in Black Box Supervised Learning Models. Journal of the Royal Statistical Society: Series B, 82(4), 1059–1086. https://doi.org/10.1111/rssb.12377
[7] Wachter, S., Mittelstadt, B. and Russell, C. (2018). Counterfactual Explanations Without Opening the Black Box: Automated Decisions and the GDPR. Harvard Journal of Law & Technology, 31(2), 841–887. https://ora.ox.ac.uk/objects/uuid%3A86dfcdac-10b5-4314-bbd1-08e6e78b9094
[8] Phillips, P. J., et al. (2021). Four Principles of Explainable Artificial Intelligence. NISTIR 8312. https://doi.org/10.6028/NIST.IR.8312
Apply the approach
Illustrative customer retention case: an additive explanation on the probability scale starts from a 20% reference prediction. Three assumed feature contributions produce a 35% individual churn prediction. The values are hypothetical and describe model attribution, not causal effects or measured customer outcomes.
Expected model output for the specified background population in this simplified probability-scale example.
Assigned upward contribution relative to the reference; pp means percentage points.
Assigned upward contribution; a reason to investigate service records, not an estimate of intervention effectiveness.
Assigned downward contribution relative to the reference.
Reference plus all illustrative contributions; above the assumed 30% threshold for retention review.
Put the approach into practice
- 01Specify the business decision, explanation audience and minimum evidence required.
- 02Compare interpretable and complex candidate models using decision-relevant validation criteria.
- 03Select complementary global and local explanation techniques; document their assumptions and output units.
- 04Test fidelity, stability, feasibility and user comprehension on representative cases.
- 05Integrate explanations with model versioning, decision policies, human review and ongoing monitoring.
Frequently asked questions
What are the main types of machine learning explainability methods?
They include inherently interpretable models, global feature importance, local feature attribution, surrogate models, response plots and counterfactual explanations. Methods such as SHAP, LIME, permutation importance and ALE serve different purposes. Choose according to the model, question and intended recipient.
Is SHAP always better than LIME?
No. SHAP offers an additive attribution framework relative to a specified reference. LIME approximates model behaviour near an observation using a simpler surrogate. Their suitability depends on the required explanation, feature dependencies, computational constraints and independently assessed quality.
Can explainability identify whether a machine learning model is biased?
It can highlight suspicious feature dependencies and help investigate potential proxy variables. It cannot establish fairness on its own. Separate assessments of data, subgroup outcomes, model errors, decision policies and relevant fairness criteria remain necessary.
How can I explain a neural network or image classification model?
Gradient-based attribution, integrated gradients, occlusion analysis and other suitable techniques can help investigate which input regions influence the model output. Their results depend on the method and reference or perturbation choices. Validate them with appropriate domain examples; a plausible heatmap does not establish reliable reasoning.
Do explanations prove that changing a feature will change the real-world outcome?
No. Feature attribution describes how a fitted model assigns contributions. A counterfactual describes an alternative input associated with a different model prediction. Establishing whether an intervention changes an actual outcome requires separate causal evidence and appropriate assumptions.
Does every machine learning prediction need an explanation?
Not necessarily. Explanation coverage and depth should reflect the decision impact, users, model complexity and applicable obligations. Global diagnostics may suffice for some low-impact analytical tasks, while consequential individual decisions may require more detailed and reproducible explanations.