What is Explainable AI?
Explainable AI covers the methods used to make a model's decisions inspectable by humans, either by choosing an inherently interpretable model or by generating post-hoc explanations of a complex one.
Why it is often mandatory
Explainability is frequently a requirement rather than a nicety. Regulations in credit, insurance, and employment can oblige you to give an affected person a reason for an adverse decision. Clinicians will not act on a recommendation they cannot interrogate. Debugging is impossible if you cannot see why a model produced an output. And bias auditing requires knowing which features drove decisions.
There are two broad routes. Use a model that is interpretable by construction — linear and logistic regression with sensible features, shallow decision trees, generalised additive models, rule lists. Or use a complex model and generate explanations after the fact.
The main post-hoc methods
Feature importance ranks which features the model relies on overall. Useful for sanity-checking and for spotting leakage — if an ID field is your top feature, something is wrong. It says nothing about individual decisions.
SHAP assigns each feature a contribution to a specific prediction, with a solid theoretical grounding in cooperative game theory and the useful property that contributions sum to the prediction. It is the practical default for per-decision explanation. Be aware that its correctness depends on assumptions about feature independence that correlated features violate, and that it can be expensive to compute exactly.
LIME fits a simple local model around one prediction. Intuitive and fast, and less stable — small changes in sampling can produce noticeably different explanations, which undermines trust.
Counterfactuals answer 'what would have to change for a different outcome'. For an applicant told they were declined, 'income £4,000 higher, or two fewer recent applications' is far more actionable than a list of weighted features. For customer-facing explanation this is usually the right format.
Attention and saliency maps highlight influential regions of an image or text. Visually compelling, and weaker evidence than they appear — attention weights are not a faithful account of causal influence.
The honest limitations
An explanation is a model of a model. It is an approximation, and it can be confidently wrong. Two methods can produce different explanations for the same prediction, and there is often no principled way to adjudicate.
More seriously, explanations describe correlation within the model, not causation in the world. SHAP telling you postcode drove a decision does not mean postcode causes the outcome; it may proxy for something else entirely — which is precisely why explanations are useful for fairness auditing and cannot be read as causal claims.
There is also a documented risk that explanations create unwarranted confidence. Stakeholders shown a plausible explanation tend to trust the underlying model more, whether or not it deserves it. And explanations can be gamed: it is possible to construct models that behave one way and explain themselves another.
The practical position: prefer an inherently interpretable model when the accuracy cost is small, and it often is on tabular data. Where a complex model is genuinely needed, use post-hoc explanations for debugging, bias investigation, and regulatory response — but treat them as evidence to investigate rather than as ground truth, and validate them against domain expertise. See confusion matrix for the complementary question of which errors the model makes.
- Often a legal requirement — adverse-decision reasons in credit, insurance, employment
- SHAP for per-decision — contributions that sum to the prediction; watch correlated features
- Counterfactuals for humans — 'what would need to change' beats feature weights
- Not causal — explanations describe the model, not the world
More on Explainable AI.
What is the difference between interpretable and explainable AI?
An interpretable model is transparent by construction — a shallow decision tree or a logistic regression can be read directly, and the explanation is the model. Explainable AI usually means generating post-hoc approximations of a model too complex to read, such as SHAP values over a gradient-boosted ensemble. Interpretability is stronger because there is no approximation gap, which is why it is worth preferring when the accuracy cost is small.
Is there always a trade-off between accuracy and explainability?
Less often than assumed. On tabular business data, well-regularised interpretable models frequently come within a point or two of complex ensembles, and the gap may be smaller than the uncertainty in your evaluation. The trade-off is real for perceptual tasks — images, audio, free text — where interpretable models are not competitive. Measure the actual gap on your problem before accepting opacity as the price of accuracy.
Related terms.
Confusion Matrix
A confusion matrix is a table of a classifier's predictions against actual outcomes, splitting results into true positives, false …
ReadSupervised Learning
Supervised learning is training a model on examples that already carry the correct answer, so the model learns a mapping it can ap…
ReadMLOps
MLOps is the set of practices for deploying, monitoring, and maintaining machine learning models in production, extending DevOps t…
ReadModel Drift
Model drift is the gradual loss of a deployed model's accuracy because the statistical relationship it learned no longer matches t…
ReadNeed this built?
Applying this to a
real system?
We build and ship production machine learning. If explainable ai is part of a problem you are working on, tell us about it.
Start the conversationor write to us at [email protected]