Global vs Local Explanations
Comparing global model behavior interpretability against local instance level decision explanations using SHAP and LIME.
Two Scopes of Machine Learning Interpretability
When explaining a complex black box model (like XGBoost or a Deep Neural Network), you must choose your Scope of Explanation:
┌──────────────────────────┬──────────────────────────┐
│ 1. GLOBAL EXPLANATIONS │ 2. LOCAL EXPLANATIONS │
├──────────────────────────┼──────────────────────────┤
│ "How does the model work │ "Why did the model deny │
│ overall across the entire│ John's specific loan │
│ population?" │ application today?" │
└──────────────────────────┴──────────────────────────┘
1. Global Explanations (Population Level)
Global interpretability describes overall model mechanics across the full dataset:
- What features matter most overall? (Feature Importance rankings).
- What is the general relationship between a feature and predictions? (Partial Dependence Plots).
- Primary Audience: Model developers, auditors, risk officers, regulatory compliance teams.
- Example Question: "Does our credit scoring model rely more heavily on credit history or annual income overall?"
2. Local Explanations (Instance Level)
Local interpretability explains a single prediction for one specific data instance:
- Which specific features drove this single prediction up or down?
- Primary Audience: End users, loan applicants, domain experts (physicians, fraud analysts).
- Example Question: "Why was Applicant #8492 denied a credit card, and what specific values would turn this decision into an approval?"
Local Explanation for Applicant #8492:
Baseline Approval Probability: 70%
- Late Payments (>2 in past year): -35% ◄── PRIMARY REASON FOR DENIAL!
- High Debt-to-Income Ratio: -15%
+ High Credit Score (740): +10%
Final Predicted Probability: 30% (Denied!)
Key Interpretability Frameworks
┌──────────────────────────┬──────────────────────────┐
│ LIME (Local Surrogate) │ SHAP (Game Theoretic) │
├──────────────────────────┼──────────────────────────┤
│ Fits a fast local linear │ Computes game theoretic │
│ surrogate model around a │ Shapley values per sample│
│ single prediction point. │ consistent across local │
│ Fast, purely local! │ and global scopes! │
└──────────────────────────┴──────────────────────────┘
- LIME (Local Interpretable Model-agnostic Explanations): Perturbs a single input sample, observes model output changes, and fits a simple local linear model around that specific point.
- SHAP (Shapley Additive exPlanations): Uses game theory to compute exact marginal feature contributions. Summing local SHAP values per sample yields global feature importance plots!
Say this out loud
Global explanations describe overall model behavior and feature importance across an entire dataset. Local explanations explain why a model made a specific prediction for a single individual sample. Tools like LIME build local linear surrogates, while SHAP uses game-theoretic Shapley values to provide unified local and global interpretability.
Followups to expect
- What is Actionable Recourse in local explanations? Informing a user of the minimal specific changes they can make to their input features (for example paying off $2,000 debt) to flip a negative prediction to a positive outcome.
- What is Partial Dependence Plot (PDP)? A global visualization showing the marginal effect of one or two features on predicted outcomes while holding all other features at their average values.
Check yourself
What is the primary difference between Global Explanations and Local Explanations in Model Interpretability?