3. Reference Paper
○ Originally announced in
February 2016.
○ University of Washington
○ Cited by 2054
3
https://arxiv.org/pdf/1602.04938.pdf
4. 4
Sometime we don’t know if we can
trust ML prediction …
Or
If you can trust a ML model
5. Alternatives is to use only interpretable models
❖ Naive Bayes Classifier
❖ K-Nearest Neighbors
❖ Linear regression
❖ Logistic regression
❖ Decision trees
5
Predictive performance is LOST
compared to other complex machine
learning models
6. 6
What if we could understand
why ML making prediction ?
7. 7
It’s easier to trust a
prediction if you understand
the reasons for it?
8. 8
Or figure out when you
shouldn’t trust the model?
I’m sure it’s 100% WOLF
Model was
predicting snow not
wolf
We can’t trust the
model even if the
accuracy was high !!
12. The recipe for training
local surrogate models:
1. Select your instance of interest
2. Perturb your dataset and get the black box predictions for these new
points.
3. Weight the new samples according to their proximity to the instance
of interest.
4. Train a weighted, interpretable model on the dataset with the
variations.
5. Explain the prediction by interpreting the local model.
12
14. 14
Example: Deep networks for image
GoogLeNet
TOP 3 Classes
“Electric Guitar” (p = 0.32)
“Acoustic guitar” (p = 0.24)
“Labrador” (p = 0.21)
15. 15
Example: Deep networks for image
Explaining an image classification by Google’s Inception neural network.
The top 3 classes predicted are
“Electric Guitar” (p = 0.32),
“Acoustic guitar” (p = 0.24)
“Labrador” (p = 0.21)
16. ○ Sampling data rely on Gaussian
distribution but not aware of
correlation between features
○ Have to define complexity in
advance
○ Instability of explanation
○ It’s possible that a linear model
might not be powerful enough
to explain
Advantage vs Disadvantage
○ Any Complex models with
single Interpretable
○ Easy, Concise, Human-friendly
Explanation
○ Can be applied for Tabular,
Text, and Image
○ Easy to implement in R and
Python
○ Different & Less Features than
Original models
16
17. 17
LIME helps user in:
● Choosing between models
● Detect and improve
untrustworthy models
● Get insights into a model
HELP TO ANSWER:
Why should I trust you
ให้ g เป็นโมเดล(Linear Regression)ที่พยายามอธิบาย instance x ที่ต้องการ minimize loss function (MSE) ของ Original Model f (XGboost) โดยที่พยายาม keep ความซับซ้อนให้ต่ำทีสุด Omega (จำนวนfeatures ) และ G คือ กลุ่มของ Explainable Linear Model ต่างๆ ส่วน Proximity Measure PIE จะบอกถึงจำนวนเพื่อนบ้านที่ใกล้เคียง x ที่จะเอามาใช้ในการอธิบาย
ตอน Train model เราต้องกำหนด K คือจำนวน features ยิ่ง k น้อยยิ่งง่ายต่อการอธิบาย อาจจะใช้ lasso model โดยค่อยๆเปลี่ยนค่า λ จนได้จำนวน features ที่ต้องการ หรือออีกวิธีจะทำ แบบ trained ด้วย Full model ไปเลย โดยมีทุก features แล้วค่อยเอามาทำ backward selection เอาแต่ตัวที่มี weight สูงๆ ก้ได้
Pros
สามาถใช้ complex model อะไรก้ได้โดยใช้ interpretable แบบเดิม
ถ้าเราใช lasso หรือ short tree ในการ อธบายเราจะได้คำอธิบายที่ง่าย และสั้นกระชับ + human-friendly explanations
LIME เป็นหนึ่งในไม่กี่อันที่สามารถใช้ในการอธบายข้อมูลที่เป็น Tabular , Text และ Image ได้
LIME package ใน python กับ R ใเรียกใช้ง่าย
ในการเทรนโมเดลที่อธบายได้เราสามารถใช้ features ที่ไม่ต้องเหมืนอกับโมดลที่ซับซ้อนได้ ในกรณีที่เราต้องการทำ PCA ก่อนแล้วค่อยเอา new feature มาอธิบาย
Cons
การ sampling ข้อมูลต้องมีการพัฒนาเพิ่ม LIME ใช้ Gaussian dist แต่ไม่ได้คำนึงถึงการ ที่ feature มีความ correlation
has to define complexity in advance
Instability of explanation: in my experience, if you repeat the sampling process, then the explantions that come out can be different. Instability means that it is difficult to trust the explanations, and you should be very critical.
this assumption is correct when looking at a very small region around the data sample. By expanding this region however, it is possible that a linear model might not be powerful enough to explain the behavior of the original model