🎯 Exam Favorite · AI Ethics
EXPLAINABLE AI = SHAP values show WHICH features pushed the prediction UP or DOWN
Explainable AI methods — making black boxes talk
S
SHAP — game-theory-based, gold standard for tabular data
SHAP (SHapley Additive exPlanations) assigns each feature a value showing its contribution to a specific prediction, based on game theory (Shapley values), is model-agnostic, and is considered the gold standard for tabular data explanations.
Example: SHAP determining that a specific loan applicant's income pushed their approval probability up by 0.15, while their debt level pushed it down by 0.08, all for that one specific prediction.
L
LIME — local approximation with a simple interpretable model
LIME (Local Interpretable Model-agnostic Explanations) approximates the black-box model locally, around one specific prediction, by fitting a simple, interpretable model to explain just that local region of behavior.
Example: LIME fitting a simple linear model that approximates how a complex model behaves in the immediate neighborhood of one specific loan applicant's data point.
A
Attention weights — visualizing token relationships in Transformers
For Transformer-based models, attention weights can be visualized to show which tokens attended to which other tokens, providing a form of built-in interpretability specific to that architecture.
Example: visualizing a Transformer's attention weights to see that the pronoun "it" attended most strongly to a specific earlier noun in the sentence.
Legal requirement — required for high-risk EU AI Act decisions
Explainability isn't just a best practice — it's a legal requirement under the EU AI Act specifically for high-risk automated decisions.
Example: a company deploying a high-risk hiring AI system in the EU being legally required to provide some form of explainability (like SHAP-based feature attributions) for its automated decisions.
1
A company deploys a high-risk AI system for automated hiring decisions within the EU, which legally requires explainability under the EU AI Act.
2
For their tabular applicant data (structured features like years of experience, education level, skills test scores), they apply SHAP, the gold standard for this type of data, to generate feature-level explanations for each decision.
3
For a separate Transformer-based resume-screening model that processes free-text resumes, they could additionally visualize attention weights to show which parts of the resume text most influenced the model's assessment.
4
Using these XAI techniques together allows the company to meet their legal explainability obligations under the EU AI Act across both their structured and text-based AI components.

Exams test whether you can distinguish SHAP (game-theory-based, gold standard for tabular data), LIME (local approximation with a simple model), and attention weights (Transformer-specific visualization), and whether you know explainability is a legal requirement for high-risk decisions under the EU AI Act, not merely a best practice.

The most common trap is assuming these three XAI methods are interchangeable or redundant. Each is suited to different contexts — SHAP is the general-purpose gold standard for tabular data, LIME approximates local behavior with any model type, and attention weights are specifically applicable only to Transformer-based architectures, not general-purpose across all model types.

1. What theoretical foundation does SHAP use to assign contributions?
Game theory, specifically Shapley values.
Tap to reveal / hide
2. What does LIME do to generate an explanation?
Approximates the black-box model locally, around one specific prediction, using a simple interpretable model.
Tap to reveal / hide
3. What kind of model architecture do attention weights specifically apply to?
Transformer-based models.
Tap to reveal / hide
4. Is explainability just a best practice, or a legal requirement in some contexts?
A legal requirement — specifically required by the EU AI Act for high-risk automated decisions.
Tap to reveal / hide
5. Which of the three XAI methods (SHAP, LIME, attention weights) is considered the gold standard for tabular data specifically?
SHAP.
Tap to reveal / hide