SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Local interpretable model
agnostic explanations LIME
Presented by 이봉호
2
Article at a glance
Title
2
Article at a glance
Abstract
Despite widespread adoption, machine learning models remain mostly black boxes.
Understanding the reasons behind predictions is, however, quite important in assessing trust,
which is fundamental if one plans to take action based on a prediction, or when choosing
whether to deploy a new model. Such understanding also provides insights into the model,
which can be used to transform an untrustworthy model or prediction into a trustworthy one.
In this work, we propose LIME, a novel explanation technique that explains the predictions of
any classifier in an interpretable and faithful manner, by learning an interpretable model
locally around the prediction. We also propose a method to explain models by presenting
representative individual predictions and their explanations in a non redundant way,
framing the task as a submodular optimization problem. We demonstrate the flexibility of
these methods by explaining different models for text e.g. random forests and image
classification e.g. neural networks . We show the utility of explanations via novel
experiments, both simulated and with human subjects, on various scenarios that require
trust: deciding if one should trust a prediction, choosing between models, improving an
untrustworthy classifier, and identifying why a classifier should not be trusted
2
Article at a glance Cont.d
Figures
2
Figures
Article at a glance Cont.d
2
Figures
Article at a glance Cont.d
Conclusion
2
Conclusion
Article at a glance Cont.d
In this paper, we argued that trust is crucial for effective human interaction with machine learning systems,
and that explaining individual predictions is important in assessing trust. We proposed LIME, a modular and
extensible approach to faithfully explain the predictions of any model in an interpretable manner. We also
introduced SP-LIME, a method to select representative and non-redundant predictions, providing a global
view of the model to users. Our experiments demonstrated that explanations are useful for a variety of
models in trust-related tasks in the text and image domains, with both expert and non-expert users: deciding
between models, assessing trust, improving untrustworthy models, and getting insights into predictions.
There are a number of avenues of future work that we would like to explore. Although we describe only
sparse linear models as explanations, our framework supports the exploration of a variety of explanation
families, such as decision trees; it would be interesting to see a comparative study on these with real users.
One issue that we do not mention in this work was how to perform the pick step for images, and we would
like to address this limitation in the future. The domain and model agnosticism enables us to explore a
variety of applications, and we would like to investigate potential uses in speech, video, and medical domains,
as well as recommendation systems. Finally, we would like to explore theoretical properties (such as the
appropriate number of samples) and computational optimizations (such as using parallelization and GPU
processing), in order to provide the accurate, realtime explanations that are critical for any human-in-the-
loop machine learning system.
2
Structure Trusting a prediction vs Trusting a Model
예측결과 신뢰도와 모델신뢰도
예측결과 신뢰도: 예측결과를 신뢰 Trusting a prediction 하는 것은 개별 예측결과를 믿고, 의사결정을 할 수 있는가에 대한 문제 LIME
모델 신뢰도: 모형을 신뢰 Trusting a model 하는 것은 모형 자체를 믿을 수 있는가 SP LIME
2
Structure Objective Function
데이터 전체 공간의 모형을 설명하는 것은 어려울지라도, 국소적인 데이터 공간에서는 의미 있는 모형으로 설명해낼 수 있다
- Local Fidelity – Interpretability Trade Off : local fidelity ↑ → interpretability ↑ global fidelity ?, global fidelity ↑, local fidelity & interpretability ↓
좋은 설명 모델 g는, 1 쉽게 해석할 수 있는 단순한 모델이어야 하고 2 해석하고자 하는 모델의 예측과 유사하게 예측할 수 있어야 함
Objective Function의 목표는 해석력이 좋은 모델 𝑔를 찾는 것임
2
Structure Perturbation for Sampling
- Intuition: 설명하고자 하는 데이터에서 약간의 변화를 주고 어떤 feature가 변했을 때 결과가 크게 변하면, 모형에 영향을 많이 준다는 것
- 설명하고자 하는 인스턴스 𝑥에 대해서 Perturbation을 가함으로써 Sample Instance를 생성하고 이 Set을 𝑧라고 한다.
- Perturbed sample
- Text
- 어떤 단어의 유무를 나타내는 binary vector
- 예: "I hate the dog."라는 문장이 있으면, perturbed sample은 "I hate", "I the dog", "I hate dog", "I dog"
- Image
- Super-Pixel의 유무를 나타내는 binary vector
- Super-Pixel을 Random으로 선정 후 뽑히지 않은 부분은 회색으로 가린 것이 perturbed sample
- 이를 input으로 𝑓 에 넣으면 활성화된 부분 중 어떤 부분이 결과에 큰 영향을 주었는지 알 수 있음.
- Tabular
- Categorical Feature: One-Hot Encoding 등을 통해 Binary Vector로 변환
- Continuous Feature: 𝑥 의 값에 𝑁 0,1 을 training data의 numerical feature의 평균과 표준편차로 역변환 하여 더해줍니다.
- 𝑥값을 Scaling 한 값을 다시 원상복구 후 Local Surrogate Function에 Fitting 한다고 보면 됨.
2
Structure Sparse Linear Function
Sample Instance와 𝑥와의 유사성만큼 가중치를 설정함, 이 때 가중치를 주는 함수를 𝜋!라고 한다.
Data를 Normalization한 상황에서 Smoothing Exponential Kernel을 이용해서 계산
Kernel Width Neighborhood의 Size를 결정하는데 LIME은 0.75 * 훈련데이터 컬럼갯수 을 Kernel Width로 사용
Kernel Width를 구하는 기준 없이 0.75로 고정되어 있음
모든 Feature의 Unit이 다를 수 있는 상황에서 모두 동일한 Distance Measure를 쓰는 것도 다소 이슈가 될 수 있음
Lasso 모델을 적용해서 회귀계수를 통해서, 기여도 기준 Top K개의 Feature를 선택한다.
0이 아닌 회귀 계수가 K보다 커지면 손실 함수가 가 되고 아닌 경우는 Locality aware loss의 값
interpretable representation K개를 선택하는 것을 constant, 즉 사용자가 정하도록 했으며, 최적의 K개를 찾는 것은 future work
- 𝑓 𝑧 값과, 𝜋! 𝑧 값, 그리고 𝑧 값을 바탕으로 설명이 가능한 선형회귀 모델을 생성함으로써 설명을 시도한다.
2
Example – Tabular
- Bike Rental Data 관련, 기온, 기상상황 이렇게 2개 Feature를 이용해서 평균 자전거 대여수를 초과하는 날은 언제인지 설명하는 모델(Classification)이 있다고 가정
- LIME을 통해서 날씨가 따뜻하고 기상 상황이 좋을 때 평균 자전거 대여수 초과 가능성에 Positive Effect를 미친다는 것을 알 수 있음
2
Example Text
Youtube Comment를 Spam 1 , Non Spam 0 을 분류하는 모델이 있다고 가정할 때,
Local Surrogate Model을 훈련하기 위한 Binary Vector를 생성한 이후에 해당 Data로 훈련
Local Model Training을 위해서 생성된 Dataset
2
Example Image
Super Pixel을 Random으로 선정 후 뽑히지 않은 부분은 회색으로 가린 것이 perturbed sample
Super Pixel은 비슷한 색깔을 가지고 서로 연결되어 있는 픽셀들의 집합
음식 분류 모델이 있다고 가정할 때, 아래 음식은 77 의 확률로 베이글, 4 의 확률로 Strawberry라고 예측
녹색 부위는 Probability를 높이는데 기여, 붉은 부위는 Probability를 낮추는데 기여했다는 뜻.
2
SP LIME
모델 전체에 대한 설명을 제공하지는 않고 있기 때문에 개별 사례를 설명함으로써 모델 전체에 대한 이해를 제안함 데이터 셋이 크다면 현실적으로 어려운 부분
N개의 Instance를 대표성 있게 Sampling해서 살펴보는 방식으로 최대한 다양한 특성을 지닌 Sample을 뽑아야 함
프로세스는 다음과 같음
Explanation Matrix: 𝑊 = 𝑛×𝑑"
𝑛: # 𝑜𝑓 𝑖𝑛𝑠𝑡𝑎𝑛𝑐𝑒, 𝑑′: # 𝑜𝑓 𝑓𝑒𝑎𝑡𝑢𝑟𝑒
각 Instance의 Interpretable Component의 Local Importance
Linear Model을 Explanation으로 사용한 경우: 𝑊#$ = 𝑤%#$
- 𝑔 는 설명 모델
- 𝑊의 j번째 column의 global importance: 𝐼$
많은 Instance를 설명할수록 global importance가 높음
Ex. Binary로 표시할 수도 있고, Linear Model에서는 𝑖$ = ∑#&'
(
𝑤#$
Coverage: 𝑐 𝑉, 𝑊, 𝐼 최대한 최대한 특징이 다르면서, 많은 정보를 포함하고 있는 데이터를 추출하기 위한 함수 대신 𝑉 는 Budget 𝐵 보다는 작아야 함
- 𝑊, 𝐼가 주어졌을 때 set V 선택된 데이터의 집합 에 속한 Instance에 한 번이라도 나타난 feature의 total important
F2가 가장 중요한 Feature
두번째, 다섯번 째 Instance 선정
If 𝑉 = 1,3 , 𝑡ℎ𝑒𝑛 𝑐 𝑉, 𝑊, 𝐼 = 1 + 4 + 4 + 2
2
Experiment
실험의 목적
모델을 충실히 설명했는가
Test Set 400개 Instance 에서 임의로 중요한 Top 10 단어 선정
각 방법에서 중요하다고 말한 Top 10 단어 선정 후 Average Recall
설명이 예측에 대한 신뢰를 확인하는데 도움이 될 수 있는가?
신뢰할 수 없는 단어 25 임의 선정 각 방법이 중요한 Feature 해당 단어 포함 여부 체크
설명이 모델 전체를 평가하는데 유용한가
모델을 잘 설명하는 instance 선정 이후 trustworthy한 instance의 비율
모델을 충실히 설명했는가? 설명이 예측을 신뢰하는데 도움이 될 수 있는가? 설명은 모델 전체를 평가하는데 유용한가?
실험 계획
Books, DVD Review Data Set Classification Pos/Neg
Model: Decision Tree, Logistic Regression,
Nearest Neighbor, SVM. RF
모델별 설명
Random : 변수 단어 를 랜덤으로 선정
Greedy : remove features that contribute the most to the
predicted class until the prediction changes
Parzen: KDE 기반
2
Experiment
Accuracy Standard Deviation 불필요한 Feature를 제거한 SP/RP LIME 방식이 성능이 더 높음
각 데이터 셋의 전문가들이 LIME, SPLIME을 통한 설명을 보고 직접 설명의 타당성 및 모델의 타당성을 평가함
2
Advantages Disadvantages
Advantages Disadvantages
Post Hoc XAI Model로 Prediction을 위한 Train Model
과는 별개로 움직이기 때문에 Model 교체에 영향을 받지 않는
다.
비전문가가 보기에 이해할 수 있는 간단한 모델을 채택하였고,
설명 역시 어렵지 않다.
Domain Text, Vision, Tabular 에 구애 받지 않고 모두 적
용 가능하다.
Fidelity Measure는 Model의 Reliability를 측정하는데 유
용하다.
Model에 사용된 Feature와 다른 Feature를 사용함으로써,
보다 설명이 용이하다.
근접한 데이터 Neighborhood 에 대한 정의가 불명확하다.
근접성을 설명하기 위해 Kernel Setting을 매번 바꿔 줘야
할 필요가 있다.
Sampling을 하는 과정이 현재 정규분포에 기반해서
Sampling되고 있는데 이 부분은 다소 비현실적고 변수간 관
계도 고려되고 있지 않다.
앞서 언급한 Sampling의 문제로 계속 다른 설명을 제공해주
는 경우가 있다. 설명을 신뢰하기 어려울 수 있다.

Weitere ähnliche Inhalte

Was ist angesagt?

Explainability for Natural Language Processing
Explainability for Natural Language ProcessingExplainability for Natural Language Processing
Explainability for Natural Language ProcessingYunyao Li
 
딥러닝 - 역사와 이론적 기초
딥러닝 - 역사와 이론적 기초딥러닝 - 역사와 이론적 기초
딥러닝 - 역사와 이론적 기초Hyungsoo Ryoo
 
深層自己符号化器+混合ガウスモデルによる教師なし異常検知
深層自己符号化器+混合ガウスモデルによる教師なし異常検知深層自己符号化器+混合ガウスモデルによる教師なし異常検知
深層自己符号化器+混合ガウスモデルによる教師なし異常検知Chihiro Kusunoki
 
公平性を保証したAI/機械学習
アルゴリズムの最新理論
公平性を保証したAI/機械学習
アルゴリズムの最新理論公平性を保証したAI/機械学習
アルゴリズムの最新理論
公平性を保証したAI/機械学習
アルゴリズムの最新理論Kazuto Fukuchi
 
Convolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNetConvolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNetSungminYou
 
Model selection and cross validation techniques
Model selection and cross validation techniquesModel selection and cross validation techniques
Model selection and cross validation techniquesVenkata Reddy Konasani
 
Introduce Deep learning & A.I. Applications
Introduce Deep learning & A.I. ApplicationsIntroduce Deep learning & A.I. Applications
Introduce Deep learning & A.I. ApplicationsMario Cho
 
ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.
ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.
ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.Yasunori Ozaki
 
파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI )
파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI ) 파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI )
파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI ) Yunho Maeng
 
Bayesian Network 을 활용한 예측 분석
Bayesian Network 을 활용한 예측 분석Bayesian Network 을 활용한 예측 분석
Bayesian Network 을 활용한 예측 분석datasciencekorea
 
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...Deep Learning JP
 
Counterfaual Machine Learning(CFML)のサーベイ
Counterfaual Machine Learning(CFML)のサーベイCounterfaual Machine Learning(CFML)のサーベイ
Counterfaual Machine Learning(CFML)のサーベイARISE analytics
 
Alpaydin - Chapter 2
Alpaydin - Chapter 2Alpaydin - Chapter 2
Alpaydin - Chapter 2butest
 
XAI (説明可能なAI) の必要性
XAI (説明可能なAI) の必要性XAI (説明可能なAI) の必要性
XAI (説明可能なAI) の必要性西岡 賢一郎
 
Deep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningDeep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningShubhmay Potdar
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & UnderfittingSOUMIT KAR
 
딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해Hee Won Park
 
[논문리뷰] 딥러닝 적용한 EEG 연구 소개
[논문리뷰] 딥러닝 적용한 EEG 연구 소개[논문리뷰] 딥러닝 적용한 EEG 연구 소개
[논문리뷰] 딥러닝 적용한 EEG 연구 소개Donghyeon Kim
 
Robustness of Deep Neural Networks
Robustness of Deep Neural NetworksRobustness of Deep Neural Networks
Robustness of Deep Neural Networkskhalooei
 

Was ist angesagt? (20)

Explainability for Natural Language Processing
Explainability for Natural Language ProcessingExplainability for Natural Language Processing
Explainability for Natural Language Processing
 
딥러닝 - 역사와 이론적 기초
딥러닝 - 역사와 이론적 기초딥러닝 - 역사와 이론적 기초
딥러닝 - 역사와 이론적 기초
 
深層自己符号化器+混合ガウスモデルによる教師なし異常検知
深層自己符号化器+混合ガウスモデルによる教師なし異常検知深層自己符号化器+混合ガウスモデルによる教師なし異常検知
深層自己符号化器+混合ガウスモデルによる教師なし異常検知
 
公平性を保証したAI/機械学習
アルゴリズムの最新理論
公平性を保証したAI/機械学習
アルゴリズムの最新理論公平性を保証したAI/機械学習
アルゴリズムの最新理論
公平性を保証したAI/機械学習
アルゴリズムの最新理論
 
Convolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNetConvolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNet
 
Model selection and cross validation techniques
Model selection and cross validation techniquesModel selection and cross validation techniques
Model selection and cross validation techniques
 
Introduce Deep learning & A.I. Applications
Introduce Deep learning & A.I. ApplicationsIntroduce Deep learning & A.I. Applications
Introduce Deep learning & A.I. Applications
 
ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.
ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.
ビジョンとロボットの強化学習(更新版) Reinforcement Learning in Computer Vision and Robotics.
 
파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI )
파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI ) 파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI )
파이썬(Python) 으로 나만의 딥러닝 API 만들기 강좌 (Feat. AutoAI )
 
Bayesian Network 을 활용한 예측 분석
Bayesian Network 을 활용한 예측 분석Bayesian Network 을 활용한 예측 분석
Bayesian Network 을 활용한 예측 분석
 
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
 
Counterfaual Machine Learning(CFML)のサーベイ
Counterfaual Machine Learning(CFML)のサーベイCounterfaual Machine Learning(CFML)のサーベイ
Counterfaual Machine Learning(CFML)のサーベイ
 
自然言語処理向け データアノテーションとそのユースケース
自然言語処理向け データアノテーションとそのユースケース自然言語処理向け データアノテーションとそのユースケース
自然言語処理向け データアノテーションとそのユースケース
 
Alpaydin - Chapter 2
Alpaydin - Chapter 2Alpaydin - Chapter 2
Alpaydin - Chapter 2
 
XAI (説明可能なAI) の必要性
XAI (説明可能なAI) の必要性XAI (説明可能なAI) の必要性
XAI (説明可能なAI) の必要性
 
Deep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningDeep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter Tuning
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & Underfitting
 
딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해
 
[논문리뷰] 딥러닝 적용한 EEG 연구 소개
[논문리뷰] 딥러닝 적용한 EEG 연구 소개[논문리뷰] 딥러닝 적용한 EEG 연구 소개
[논문리뷰] 딥러닝 적용한 EEG 연구 소개
 
Robustness of Deep Neural Networks
Robustness of Deep Neural NetworksRobustness of Deep Neural Networks
Robustness of Deep Neural Networks
 

Ähnlich wie 풀잎스쿨 - LIME 발표자료(설명가능한 인공지능 기획!)

Transfer learning usage
Transfer learning usageTransfer learning usage
Transfer learning usageTae Young Lee
 
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...Haezoom Inc.
 
스마트폰 위의 딥러닝
스마트폰 위의 딥러닝스마트폰 위의 딥러닝
스마트폰 위의 딥러닝NAVER Engineering
 
Deep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendationsDeep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendationsseungwoo kim
 
파이썬으로 익히는 딥러닝 기본 (18년)
파이썬으로 익히는 딥러닝 기본 (18년)파이썬으로 익히는 딥러닝 기본 (18년)
파이썬으로 익히는 딥러닝 기본 (18년)SK(주) C&C - 강병호
 
제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링
제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링
제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링BOAZ Bigdata
 
PRML Chapter 7 SVM supplementary files
PRML Chapter 7 SVM supplementary filesPRML Chapter 7 SVM supplementary files
PRML Chapter 7 SVM supplementary filesSunwoo Kim
 
Review of the Paper on Capabilities of Gemini Models in Medicine
Review of the Paper on Capabilities of Gemini Models in MedicineReview of the Paper on Capabilities of Gemini Models in Medicine
Review of the Paper on Capabilities of Gemini Models in MedicineTae Young Lee
 
[Paper] EDA : easy data augmentation techniques for boosting performance on t...
[Paper] EDA : easy data augmentation techniques for boosting performance on t...[Paper] EDA : easy data augmentation techniques for boosting performance on t...
[Paper] EDA : easy data augmentation techniques for boosting performance on t...Susang Kim
 
Ml for 정형데이터
Ml for 정형데이터Ml for 정형데이터
Ml for 정형데이터JEEHYUN PAIK
 
PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)
PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)
PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)Haezoom Inc.
 
더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)
더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)
더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)Jeongho Shin
 
검색엔진에 적용된 딥러닝 모델 방법론
검색엔진에 적용된 딥러닝 모델 방법론검색엔진에 적용된 딥러닝 모델 방법론
검색엔진에 적용된 딥러닝 모델 방법론Tae Young Lee
 
[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기
[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기
[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기Joeun Park
 
앙상블 학습 기반의 추천시스템 개발
앙상블 학습 기반의 추천시스템 개발앙상블 학습 기반의 추천시스템 개발
앙상블 학습 기반의 추천시스템 개발Jungkyu Lee
 
Chapter 11 Practical Methodology
Chapter 11 Practical MethodologyChapter 11 Practical Methodology
Chapter 11 Practical MethodologyKyeongUkJang
 

Ähnlich wie 풀잎스쿨 - LIME 발표자료(설명가능한 인공지능 기획!) (20)

PaLM Paper Review
PaLM Paper ReviewPaLM Paper Review
PaLM Paper Review
 
Transfer learning usage
Transfer learning usageTransfer learning usage
Transfer learning usage
 
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
Variational Autoencoder를 여러 가지 각도에서 이해하기 (Understanding Variational Autoencod...
 
스마트폰 위의 딥러닝
스마트폰 위의 딥러닝스마트폰 위의 딥러닝
스마트폰 위의 딥러닝
 
XAI
XAIXAI
XAI
 
Deep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendationsDeep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendations
 
파이썬으로 익히는 딥러닝 기본 (18년)
파이썬으로 익히는 딥러닝 기본 (18년)파이썬으로 익히는 딥러닝 기본 (18년)
파이썬으로 익히는 딥러닝 기본 (18년)
 
제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링
제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링
제 15회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [리뷰의 재발견 팀] : 이커머스 리뷰 유용성 파악 및 필터링
 
PRML Chapter 7 SVM supplementary files
PRML Chapter 7 SVM supplementary filesPRML Chapter 7 SVM supplementary files
PRML Chapter 7 SVM supplementary files
 
Review of the Paper on Capabilities of Gemini Models in Medicine
Review of the Paper on Capabilities of Gemini Models in MedicineReview of the Paper on Capabilities of Gemini Models in Medicine
Review of the Paper on Capabilities of Gemini Models in Medicine
 
[Paper] EDA : easy data augmentation techniques for boosting performance on t...
[Paper] EDA : easy data augmentation techniques for boosting performance on t...[Paper] EDA : easy data augmentation techniques for boosting performance on t...
[Paper] EDA : easy data augmentation techniques for boosting performance on t...
 
Ml for 정형데이터
Ml for 정형데이터Ml for 정형데이터
Ml for 정형데이터
 
PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)
PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)
PYCON KR 2017 - 구름이 하늘의 일이라면 (윤상웅)
 
Review MLP Mixer
Review MLP MixerReview MLP Mixer
Review MLP Mixer
 
더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)
더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)
더 나은 S/W를 만드는 것에 관하여 (OKKY 세미나)
 
검색엔진에 적용된 딥러닝 모델 방법론
검색엔진에 적용된 딥러닝 모델 방법론검색엔진에 적용된 딥러닝 모델 방법론
검색엔진에 적용된 딥러닝 모델 방법론
 
[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기
[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기
[PyCon KR 2018] 땀내를 줄이는 Data와 Feature 다루기
 
앙상블 학습 기반의 추천시스템 개발
앙상블 학습 기반의 추천시스템 개발앙상블 학습 기반의 추천시스템 개발
앙상블 학습 기반의 추천시스템 개발
 
Understanding MLOps
Understanding MLOpsUnderstanding MLOps
Understanding MLOps
 
Chapter 11 Practical Methodology
Chapter 11 Practical MethodologyChapter 11 Practical Methodology
Chapter 11 Practical Methodology
 

풀잎스쿨 - LIME 발표자료(설명가능한 인공지능 기획!)

  • 1. Local interpretable model agnostic explanations LIME Presented by 이봉호
  • 2. 2 Article at a glance Title
  • 3. 2 Article at a glance Abstract Despite widespread adoption, machine learning models remain mostly black boxes. Understanding the reasons behind predictions is, however, quite important in assessing trust, which is fundamental if one plans to take action based on a prediction, or when choosing whether to deploy a new model. Such understanding also provides insights into the model, which can be used to transform an untrustworthy model or prediction into a trustworthy one. In this work, we propose LIME, a novel explanation technique that explains the predictions of any classifier in an interpretable and faithful manner, by learning an interpretable model locally around the prediction. We also propose a method to explain models by presenting representative individual predictions and their explanations in a non redundant way, framing the task as a submodular optimization problem. We demonstrate the flexibility of these methods by explaining different models for text e.g. random forests and image classification e.g. neural networks . We show the utility of explanations via novel experiments, both simulated and with human subjects, on various scenarios that require trust: deciding if one should trust a prediction, choosing between models, improving an untrustworthy classifier, and identifying why a classifier should not be trusted
  • 4. 2 Article at a glance Cont.d Figures
  • 5. 2 Figures Article at a glance Cont.d
  • 6. 2 Figures Article at a glance Cont.d Conclusion
  • 7. 2 Conclusion Article at a glance Cont.d In this paper, we argued that trust is crucial for effective human interaction with machine learning systems, and that explaining individual predictions is important in assessing trust. We proposed LIME, a modular and extensible approach to faithfully explain the predictions of any model in an interpretable manner. We also introduced SP-LIME, a method to select representative and non-redundant predictions, providing a global view of the model to users. Our experiments demonstrated that explanations are useful for a variety of models in trust-related tasks in the text and image domains, with both expert and non-expert users: deciding between models, assessing trust, improving untrustworthy models, and getting insights into predictions. There are a number of avenues of future work that we would like to explore. Although we describe only sparse linear models as explanations, our framework supports the exploration of a variety of explanation families, such as decision trees; it would be interesting to see a comparative study on these with real users. One issue that we do not mention in this work was how to perform the pick step for images, and we would like to address this limitation in the future. The domain and model agnosticism enables us to explore a variety of applications, and we would like to investigate potential uses in speech, video, and medical domains, as well as recommendation systems. Finally, we would like to explore theoretical properties (such as the appropriate number of samples) and computational optimizations (such as using parallelization and GPU processing), in order to provide the accurate, realtime explanations that are critical for any human-in-the- loop machine learning system.
  • 8. 2 Structure Trusting a prediction vs Trusting a Model 예측결과 신뢰도와 모델신뢰도 예측결과 신뢰도: 예측결과를 신뢰 Trusting a prediction 하는 것은 개별 예측결과를 믿고, 의사결정을 할 수 있는가에 대한 문제 LIME 모델 신뢰도: 모형을 신뢰 Trusting a model 하는 것은 모형 자체를 믿을 수 있는가 SP LIME
  • 9. 2 Structure Objective Function 데이터 전체 공간의 모형을 설명하는 것은 어려울지라도, 국소적인 데이터 공간에서는 의미 있는 모형으로 설명해낼 수 있다 - Local Fidelity – Interpretability Trade Off : local fidelity ↑ → interpretability ↑ global fidelity ?, global fidelity ↑, local fidelity & interpretability ↓ 좋은 설명 모델 g는, 1 쉽게 해석할 수 있는 단순한 모델이어야 하고 2 해석하고자 하는 모델의 예측과 유사하게 예측할 수 있어야 함 Objective Function의 목표는 해석력이 좋은 모델 𝑔를 찾는 것임
  • 10. 2 Structure Perturbation for Sampling - Intuition: 설명하고자 하는 데이터에서 약간의 변화를 주고 어떤 feature가 변했을 때 결과가 크게 변하면, 모형에 영향을 많이 준다는 것 - 설명하고자 하는 인스턴스 𝑥에 대해서 Perturbation을 가함으로써 Sample Instance를 생성하고 이 Set을 𝑧라고 한다. - Perturbed sample - Text - 어떤 단어의 유무를 나타내는 binary vector - 예: "I hate the dog."라는 문장이 있으면, perturbed sample은 "I hate", "I the dog", "I hate dog", "I dog" - Image - Super-Pixel의 유무를 나타내는 binary vector - Super-Pixel을 Random으로 선정 후 뽑히지 않은 부분은 회색으로 가린 것이 perturbed sample - 이를 input으로 𝑓 에 넣으면 활성화된 부분 중 어떤 부분이 결과에 큰 영향을 주었는지 알 수 있음. - Tabular - Categorical Feature: One-Hot Encoding 등을 통해 Binary Vector로 변환 - Continuous Feature: 𝑥 의 값에 𝑁 0,1 을 training data의 numerical feature의 평균과 표준편차로 역변환 하여 더해줍니다. - 𝑥값을 Scaling 한 값을 다시 원상복구 후 Local Surrogate Function에 Fitting 한다고 보면 됨.
  • 11. 2 Structure Sparse Linear Function Sample Instance와 𝑥와의 유사성만큼 가중치를 설정함, 이 때 가중치를 주는 함수를 𝜋!라고 한다. Data를 Normalization한 상황에서 Smoothing Exponential Kernel을 이용해서 계산 Kernel Width Neighborhood의 Size를 결정하는데 LIME은 0.75 * 훈련데이터 컬럼갯수 을 Kernel Width로 사용 Kernel Width를 구하는 기준 없이 0.75로 고정되어 있음 모든 Feature의 Unit이 다를 수 있는 상황에서 모두 동일한 Distance Measure를 쓰는 것도 다소 이슈가 될 수 있음 Lasso 모델을 적용해서 회귀계수를 통해서, 기여도 기준 Top K개의 Feature를 선택한다. 0이 아닌 회귀 계수가 K보다 커지면 손실 함수가 가 되고 아닌 경우는 Locality aware loss의 값 interpretable representation K개를 선택하는 것을 constant, 즉 사용자가 정하도록 했으며, 최적의 K개를 찾는 것은 future work - 𝑓 𝑧 값과, 𝜋! 𝑧 값, 그리고 𝑧 값을 바탕으로 설명이 가능한 선형회귀 모델을 생성함으로써 설명을 시도한다.
  • 12. 2 Example – Tabular - Bike Rental Data 관련, 기온, 기상상황 이렇게 2개 Feature를 이용해서 평균 자전거 대여수를 초과하는 날은 언제인지 설명하는 모델(Classification)이 있다고 가정 - LIME을 통해서 날씨가 따뜻하고 기상 상황이 좋을 때 평균 자전거 대여수 초과 가능성에 Positive Effect를 미친다는 것을 알 수 있음
  • 13. 2 Example Text Youtube Comment를 Spam 1 , Non Spam 0 을 분류하는 모델이 있다고 가정할 때, Local Surrogate Model을 훈련하기 위한 Binary Vector를 생성한 이후에 해당 Data로 훈련 Local Model Training을 위해서 생성된 Dataset
  • 14. 2 Example Image Super Pixel을 Random으로 선정 후 뽑히지 않은 부분은 회색으로 가린 것이 perturbed sample Super Pixel은 비슷한 색깔을 가지고 서로 연결되어 있는 픽셀들의 집합 음식 분류 모델이 있다고 가정할 때, 아래 음식은 77 의 확률로 베이글, 4 의 확률로 Strawberry라고 예측 녹색 부위는 Probability를 높이는데 기여, 붉은 부위는 Probability를 낮추는데 기여했다는 뜻.
  • 15. 2 SP LIME 모델 전체에 대한 설명을 제공하지는 않고 있기 때문에 개별 사례를 설명함으로써 모델 전체에 대한 이해를 제안함 데이터 셋이 크다면 현실적으로 어려운 부분 N개의 Instance를 대표성 있게 Sampling해서 살펴보는 방식으로 최대한 다양한 특성을 지닌 Sample을 뽑아야 함 프로세스는 다음과 같음 Explanation Matrix: 𝑊 = 𝑛×𝑑" 𝑛: # 𝑜𝑓 𝑖𝑛𝑠𝑡𝑎𝑛𝑐𝑒, 𝑑′: # 𝑜𝑓 𝑓𝑒𝑎𝑡𝑢𝑟𝑒 각 Instance의 Interpretable Component의 Local Importance Linear Model을 Explanation으로 사용한 경우: 𝑊#$ = 𝑤%#$ - 𝑔 는 설명 모델 - 𝑊의 j번째 column의 global importance: 𝐼$ 많은 Instance를 설명할수록 global importance가 높음 Ex. Binary로 표시할 수도 있고, Linear Model에서는 𝑖$ = ∑#&' ( 𝑤#$ Coverage: 𝑐 𝑉, 𝑊, 𝐼 최대한 최대한 특징이 다르면서, 많은 정보를 포함하고 있는 데이터를 추출하기 위한 함수 대신 𝑉 는 Budget 𝐵 보다는 작아야 함 - 𝑊, 𝐼가 주어졌을 때 set V 선택된 데이터의 집합 에 속한 Instance에 한 번이라도 나타난 feature의 total important F2가 가장 중요한 Feature 두번째, 다섯번 째 Instance 선정 If 𝑉 = 1,3 , 𝑡ℎ𝑒𝑛 𝑐 𝑉, 𝑊, 𝐼 = 1 + 4 + 4 + 2
  • 16. 2 Experiment 실험의 목적 모델을 충실히 설명했는가 Test Set 400개 Instance 에서 임의로 중요한 Top 10 단어 선정 각 방법에서 중요하다고 말한 Top 10 단어 선정 후 Average Recall 설명이 예측에 대한 신뢰를 확인하는데 도움이 될 수 있는가? 신뢰할 수 없는 단어 25 임의 선정 각 방법이 중요한 Feature 해당 단어 포함 여부 체크 설명이 모델 전체를 평가하는데 유용한가 모델을 잘 설명하는 instance 선정 이후 trustworthy한 instance의 비율 모델을 충실히 설명했는가? 설명이 예측을 신뢰하는데 도움이 될 수 있는가? 설명은 모델 전체를 평가하는데 유용한가? 실험 계획 Books, DVD Review Data Set Classification Pos/Neg Model: Decision Tree, Logistic Regression, Nearest Neighbor, SVM. RF 모델별 설명 Random : 변수 단어 를 랜덤으로 선정 Greedy : remove features that contribute the most to the predicted class until the prediction changes Parzen: KDE 기반
  • 17. 2 Experiment Accuracy Standard Deviation 불필요한 Feature를 제거한 SP/RP LIME 방식이 성능이 더 높음 각 데이터 셋의 전문가들이 LIME, SPLIME을 통한 설명을 보고 직접 설명의 타당성 및 모델의 타당성을 평가함
  • 18. 2 Advantages Disadvantages Advantages Disadvantages Post Hoc XAI Model로 Prediction을 위한 Train Model 과는 별개로 움직이기 때문에 Model 교체에 영향을 받지 않는 다. 비전문가가 보기에 이해할 수 있는 간단한 모델을 채택하였고, 설명 역시 어렵지 않다. Domain Text, Vision, Tabular 에 구애 받지 않고 모두 적 용 가능하다. Fidelity Measure는 Model의 Reliability를 측정하는데 유 용하다. Model에 사용된 Feature와 다른 Feature를 사용함으로써, 보다 설명이 용이하다. 근접한 데이터 Neighborhood 에 대한 정의가 불명확하다. 근접성을 설명하기 위해 Kernel Setting을 매번 바꿔 줘야 할 필요가 있다. Sampling을 하는 과정이 현재 정규분포에 기반해서 Sampling되고 있는데 이 부분은 다소 비현실적고 변수간 관 계도 고려되고 있지 않다. 앞서 언급한 Sampling의 문제로 계속 다른 설명을 제공해주 는 경우가 있다. 설명을 신뢰하기 어려울 수 있다.