From Shapley Values to Explainable AI
Kyle Vedder - GRASP Game Theory Seminar�
Video of this talk can be found at�https://www.youtube.com/watch?v=4RkhsIz14Yc
Background Definitions
Introduction to Shapley Values
Shapley Values
Source: Wikipedia “Lloyd Shapley”
Farmer Example
Farmer Example - “Credit”
Farmer Example - “Credit” cont.
Shapley Values �are these “credit” values
Shapley Values �are these “credit” values
Any “credit” systems that uphold these properties must be Shapley Values!
Farmer Example - Permutations
Farmer Example - Permutations
Farmer Example - Permutations
Average over # permutations
Farmer i�Credit
Farmer Example - Permutations
#P Hard
“As hard as the counting problems associated with NP hard problems”�e.g. #SAT, exact Bayes net inference, matrix permanent
Normalize by # permutations
Farmer i�Credit
Glove Game Example
Thus:
Marginal Contribution of P1
Glove Game Example
Thus:
Marginal Contribution of P1
Farmer Example - Combinations
Farmer Example - Combinations
Farmer Example - Combinations
f evaluated with S and i, minus f evaluated with S
Powerset of Farmers without Farmer i
Combinatorial Normalization
Farmer i�Credit
Farmer Example - Combinations
# ways to permute succeeding farmers
# ways to permute proceeding farmers
Unordered subset (combination)
Handles ordering of S
Normalize by # permutations
Benefits of Shapley Values
Problems with Computing SVs
From Shapley Values to �SHAP Values
SHAP Values
SHAP From Tables
F1 | F2 | ... | Fp | Yield (y) |
1 | 4 | ... | 7 | 27 |
1 | 4 | ... | 1 | 9 |
0 | 0 | ... | 3 | 8 |
ℝ
ℝ
p
T =
N
SHAP From Tables
SHAP From Tables - Example
F1 | F2 | ... | Fp | Yield (y) |
1 | 4 | ... | 7 | 27 |
1 | 4 | ... | 1 | 9 |
0 | 0 | ... | 3 | 8 |
SHAP From Tables - Nominal
F1 | F2 | ... | Fp | Yield (y) |
1 | 4 | ... | 7 | 27 |
1 | 4 | ... | 1 | 9 |
0 | 0 | ... | 3 | 8 |
SHAP From Tables - Nominal
SHAP From Tables - Marginal
F1 | F2 | ... | Fp | Yield (y) |
1 | 4 | ... | 7 | 27 |
1 | 4 | ... | 1 | 9 |
0 | 0 | ... | 3 | 8 |
SHAP From Tables - Marginal
SHAP From Tables - Interventional
F1 | F2 | ... | Fp | Yield (y) |
1 | 4 | ... | 7 | 27 |
1 | 4 | ... | 1 | 9 |
1 | 0 | ... | 3 | 8 |
SHAP From Tables - Interventional
do notation
Y | X1 = v
Y | do(X1 = v)
From Janzing et. al. 2019
SHAP From Tables - Interventional
Applying SHAP
Applying SHAP
F1 | F2 | ... | Fp | y |
1 | 4 | ... | 7 | 27 |
1 | 4 | ... | 1 | 9 |
0 | 0 | ... | 3 | 8 |
ℝ
ℝ
N
p
T =
Applying SHAP
ℝ
N
p
Φ =
F1 | F2 | ... | Fp | y |
φ1,1 | φ1,2 | ... | φ1,p | 12.33 |
φ2,1 | φ2,2 | ... | φ2,p | -5.66 |
φ3,1 | φ3,2 | ... | φ3,p | -6.66 |
Applying SHAP
Sum of |φ| for each feature
Making SHAP Tractable
Tractability
Data Structures for faster SHAP