Step by Step
L
LIME — perturbing locally to explain one prediction
LIME (Local Interpretable Model-agnostic Explanations) perturbs the input locally and fits a simpler, interpretable model to explain one individual prediction at a time.
Example: LIME slightly varying a loan applicant's input features and observing how the model's prediction changes, to build a simple local explanation for that one specific decision.
S
SHAP — assigning each feature its marginal contribution
SHAP (Shapley values) assigns each individual feature its precise marginal contribution to a given prediction, is model-agnostic (works with any model type), and has become the industry standard explainability technique.
Example: SHAP determining that a specific applicant's income contributed +0.15 to their approval probability, while their debt level contributed -0.08.
S²
Saliency maps — highlighting which pixels mattered
Saliency maps highlight which specific pixels in an image drove a computer vision model's classification decision, providing visual explainability for image-based models.
Example: a saliency map showing that an image classifier's "dog" prediction was driven primarily by the pixels around the animal's ears and snout.
G
GDPR Article 22 — the legal requirement for explainability
GDPR Article 22 creates a legal right to explanation for automated decisions that significantly affect individuals within the EU, making explainability a legal requirement (not just a best practice) in domains like credit decisions, hiring, medical AI, and criminal justice.
Example: an EU citizen denied a loan by an automated system having a legal right, under GDPR Article 22, to receive an explanation for that automated decision.
Applied Walkthrough
1
A bank uses a complex, highly accurate but hard-to-interpret model to make automated loan decisions for EU customers.
2
A customer denied a loan requests an explanation for the decision, citing their rights under GDPR Article 22.
3
The bank could apply SHAP to determine the marginal contribution of each factor (income, credit history, debt) to this specific customer's decision, providing a legally required, interpretable explanation.
4
This illustrates exactly why model-agnostic techniques like SHAP have become industry standard — they let organizations use complex, high-performing models while still meeting legal explainability requirements like GDPR Article 22.
Exam Application
Exams test whether you can distinguish LIME (local, perturbation-based) from SHAP (marginal contribution via Shapley values, model-agnostic, industry standard) and from saliency maps (image-specific, pixel-level), and whether you know GDPR Article 22 as the specific legal basis creating a right to explanation in the EU.
⚠ Common Trap
The most common trap is assuming a highly accurate, complex model is automatically exempt from explainability requirements. GDPR Article 22 and other regulations specifically require explanations for automated decisions significantly affecting individuals, regardless of how complex or accurate the underlying model is — this is exactly why post-hoc explainability tools like LIME and SHAP exist.
✓ Quick Self-Check
1. What does LIME do to generate an explanation?
Perturbs the input locally and fits a simpler, interpretable model to explain one individual prediction.
Tap to reveal / hide
2. What does SHAP assign to each feature?
Its precise marginal contribution to a given prediction, using Shapley values.
Tap to reveal / hide
3. Why is SHAP considered the industry standard?
Because it is model-agnostic, working with any model type, while providing precise, mathematically grounded feature attributions.
Tap to reveal / hide
4. What do saliency maps explain, specifically?
Which pixels in an image drove a computer vision model's classification decision.
Tap to reveal / hide
5. What legal requirement does GDPR Article 22 create?
A right to explanation for automated decisions that significantly affect individuals within the EU.
Tap to reveal / hide