Explainable AI
Explainable AI develops methods to make machine learning model predictions interpretable by humans. It covers attribution techniques, model-agnostic explanations, inherently interpretable models, and the trust, debugging, and compliance needs that drive the requirement to understand why a model produces a given output.
itArtificial intelligence and machine learning | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Explainable AI
Explainable AI, usually called XAI, is what you add when a machine learning model produces a score or label and somebody has to ask why. The model may be accurate. It may also have the conversational skills of a locked filing cabinet. A number alone does not let a developer debug a failure, an auditor check for unfair treatment, or a person understand a decision that affects them.
The important split is between intrinsic interpretability and post-hoc explanation. A linear regression or shallow decision tree shows much of its reasoning in its own coefficients or branches. A complex ensemble or neural network generally does not, so a post-hoc method studies its inputs and outputs after training. That method is not a tiny detective living inside the model; it is a separate calculation describing the model's behavior.
Two more labels keep the furniture from being rearranged in your head. A local explanation answers why one particular prediction happened. A global explanation describes behavior across many predictions. A method can also be model-specific, using internals such as gradients, or model-agnostic, working from inputs and outputs alone. These pairs are not rival teams. They answer different questions, which is fortunate because a model can look rather different close up.
LIME perturbs an input and fits a small local model around it. SHAP assigns feature credit using Shapley values from game theory. A counterfactual asks what smallest change would have flipped the result. Each can be useful, but none proves the model is correct or that a feature caused something in the outside world. An explanation can faithfully reveal biased reasoning. It does not remove the bias, because charts lack that sort of administrative authority.
Start with the Intro when you need the full map: black boxes, local and global scope, and the limits of explanations. The Slides make the relationships quicker to scan. The Cheatsheet compares LIME, SHAP, counterfactuals, and the older global tools. Then use the Practice tab to keep the prediction fixed while testing an explanation's baseline, because the answer to compared with what is doing more work than it first appears.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.nist.gov/artificial-intelligence/ai-research-explainability
Supports
- AI must be explainable to society to enable understanding, trust, and adoption of AI technologies
- NISTIR 8312 is NIST's primary deliverable on explainable AI, published September 2021
- https://nvlpubs.nist.gov/nistpubs/ir/2021/NIST.IR.8312.pdf
Supports
- The four principles of explainable AI — Explanation, Meaningful, Explanation Accuracy, Knowledge Limits
- The Explanation principle obligates systems to supply evidence, support, or reasoning for each decision
- The Meaningful principle means explanations are understandable to individual users/audiences
- Explanation accuracy is distinct from decision accuracy — an explanation may or may not accurately describe how the system reached its conclusion, regardless of whether the decision itself was correct
- The Knowledge limits principle means the system only produces decisions under the conditions it was designed and tested for
- Explanation accuracy and meaningfulness trade off — detailed explanations can be less accessible; simple explanations can be less complete
- https://christophm.github.io/interpretable-ml-book/
Supports
- The book's taxonomy of interpretable models, local model-agnostic methods, global model-agnostic methods, and neural network interpretation
- Interpretability defined as the degree to which a human can understand the cause of a decision, and as the ability to correctly and efficiently predict a method's results
- The local vs. global and model-agnostic vs. model-specific taxonomy
- Black box models as opaque models whose decision-making process is hidden from human understanding
- Techniques covered: LIME, SHAP, counterfactual explanations, partial dependence plots, permutation feature importance, surrogate models, saliency maps
- https://christophm.github.io/interpretable-ml-book/counterfactual.html
Supports
- A counterfactual explanation describes the smallest change to feature values that changes a prediction to a predefined output
- Qualities of a good counterfactual — reaching the target outcome, minimizing feature changes, staying similar to the original instance, remaining realistic/plausible
- The Rashomon effect — multiple valid counterfactuals can exist for one prediction
- https://github.com/marcotcr/lime
Supports
- LIME stands for Local Interpretable Model-Agnostic Explanations
- LIME explains predictions by perturbing inputs, weighting by proximity, and fitting a local linear surrogate model
- LIME is model-agnostic and works with text, tabular, and image classifiers
- https://shap.readthedocs.io/en/latest/
Supports
- SHAP stands for SHapley Additive exPlanations
- SHAP is a game-theoretic approach connecting optimal credit allocation with local explanations using Shapley values
- SHAP provides explainers such as TreeExplainer, LinearExplainer, and DeepExplainer, and works across tabular, text, and image data
- https://docs.cloud.google.com/vertex-ai/docs/explainable-ai/overview
Supports
- Vertex Explainable AI offers feature-based explanations and example-based explanations
- Feature attributions can be aggregated across a dataset or subset, but individual explanations are not necessarily generalizable
- Feature attributions can be subject to adversarial attacks and do not always distinguish data issues from model issues
- https://artificialintelligenceact.eu/article/13/
Supports
- Article 13(1) requires high-risk AI systems to be designed so their operation is sufficiently transparent to enable deployers to interpret the system's output and use it appropriately
- https://arxiv.org/abs/1602.04938
Supports
- LIME introduced local interpretable explanations for predictions of any classifier in 2016
- https://arxiv.org/abs/1705.07874
Supports
- The 2017 SHAP paper introduced a unified framework for additive feature attribution
- https://arxiv.org/abs/1703.01365
Supports
- Integrated Gradients introduced an axiomatic attribution method for deep networks in 2017
- https://www.darpa.mil/research/programs/explainable-artificial-intelligence
Supports
- DARPA's XAI program pursued explainable models and human-computer interfaces and is now complete
- https://eur-lex.europa.eu/eli/reg/2016/679/oj
Supports
- Regulation (EU) 2016/679 became applicable on 25 May 2018 and includes safeguards for certain automated individual decision-making
- https://research.google/blog/what-if-tool-code-free-probing-of-machine-learning-models/
Supports
- Google introduced the What-If Tool in 2018 for visual model exploration and counterfactual analysis
- https://arxiv.org/abs/1909.03012
Supports
- AI Explainability 360 documented an open-source toolkit of explanation algorithms and metrics in 2019
- https://eur-lex.europa.eu/eli/reg/2024/1689/oj
Supports
- Regulation (EU) 2024/1689 entered into force on 1 August 2024 and establishes harmonised rules on artificial intelligence
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-feature-attribute-shap-baselines.html
Supports
- SHAP-style explanations are contrastive and can differ with the chosen baseline
- https://arxiv.org/abs/1911.02508
Supports
- A model can be constructed to produce benign explanations for LIME and SHAP while behaving in a discriminatory way
- https://interpret.ml/
Supports
- InterpretML provides glass-box models and black-box explainers
- https://docs.seldon.io/projects/alibi/en/stable/
Supports
- Alibi provides counterfactual and attribution explanation methods
- https://captum.ai/
Supports
- Captum provides model interpretability methods for PyTorch models
- https://interpret.ml/DiCE/
Supports
- DiCE provides diverse counterfactual explanations
