숟가락 그만 얹어
SHAP 본문
어떤 모델 f를 선형 모델 g로 근사하면 g는 아래와 같이 표현될 수 있다.
z'는 variable이고 phi는 z'의 contribution인데 phi를 Shapley value로 간주하고 아래와 같이 계산할 수 있다.
Variable i의 contribution은 i의 포함 여부에 따른 output 차이의 기댓값으로 계산할 수 있다. 한 variable에 대해 정확한 Shapley value를 구하려면 2^F 번을 시행해야 하기 때문에 논문에서는 linear regression을 활용하는 Kernel SHAP, DeepLift의 특성을 활용하는 Deep SHAP 등 approximation 방법을 제안하고 있다.
논문을 다시 보며 생각한 것들
1) 위 Shapely value equation에서 분모의 |S|!은 feature i를 제외한 subset을 줄 세우는 경우의 수, (|F| - |S| - 1)!은 feature i와 선택된 subset을 제외한 feature set을 줄 세우는 경우의 수, 즉 feature i를 중심으로 전체를 줄 세우는 경우의 수와 같다.
https://github.com/HanSangJun/SHAP
HanSangJun/SHAP
SHAP for MNIST, CIFAR-10. Contribute to HanSangJun/SHAP development by creating an account on GitHub.
github.com
References
[1] S. M. Lundberg et al., A Unified Apporach to Interpreting Model Predictions, NIPS 2017
'Research > Explainable AI' 카테고리의 다른 글
설명 가능한 AI는 설명 가능한가? (0) | 2022.03.06 |
---|---|
XAI for VAE (0) | 2021.11.05 |
XAI Methods on Time Series (0) | 2020.09.02 |
Integrated Gradients (0) | 2020.07.15 |