SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Explainable AI (XAI)
A quick guide to understand how to interpret ML models
Mansour Saffar
ML Developer - AltaML Inc.
In the near future...
Image source:
https://www.scoopnest.com/user/NewYorker/684741246443778048-a-cartoon-by-paul-noth-find-more-cartoons-from-
this-week39s-issue-here
ML Model Categories
White Box Models
● Easy to interpret
● Sometimes can not learn the patterns in the
data well (low accuracy) due to their
simplicity
Black Box Models
● Hard (or impossible) to interpret
● Mostly more powerful and effective
compared to white box models
○ e.g. neural networks
Accuracy vs Interpretability
Image source: https://towardsdatascience.com/interpretability-vs-accuracy-the-friction-that-defines-deep-learning-
dae16c84db5c
What is XAI?
Image source: https://github.com/LumousAI/Lantern
● Think of XAI as a Lantern inside your ML model
● XAI helps you explain the results of your ML
model
● You will know Why and How does your ML
model work when you use XAI!
XAI Symbol!
Note: Actually, I made this symbol up :)
Some XAI Use Cases
Image source: https://blog.lifeextension.com/2019/01/machine-learning-and-medicine-is-ai.html
https://algorithmxlab.com/blog/the-big-problems-with-machine-learning-algorithms-in-finance/
https://www.forbes.com/sites/bernardmarr/2018/05/23/how-ai-and-machine-learning-are-transforming-law-firms-and-the-legal-
sector/#56d5191a32c3
https://datafloq.com/read/machine-learning-drive-autonomous-vehicles/3152
https://www.technologyreview.com/f/612915/chinas-military-is-rushing-to-use-artificial-intelligence/
Medicine Finance Legal
Autonomous Cars Military
Some XAI Use Cases
Image source: https://blog.lifeextension.com/2019/01/machine-learning-and-medicine-is-ai.html
https://algorithmxlab.com/blog/the-big-problems-with-machine-learning-algorithms-in-finance/
https://www.forbes.com/sites/bernardmarr/2018/05/23/how-ai-and-machine-learning-are-transforming-law-firms-and-the-legal-
sector/#56d5191a32c3
https://datafloq.com/read/machine-learning-drive-autonomous-vehicles/3152
https://www.technologyreview.com/f/612915/chinas-military-is-rushing-to-use-artificial-intelligence/
Medicine Finance Legal
Autonomous Cars Military
Why do we need XAI?! (Medical Application)
Image sources: https://msaffarm.github.io/projects/ml-
mri/Sahebzamani.Saffar.HSZ.Jan.2019.pdf
https://artemisinccouk.wordpress.com/author/torak289/
Brain MRI data Complex ML model
Report:
Patient is
diagnosed
with Epilepsy
with %85
confidence.
But why?!
Can I trust this
prediction?
Epilepsy Detection Model with Brain MRI Data
Why do we need XAI?! (Finance Application)
Image sources:
https://artemisinccouk.wordpress.com/author/torak289/
https://www.finder.com/credit-report
Financial and Demographic Data Complex ML model
Report:
Customer is
not eligible
for the loan!
Loan Model with Financial Records
But why?!
XAI to Help With Legal Implications
Can I trust the
epilepsy model
predictions?
● General Data Protection
Regulation (GDPR)
● GDPR imposes companies to
provide exaplanations of their
ML models to their
customers.
● Legal implication of wrong
diagnosis in medical
applications can be tough! (of
course the human loss is
more sad!)
● How can the doctor trust the
ML model predictions?
What if the
customer asks
why he was
rejected?
Image sources:
https://www.leaprate.com/financial-services/fines/occ-assesses-70-million-civil-money-penalty-
citibank/
https://venturebeat.com/2018/01/27/gdpr-a-playbook-for-compliance/
XAI General Overview
Image source: Modified https://github.com/slundberg/shap
XAI
What Answers Does XAI Provide?
● Why did the model make
that prediction?
WHY
● How can I correct an
error?
HOW
● When can I trust ML
model predictions?
● When will the ML
model fail to make the
right prediction?
WHEN
XAI Off vs XAI On!
Image source: Modified https://www.darpa.mil/attachments/XAIProgramUpdate.pdf
What Problems of ML can XAI Address?
● Understand decision
making process
● Make sure model is
looking at the right
features
TRUST
● Understand what
features are taken into
account
● Detect biased patterns
in data
BIAS & FAIRNESS
● Explain the decision
making process
EXPLAINABILITY
XAI Categories
Global Explanation
● Explain the behaviour of the ML model in
overall
Model-Agnostic
● It does not care what the models is and how
it works!
Local Explanation
● Explain the prediction results for each
desired instance
Model-Dependant
● Interpretations are based on the
model’s learning process
XAI Categories
Global Explanation
● Explain the behaviour of the ML model in
overall
Model-Agnostic
● It does not care what the models is and how
it works!
Local Explanation
● Explain the prediction results for each
desired instance
Model-Dependant
● Interpretations are based on the
model’s learning process
XAI Example 1 (Global Explanation)
● Let’s say you have a bike
renting business and want to
know how much weather
affects your business!
● Partial Dependence Plot (PDP)
to the rescue
● How change in one attribute
(feature) can change your
prediction
XAI Example 2 (Global Explanation)
● Let’s say you want to explain
the behaviour of a HUGE
random forest model
○ 10000 trees!
● Surrogate Model
○ Decision tree
XAI Example 3 (Local Explanation)
● Let’s say you trained a image classification model!
● How does the model know where is the labrador?
● How does the model know there is guitar in the picture?
Image sources:
https://github.com/marcotcr/lime
XAI Example 3 (Local Explanation)
● Locally Interpretable Model-agnostic
Explanations (LIME)
Image sources:
https://github.com/marcotcr/lime
Shapley Values
● Let’s share a ride to AltaML
○ Mansour (Ma) => $40
○ Mohammad (Mo) => $5
○ Mina (Mi) => $25
Image sources:
https://www.barrieyellowtaxi.com/
Shapley Values
(Ma, Mi, Mo) 40 0 0
(Ma, Mo, Mi) 40 0 0
(Mi, Ma, Mo) 15 0 25
(Mi, Mo, Ma) 15 0 25
(Mo, Mi, Ma) 15 5 20
(Mo, Ma, Mi) 35 5 0
26.66 1.66 11.66
Ma 40
Mo 5
Mi 25
Ma, Mi 40
Ma, Mo 40
Mi, Mo 25
Ma, Mi, Mo 40
Ma Mo Mi
XAI Example 4 (Local Explanation)
● SHAP (SHapley Additive exPlanations)
● It’s idea is based on the Shapley Values
in game theory!
● How much each feature contributes to
the final prediction
● It’s like the ride sharing example but
features are passengers and the
amount paid is the model prediction!
XAI Toolsets and Libraries
● LIME
● SHAP
● Microsoft’s InterpretML
● H2O’s Driverless AI
● Google’s What-If tool
● Tf-explain (Tensorboard)
● IBM Watson
XAI Future
● Some models will be able to explain their results! (think of it as saying ‘Analysis’ to robots in
Westworld)
● More interpretable models which you can interact with and modify (or improve) their results
● Debugging ML models will shift more into high-level (semantic level) debugging since you can tell
which parts of the model are not functioning properly!
● You might be able to inject your knowledge into the model since it is interpretable and you know
how it makes the decision!
Acknowledgements
● AltaML team for their support and constructive feedback
Thank You!
Any Questions?
Image source: https://killerinnovations.com/what-is-the-innovation-behind-chatbots-and-why-is-it-important-s12-ep5/
References
● https://github.com/h2oai/mli-resources
● https://www.darpa.mil/program/explainable-artificial-intelligence
● https://christophm.github.io/interpretable-ml-book/
● https://github.com/marcotcr/lime
● https://github.com/slundberg/shap
● https://github.com/microsoft/interpret

Weitere ähnliche Inhalte

Was ist angesagt?

Explainable AI in Industry (AAAI 2020 Tutorial)
Explainable AI in Industry (AAAI 2020 Tutorial)Explainable AI in Industry (AAAI 2020 Tutorial)
Explainable AI in Industry (AAAI 2020 Tutorial)
Krishnaram Kenthapadi
 
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Sri Ambati
 
Explainable AI in Industry (WWW 2020 Tutorial)
Explainable AI in Industry (WWW 2020 Tutorial)Explainable AI in Industry (WWW 2020 Tutorial)
Explainable AI in Industry (WWW 2020 Tutorial)
Krishnaram Kenthapadi
 
Machine Learning Interpretability / Explainability
Machine Learning Interpretability / ExplainabilityMachine Learning Interpretability / Explainability
Machine Learning Interpretability / Explainability
Raouf KESKES
 
Explainable AI in Industry (FAT* 2020 Tutorial)
Explainable AI in Industry (FAT* 2020 Tutorial)Explainable AI in Industry (FAT* 2020 Tutorial)
Explainable AI in Industry (FAT* 2020 Tutorial)
Krishnaram Kenthapadi
 

Was ist angesagt? (20)

DC02. Interpretation of predictions
DC02. Interpretation of predictionsDC02. Interpretation of predictions
DC02. Interpretation of predictions
 
Explainable AI in Industry (AAAI 2020 Tutorial)
Explainable AI in Industry (AAAI 2020 Tutorial)Explainable AI in Industry (AAAI 2020 Tutorial)
Explainable AI in Industry (AAAI 2020 Tutorial)
 
Explainable Machine Learning (Explainable ML)
Explainable Machine Learning (Explainable ML)Explainable Machine Learning (Explainable ML)
Explainable Machine Learning (Explainable ML)
 
Explainable AI - making ML and DL models more interpretable
Explainable AI - making ML and DL models more interpretableExplainable AI - making ML and DL models more interpretable
Explainable AI - making ML and DL models more interpretable
 
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
 
Interpretable machine learning : Methods for understanding complex models
Interpretable machine learning : Methods for understanding complex modelsInterpretable machine learning : Methods for understanding complex models
Interpretable machine learning : Methods for understanding complex models
 
Unified Approach to Interpret Machine Learning Model: SHAP + LIME
Unified Approach to Interpret Machine Learning Model: SHAP + LIMEUnified Approach to Interpret Machine Learning Model: SHAP + LIME
Unified Approach to Interpret Machine Learning Model: SHAP + LIME
 
Explainable AI in Industry (WWW 2020 Tutorial)
Explainable AI in Industry (WWW 2020 Tutorial)Explainable AI in Industry (WWW 2020 Tutorial)
Explainable AI in Industry (WWW 2020 Tutorial)
 
Machine Learning Interpretability / Explainability
Machine Learning Interpretability / ExplainabilityMachine Learning Interpretability / Explainability
Machine Learning Interpretability / Explainability
 
Building trust through Explainable AI
Building trust through Explainable AIBuilding trust through Explainable AI
Building trust through Explainable AI
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Explainable AI in Industry (FAT* 2020 Tutorial)
Explainable AI in Industry (FAT* 2020 Tutorial)Explainable AI in Industry (FAT* 2020 Tutorial)
Explainable AI in Industry (FAT* 2020 Tutorial)
 
Interpretable machine learning
Interpretable machine learningInterpretable machine learning
Interpretable machine learning
 
Introduction to Interpretable Machine Learning
Introduction to Interpretable Machine LearningIntroduction to Interpretable Machine Learning
Introduction to Interpretable Machine Learning
 
"I don't trust AI": the role of explainability in responsible AI
"I don't trust AI": the role of explainability in responsible AI"I don't trust AI": the role of explainability in responsible AI
"I don't trust AI": the role of explainability in responsible AI
 
Intro to LLMs
Intro to LLMsIntro to LLMs
Intro to LLMs
 
Explainable AI in Healthcare
Explainable AI in HealthcareExplainable AI in Healthcare
Explainable AI in Healthcare
 
Machine Learning Explanations: LIME framework
Machine Learning Explanations: LIME framework Machine Learning Explanations: LIME framework
Machine Learning Explanations: LIME framework
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learning
 

Ähnlich wie An Introduction to XAI! Towards Trusting Your ML Models!

Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
Sri Ambati
 

Ähnlich wie An Introduction to XAI! Towards Trusting Your ML Models! (20)

Understanding Black Box Models with Shapley Values
Understanding Black Box Models with Shapley ValuesUnderstanding Black Box Models with Shapley Values
Understanding Black Box Models with Shapley Values
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
 
Using SHAP to Understand Black Box Models
Using SHAP to Understand Black Box ModelsUsing SHAP to Understand Black Box Models
Using SHAP to Understand Black Box Models
 
Explainability for Learning to Rank
Explainability for Learning to RankExplainability for Learning to Rank
Explainability for Learning to Rank
 
Human in the loop: Bayesian Rules Enabling Explainable AI
Human in the loop: Bayesian Rules Enabling Explainable AIHuman in the loop: Bayesian Rules Enabling Explainable AI
Human in the loop: Bayesian Rules Enabling Explainable AI
 
Balancing Automation and Explanation in Machine Learning
Balancing Automation and Explanation in Machine LearningBalancing Automation and Explanation in Machine Learning
Balancing Automation and Explanation in Machine Learning
 
Human-Centered Interpretable Machine Learning
Human-Centered Interpretable  Machine LearningHuman-Centered Interpretable  Machine Learning
Human-Centered Interpretable Machine Learning
 
ODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AIODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AI
 
Explore, Explain, and Debug aka Interpretable Machine Learning
Explore, Explain, and Debug aka Interpretable Machine LearningExplore, Explain, and Debug aka Interpretable Machine Learning
Explore, Explain, and Debug aka Interpretable Machine Learning
 
2018.01.25 rune sætre_triallecture_xai_v2
2018.01.25 rune sætre_triallecture_xai_v22018.01.25 rune sætre_triallecture_xai_v2
2018.01.25 rune sætre_triallecture_xai_v2
 
A few questions about large scale machine learning
A few questions about large scale machine learningA few questions about large scale machine learning
A few questions about large scale machine learning
 
Towards Human-Centered Machine Learning
Towards Human-Centered Machine LearningTowards Human-Centered Machine Learning
Towards Human-Centered Machine Learning
 
Interpretable ML
Interpretable MLInterpretable ML
Interpretable ML
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
 
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
 
Keepler | Understanding your own predictive models
Keepler | Understanding your own predictive modelsKeepler | Understanding your own predictive models
Keepler | Understanding your own predictive models
 
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
 
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for EveryoneGDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
 
C3 w5
C3 w5C3 w5
C3 w5
 
PyData SF 2016 --- Moving forward through the darkness
PyData SF 2016 --- Moving forward through the darknessPyData SF 2016 --- Moving forward through the darkness
PyData SF 2016 --- Moving forward through the darkness
 

Kürzlich hochgeladen

Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
AlMamun560346
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
RizalinePalanog2
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
Areesha Ahmad
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Lokesh Kothari
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 

Kürzlich hochgeladen (20)

Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
 
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedConnaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 

An Introduction to XAI! Towards Trusting Your ML Models!

  • 1. Explainable AI (XAI) A quick guide to understand how to interpret ML models Mansour Saffar ML Developer - AltaML Inc.
  • 2. In the near future... Image source: https://www.scoopnest.com/user/NewYorker/684741246443778048-a-cartoon-by-paul-noth-find-more-cartoons-from- this-week39s-issue-here
  • 3. ML Model Categories White Box Models ● Easy to interpret ● Sometimes can not learn the patterns in the data well (low accuracy) due to their simplicity Black Box Models ● Hard (or impossible) to interpret ● Mostly more powerful and effective compared to white box models ○ e.g. neural networks
  • 4. Accuracy vs Interpretability Image source: https://towardsdatascience.com/interpretability-vs-accuracy-the-friction-that-defines-deep-learning- dae16c84db5c
  • 5. What is XAI? Image source: https://github.com/LumousAI/Lantern ● Think of XAI as a Lantern inside your ML model ● XAI helps you explain the results of your ML model ● You will know Why and How does your ML model work when you use XAI! XAI Symbol! Note: Actually, I made this symbol up :)
  • 6. Some XAI Use Cases Image source: https://blog.lifeextension.com/2019/01/machine-learning-and-medicine-is-ai.html https://algorithmxlab.com/blog/the-big-problems-with-machine-learning-algorithms-in-finance/ https://www.forbes.com/sites/bernardmarr/2018/05/23/how-ai-and-machine-learning-are-transforming-law-firms-and-the-legal- sector/#56d5191a32c3 https://datafloq.com/read/machine-learning-drive-autonomous-vehicles/3152 https://www.technologyreview.com/f/612915/chinas-military-is-rushing-to-use-artificial-intelligence/ Medicine Finance Legal Autonomous Cars Military
  • 7. Some XAI Use Cases Image source: https://blog.lifeextension.com/2019/01/machine-learning-and-medicine-is-ai.html https://algorithmxlab.com/blog/the-big-problems-with-machine-learning-algorithms-in-finance/ https://www.forbes.com/sites/bernardmarr/2018/05/23/how-ai-and-machine-learning-are-transforming-law-firms-and-the-legal- sector/#56d5191a32c3 https://datafloq.com/read/machine-learning-drive-autonomous-vehicles/3152 https://www.technologyreview.com/f/612915/chinas-military-is-rushing-to-use-artificial-intelligence/ Medicine Finance Legal Autonomous Cars Military
  • 8. Why do we need XAI?! (Medical Application) Image sources: https://msaffarm.github.io/projects/ml- mri/Sahebzamani.Saffar.HSZ.Jan.2019.pdf https://artemisinccouk.wordpress.com/author/torak289/ Brain MRI data Complex ML model Report: Patient is diagnosed with Epilepsy with %85 confidence. But why?! Can I trust this prediction? Epilepsy Detection Model with Brain MRI Data
  • 9. Why do we need XAI?! (Finance Application) Image sources: https://artemisinccouk.wordpress.com/author/torak289/ https://www.finder.com/credit-report Financial and Demographic Data Complex ML model Report: Customer is not eligible for the loan! Loan Model with Financial Records But why?!
  • 10. XAI to Help With Legal Implications Can I trust the epilepsy model predictions? ● General Data Protection Regulation (GDPR) ● GDPR imposes companies to provide exaplanations of their ML models to their customers. ● Legal implication of wrong diagnosis in medical applications can be tough! (of course the human loss is more sad!) ● How can the doctor trust the ML model predictions? What if the customer asks why he was rejected? Image sources: https://www.leaprate.com/financial-services/fines/occ-assesses-70-million-civil-money-penalty- citibank/ https://venturebeat.com/2018/01/27/gdpr-a-playbook-for-compliance/
  • 11. XAI General Overview Image source: Modified https://github.com/slundberg/shap XAI
  • 12. What Answers Does XAI Provide? ● Why did the model make that prediction? WHY ● How can I correct an error? HOW ● When can I trust ML model predictions? ● When will the ML model fail to make the right prediction? WHEN
  • 13. XAI Off vs XAI On! Image source: Modified https://www.darpa.mil/attachments/XAIProgramUpdate.pdf
  • 14. What Problems of ML can XAI Address? ● Understand decision making process ● Make sure model is looking at the right features TRUST ● Understand what features are taken into account ● Detect biased patterns in data BIAS & FAIRNESS ● Explain the decision making process EXPLAINABILITY
  • 15. XAI Categories Global Explanation ● Explain the behaviour of the ML model in overall Model-Agnostic ● It does not care what the models is and how it works! Local Explanation ● Explain the prediction results for each desired instance Model-Dependant ● Interpretations are based on the model’s learning process
  • 16. XAI Categories Global Explanation ● Explain the behaviour of the ML model in overall Model-Agnostic ● It does not care what the models is and how it works! Local Explanation ● Explain the prediction results for each desired instance Model-Dependant ● Interpretations are based on the model’s learning process
  • 17. XAI Example 1 (Global Explanation) ● Let’s say you have a bike renting business and want to know how much weather affects your business! ● Partial Dependence Plot (PDP) to the rescue ● How change in one attribute (feature) can change your prediction
  • 18. XAI Example 2 (Global Explanation) ● Let’s say you want to explain the behaviour of a HUGE random forest model ○ 10000 trees! ● Surrogate Model ○ Decision tree
  • 19. XAI Example 3 (Local Explanation) ● Let’s say you trained a image classification model! ● How does the model know where is the labrador? ● How does the model know there is guitar in the picture? Image sources: https://github.com/marcotcr/lime
  • 20. XAI Example 3 (Local Explanation) ● Locally Interpretable Model-agnostic Explanations (LIME) Image sources: https://github.com/marcotcr/lime
  • 21. Shapley Values ● Let’s share a ride to AltaML ○ Mansour (Ma) => $40 ○ Mohammad (Mo) => $5 ○ Mina (Mi) => $25 Image sources: https://www.barrieyellowtaxi.com/
  • 22. Shapley Values (Ma, Mi, Mo) 40 0 0 (Ma, Mo, Mi) 40 0 0 (Mi, Ma, Mo) 15 0 25 (Mi, Mo, Ma) 15 0 25 (Mo, Mi, Ma) 15 5 20 (Mo, Ma, Mi) 35 5 0 26.66 1.66 11.66 Ma 40 Mo 5 Mi 25 Ma, Mi 40 Ma, Mo 40 Mi, Mo 25 Ma, Mi, Mo 40 Ma Mo Mi
  • 23. XAI Example 4 (Local Explanation) ● SHAP (SHapley Additive exPlanations) ● It’s idea is based on the Shapley Values in game theory! ● How much each feature contributes to the final prediction ● It’s like the ride sharing example but features are passengers and the amount paid is the model prediction!
  • 24. XAI Toolsets and Libraries ● LIME ● SHAP ● Microsoft’s InterpretML ● H2O’s Driverless AI ● Google’s What-If tool ● Tf-explain (Tensorboard) ● IBM Watson
  • 25. XAI Future ● Some models will be able to explain their results! (think of it as saying ‘Analysis’ to robots in Westworld) ● More interpretable models which you can interact with and modify (or improve) their results ● Debugging ML models will shift more into high-level (semantic level) debugging since you can tell which parts of the model are not functioning properly! ● You might be able to inject your knowledge into the model since it is interpretable and you know how it makes the decision!
  • 26. Acknowledgements ● AltaML team for their support and constructive feedback
  • 27. Thank You! Any Questions? Image source: https://killerinnovations.com/what-is-the-innovation-behind-chatbots-and-why-is-it-important-s12-ep5/
  • 28. References ● https://github.com/h2oai/mli-resources ● https://www.darpa.mil/program/explainable-artificial-intelligence ● https://christophm.github.io/interpretable-ml-book/ ● https://github.com/marcotcr/lime ● https://github.com/slundberg/shap ● https://github.com/microsoft/interpret

Hinweis der Redaktion

  1. Mention legal
  2. Mention the pneumonia case!