Explainability

Why Did the Model Do That?

Explainability is the ability to understand why a model produced a specific output — what features drove the prediction, what parts of the input were influential. It enables trust, error detection, debugging, and regulatory compliance.

Interpretable vs Black-Box Models

Intrinsically Interpretable

Linear regression, logistic regression, decision trees, rule-based systems. Decision logic is directly readable. Less predictive power. Preferred in regulated, high-stakes, or low-complexity domains where interpretability is legally required.

Black-Box (Deep Networks)

Neural networks, large ensembles. High predictive power. Decision logic is not directly readable — millions of parameters interact non-linearly. Require post-hoc explanation methods to approximate understanding.

Post-Hoc Explanation Methods

1

LIME — Perturbs the input and fits a local linear model to observe which features drive the prediction in the neighborhood of this specific input. Model-agnostic. Works for any prediction type.

2

SHAP — Assigns each feature a contribution value to the prediction, based on Shapley values from game theory. Theoretically grounded, consistent, widely used in practice. Very efficient for tree-based models.

3

Grad-CAM — Produces a heatmap over the input image showing which regions most influenced the classification decision. Used for visual debugging and validation of CV models.

Limits of Explainability

Explanations are approximations, not ground truth

Post-hoc explanations are local approximations of complex models. They can be locally accurate but globally misleading. Explanations can be manipulated to look correct while the model behaves differently. "Explainable AI" products sometimes produce plausible-looking explanations that don't reflect the model's true reasoning.

Need Help?

Ask the AI assistant about AI explainability, how LIME and SHAP work, or the difference between interpretable and black-box models.