Explainable AI

On this page 7

Explainable AI (XAI) is the set of methods and practices that make the behavior and decisions of AI models understandable to humans. It answers questions such as which inputs drove a prediction, what the model has learned overall, and what would have to change for the outcome to be different.

In AI safety within artificial intelligence, explainable AI serves oversight, debugging and accountability. It helps reveal AI bias, supports audits and model cards, and gives affected people a meaningful account of automated decisions. It does not by itself make a model safe or fair, but it makes problems visible early enough to act on.

How explainable AI produces explanations

Explainable AI follows two broad strategies. The first uses inherently interpretable models, such as linear models, short decision trees or generalized additive models, whose structure can be read directly. The second applies post-hoc explanation methods to complex models such as gradient-boosted ensembles or deep neural networks after training.

Explanations also differ in scope. A local explanation describes one prediction, for example why a specific loan application was declined. A global explanation describes the model as a whole, for example which features generally matter most or how risk changes with age across the population.

DimensionOptionsPractical meaning
TimingIntrinsic or post-hocBuilt into the model or added afterward
ScopeLocal or globalOne decision or overall behavior
Model accessModel-agnostic or model-specificWorks on any model or needs internals
Output formFeature scores, rules, examples, mapsWhat the user actually sees
AudienceDeveloper, auditor, end userLevel of detail and vocabulary
Main dimensions used to classify explanation methods

Common explainable AI techniques

No single method answers every question, so practitioners combine several techniques and check whether they agree. The table lists widely used methods and their typical uses.

TechniqueHow it worksBest suited for
SHAPShapley values distribute a prediction among featuresTabular models, local and global
LIMEFits a simple surrogate around one predictionQuick local explanations
Permutation importanceMeasures accuracy drop when a feature is shuffledGlobal feature ranking
Partial dependenceAverages predictions across feature valuesGlobal feature effects
Integrated gradientsAccumulates gradients from a baseline inputNeural networks, text and images
Saliency and Grad-CAMHighlights influential image regionsComputer vision models
CounterfactualsSmallest input change that flips the outcomeActionable end-user explanations
Widely used explanation techniques

For large language models, explanation work increasingly includes mechanistic interpretability, which studies internal features and circuits, and attribution of outputs to source documents in retrieval systems. A model’s own written reasoning is not a reliable explanation, because it may not reflect the computation that produced the answer.

Explainable AI is often confused with transparency and interpretability, and it overlaps with several neighboring practices in AI safety. The distinctions below help assign the right tool to each goal.

ConceptFocusRelation to explainable AI
InterpretabilityHow well humans can understand a modelThe property XAI aims to provide
TransparencyDisclosure of data, design and useDocuments context, not individual decisions
Model cardStructured documentation of a modelOften summarizes XAI findings
AI biasSystematic unfair outcomesExplanations help detect its sources
AI alignmentModels pursuing intended goalsInterpretability supports verification
AI red teamingAdversarial testing for failuresExplanations help diagnose found failures
Explainable AI and neighboring concepts

Regulation increasingly requires explainability in practice. Credit decisions in many jurisdictions require specific reasons for adverse actions, the GDPR gives individuals rights regarding meaningful information about automated decisions, and the EU AI Act sets transparency and human oversight duties for high-risk systems.

Choosing an explanation approach

The right approach depends on who needs the explanation and what they will do with it. A developer debugging leakage needs different output than a customer appealing a decision.

SituationRecommended approachReason
High-stakes tabular decisionsInterpretable model firstExplanation equals the actual logic
Complex model, model validationSHAP plus partial dependenceLocal and global views together
Customer adverse action noticeCounterfactual reasonsTells the person what could change
Image classifier debuggingGrad-CAM or integrated gradientsReveals spurious visual cues
Fairness auditGroup-level attributions and outcomesShows disparate drivers across groups
Matching explanation methods to situations

A useful principle is to prefer an interpretable model when its accuracy is comparable. In many tabular problems, a well-built additive model performs close to a black-box ensemble, and the explanation is then exact rather than approximate.

Limitations and pitfalls of explanations

Post-hoc explanations are approximations of the model, not the model itself. They can be unstable, misleading or even manipulated, so they need validation like any other analytical output.

  • Unfaithful explanations: a plausible attribution may not reflect what the model actually computes.
  • Correlated features: SHAP and permutation importance can split or misassign credit between correlated inputs.
  • Instability: LIME and saliency maps may change noticeably with small input perturbations or random seeds.
  • Causal misreading: feature importance shows association within the model, not causation in the world.
  • Explanation gaming: models can be built to look fair under a given explanation method while behaving otherwise.
  • Overtrust: a convincing explanation can make users accept wrong predictions more readily.

Explained without jargon

Many AI systems give answers without saying why. Explainable AI is the effort to show the reasons behind an AI decision in a way a person can follow.

It is similar to asking a doctor not only for a diagnosis but also for the test results that led to it. Knowing the reasons lets people check the decision, spot mistakes or unfair patterns, and challenge an outcome when it seems wrong.

A typical use case

A consumer lender uses a gradient-boosted model to score loan applications. Regulators require a clear statement of the principal reasons for every declined application, and the lender’s risk team must also confirm that the model does not rely on proxies for protected characteristics.

The team computes SHAP values for every decision and maps the top negative contributors to standardized reason codes, such as a high debt-to-income ratio or a short credit history. For declined applicants, it also generates counterfactual statements, for example that reducing outstanding card balances by a certain amount would change the outcome.

During validation, global SHAP analysis reveals that postal code has an unexpectedly strong influence on scores. The team removes it, retrains, and documents the finding in the model card, producing a model that is both easier to explain and safer to deploy.