Explainable AI – Making ML and DL models more interpretable
Explainable AI – Making ML and DL models more interpretable
About Me
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
2
Aditya
Bhattacharya
I am currently working as the Lead AI/ML Engineer at West Pharmaceutical
Services with the responsibility of leading and managing a global AI team and
creating AI products and platforms at West. I am well seasoned in Data Science,
Machine Learning, IoT and Software Development. and has established the AI
Centre of Excellence and worked towards democratizing AI practice for West
Pharmaceuticals and Microsoft. In the Data Science domain, Computer Vision,
Time-Series Analysis, Natural Language Processing and Speech analysis are my
forte.
Apart from my day job, I am an AI Researcher at an NGO called MUST Research,
and I am one of the faculty members for the MUST Research Academy :
https://must.co.in/acad
Website : https://aditya-bhattacharya.net/
LinkedIn: https://www.linkedin.com/in/aditya-bhattacharya-b59155b6/
Key Topics 1. Necessity and Principles of Explainable AI
2. Model Agnostic XAI for ML models
3. Model Agnostic XAI for DL models.
4. Popular frameworks for XAI
5. Research Questions to consider
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 3
Necessity and Principles of
Explainable AI
5
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
6
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
7
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
8
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
XAI
Trace model
prediction from
logic of math to
nature of data
Understand the
reasoning behind
each model
predictions
Understand the
model using which
AI decision
making is based
Traceable
AI
Reasonable
AI
Understand
able
AI
9
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
1 0
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Model
Agnostic
Results
Visualizations
Influence
Methods
Example
Based
Methods
Knowledge
Extractions
1 1
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Using Surrogate models like linear
models or decision trees to explain
complex models
Estimates the
importance or relevant
features.
Extracting statistical
information from input
and the output
Select instances of the datasets that
explains the behaviour of the model
1 2
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Problem, Data,
Audience
Post Hoc
Analysis
Model
Predictive
Accuracy
Descriptive
Accuracy
Iterative
Explainability
Model Agnostic XAI for ML models
1 4
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
1 5
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
1 6
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Explainer
Surrogate Models
Predictions
Blackbox ML Model
1 7
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 1 8
Prediction: Deny Loan
Loan Application
Suggestion: Increase your salary by 50K & pay your credit card bills on time for next 3 months
Predictive
Model
Loan Applicant
Counterfactual Generation
Algorithm
Model Agnostic XAI for DL models
1 9
2 0
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Understanding flow of information through gradient flow between the
layers of Deep Neural Network model using the following approaches:
1. Saliency Maps
2. Guide Backpropagation
3. Gradient Class Activation Methods
• Layer GRAD CAM
• Layer Conductance using GRAD CAM
• Layer Activation using GRAD CAM
Saliency Maps Guided Backprop GRAD CAM Layer Conductance Layer Activation
Can such explainability
methods be applied for
complex models?
2 1
Explain ab l e AI: Making ML and DL models more interpr et a b l e
2 2
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Image Captioning
using Attention based
Encoder-Decoder
Architecture
2 3
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
[Kim et. al., 2018]
Zebra
(0.97)
How important is the notion of “stripes” for this prediction?
Testing with Concept Activation Vectors (TCAV) is an interpretability method to understand what signals
your neural networks models uses for prediction.
https://github.com/tensorflow/tcav
Pattern representation plays
a key role in decision making
from both images and text.
2 4
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
[Tan et. al., 2019]
Model
Predictions
Label 1
Label 1
.
Label 2
.
v1, v2.
v11,
v12
.
Data
Explainer
Interpretable Mimic Learning – Compressing information from Deep Networks to Shallow Network
2 5
Explainable AI: Making ML and DL models more interpretable
What features need to be changed and by how much to flip a model’s prediction?
[Goyal et. al., 2019]
Popular frameworks for XAI
Explain ab l e AI: Making ML and DL models more interpr et a b l e
Popular frameworks for XAI
2 7
LIME
Local Interpretable
Model-agnostic
Explanations is
interpretability
framework that
works on
structured data,
text and image
classifiers.
SHAP
SHAP (SHapley
Additive
exPlanations) is a
game theoretic
approach to
explain the output
of any machine
learning model.
ELI5
Explain like I am 5
is another popular
framework that
helps to debug
machine learning
classifiers and
explain their
predictions.
SKATER
Skater is a unified
framework for XAI
for all forms of
models both
globally(inference
on the basis of a
complete data set)
and
locally(inference
about an individual
prediction).
TCAV
Testing with
Concept Activation
Vectors (TCAV) is a
new interpretability
method to
understand what
signals your neural
networks models
uses for prediction.
Explainable AI: Making ML and DL models more interpretable
2 8
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
• Behind the workings of LIME lies the assumption that every complex model is linear on a local scale. LIME tries
to fit a simple model around a single observation that will mimic how the global model behaves at that
locality.
• Create the perturbed data and predict the output on the perturbed data
• Create discretized features and find the Euclidean distance of perturbed data to the original observation
• Convert distance to similarity score and select the top n features for the model
• Create a linear model and explain the prediction
2 9
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
The lime package is on PyPI. `pip install lime`
3 0
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
There is a high-speed exact algorithm for tree ensemble methods (Tree SHAP arXiv paper). Fast C++
implementations are supported for XGBoost, LightGBM, CatBoost, and scikit-learn tree models!
• SHAP assigns each feature an importance
value for a particular prediction.
• Its novel components include: the
identification of a new class of additive
feature importance measures, and theoretical
results showing there is a unique solution in
this class with a set of desirable properties.
• Typically, SHAP values try to explain the
output of a model (function) as a sum of the
effects of each feature being introduced into
a conditional expectation. Importantly, for
non-linear functions the order in which
features are introduced matters.
SHAP can be installed from PyPI
3 1
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
The following figure from the KDD 18 paper, Consistent Individualized Feature
Attribution for Tree Ensembles summarizes this in a nice way!
SHAP Summary Plot
SHAP Dependence Plots
3 2
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Available from pypi. pip install eli5
Check docs for more.
3 3
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
SKATER provides an unified framework for both Global and Local Interpretation.
Feature Importance Partial Dependency Plots
LIME integration for explanability
Project Link:
3 4
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
Testing with Concept Activation Vectors (TCAV)
is a new interpretability method to understand
what signals your neural networks models uses
for prediction.
What's special about TCAV compared to
other methods?
TCAV instead shows importance of high
level concepts (e.g., color, gender, race)
for a prediction class - this is how humans
communicate!
TCAV gives an explanation that is generally true for a class of interest, beyond one image (global
explanation).
For example, for a given class, we can show how much race or gender was important for classifications in
InceptionV3. Even though neither race nor gender labels were part of the training input!
pip install tcav https://github.com/tensorflow/tcav
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
3 5
The Concept Activation Vectors (CAVs) provide an interpretation of a neural net’s internal
state in terms of human-friendly concepts. TCAV uses directional derivatives to quantify the
degree to which a user-defined idea is vital to a classification result–for example, how sensitive
a prediction of “zebra” is to the presence of stripes.
TCAV essentially learns ‘concepts’ from examples. For instance, TCAV needs a couple of
examples of ‘female’, and something ‘not female’ to learn a “gender” concept. The goal of
TCAV is to determine how much a concept (e.g., gender, race) was necessary for a prediction
in a trained model even if the concept was not part of the training.
Research question to consider …
All these frameworks are great
and can bring interpretability
to a great extent, but can non-
expert consumers of AI
models interpret these
interpretability methods?
3 7
Explain ab l e AI: Making ML and DL models more interpr et a b l e
Summary
• Why is Explainable AI (XAI) important?
• Commonly used Model Agnostic XAI for ML models
• Commonly used Model Agnostic XAI for DL models.
• Popular frameworks for XAI
• Can we evolve XAI and extend explainability to non-expert
users?
3 8
Explain ab l e AI: Making ML and DL models more interpr et a b l e
Thank you
Aditya Bhattacharya
https://aditya-bhattacharya.net/
aditya.bhattacharya2016@gmail.com
https://www.linkedin.com/in/aditya-bhattacharya-b59155b6/
E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 3 9

More Related Content

PDF
Unified Approach to Interpret Machine Learning Model: SHAP + LIME
PDF
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
PPTX
Interpretable machine learning
PDF
Explainable AI (XAI)
PPTX
Explainable AI in Industry (KDD 2019 Tutorial)
PPTX
Explainable AI
PPTX
Explainable AI in Healthcare
PPTX
Explainable Machine Learning (Explainable ML)
Unified Approach to Interpret Machine Learning Model: SHAP + LIME
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable machine learning
Explainable AI (XAI)
Explainable AI in Industry (KDD 2019 Tutorial)
Explainable AI
Explainable AI in Healthcare
Explainable Machine Learning (Explainable ML)

What's hot (20)

PPTX
Explainable AI
PDF
Achieving Algorithmic Transparency with Shapley Additive Explanations (H2O Lo...
PPTX
An Introduction to XAI! Towards Trusting Your ML Models!
PPTX
Explainable AI in Industry (FAT* 2020 Tutorial)
PDF
DC02. Interpretation of predictions
PDF
Explainable AI (XAI) - A Perspective
PPTX
Introduction to Machine Learning
PDF
CounterFactual Explanations.pdf
PDF
Interpretable machine learning : Methods for understanding complex models
PPTX
Responsible AI in Industry (ICML 2021 Tutorial)
PDF
Explainable AI
PDF
Interpretable Machine Learning
PPTX
Explainable AI in Industry (AAAI 2020 Tutorial)
PDF
Machine learning
PDF
Explainability and bias in AI
PPTX
Introduction to Grad-CAM (complete version)
PPTX
PDF
Towards Human-Centered Machine Learning
PDF
Neural Language Generation Head to Toe
PDF
LLMs Bootcamp
Explainable AI
Achieving Algorithmic Transparency with Shapley Additive Explanations (H2O Lo...
An Introduction to XAI! Towards Trusting Your ML Models!
Explainable AI in Industry (FAT* 2020 Tutorial)
DC02. Interpretation of predictions
Explainable AI (XAI) - A Perspective
Introduction to Machine Learning
CounterFactual Explanations.pdf
Interpretable machine learning : Methods for understanding complex models
Responsible AI in Industry (ICML 2021 Tutorial)
Explainable AI
Interpretable Machine Learning
Explainable AI in Industry (AAAI 2020 Tutorial)
Machine learning
Explainability and bias in AI
Introduction to Grad-CAM (complete version)
Towards Human-Centered Machine Learning
Neural Language Generation Head to Toe
LLMs Bootcamp
Ad

Similar to Explainable AI - making ML and DL models more interpretable (20)

PPTX
ODSC APAC 2022 - Explainable AI
PPTX
Resume_Clasification.pptx
PDF
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
PPTX
Resume_Clasification.pptx
PDF
Data Science as a Career and Intro to R
PDF
Improve ML Predictions using Connected Feature Extraction
PDF
Human in the loop: Bayesian Rules Enabling Explainable AI
PDF
Model evaluation in the land of deep learning
PPTX
Interpretable Machine Learning
PPTX
Muhammad Usman Akhtar | Ph.D Scholar | Wuhan University | School of Co...
PDF
PDF
Liberating energy models from modelers Amit Kanudia
PPTX
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
PDF
Learning to Learn Model Behavior ( Capital One: data intelligence conference )
PDF
Model Evaluation in the land of Deep Learning
PDF
ML.pdf
PDF
Data Science Interview Questions PDF By ScholarHat
PDF
Neural Nets Deconstructed
PDF
Hacking Predictive Modeling - RoadSec 2018
PDF
Keepler Data Tech | Entendiendo tus propios modelos predictivos
ODSC APAC 2022 - Explainable AI
Resume_Clasification.pptx
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
Resume_Clasification.pptx
Data Science as a Career and Intro to R
Improve ML Predictions using Connected Feature Extraction
Human in the loop: Bayesian Rules Enabling Explainable AI
Model evaluation in the land of deep learning
Interpretable Machine Learning
Muhammad Usman Akhtar | Ph.D Scholar | Wuhan University | School of Co...
Liberating energy models from modelers Amit Kanudia
Get hands-on with Explainable AI at Machine Learning Interpretability(MLI) Gym!
Learning to Learn Model Behavior ( Capital One: data intelligence conference )
Model Evaluation in the land of Deep Learning
ML.pdf
Data Science Interview Questions PDF By ScholarHat
Neural Nets Deconstructed
Hacking Predictive Modeling - RoadSec 2018
Keepler Data Tech | Entendiendo tus propios modelos predictivos
Ad

More from Aditya Bhattacharya (9)

PPTX
Directive Explanations for Monitoring the Risk of Diabetes Onset - ACM IUI 2023
PPTX
Accelerating Data Science and Machine Learning Workflow with Azure Machine Le...
PPTX
Machine learning and Deep learning on edge devices using TensorFlow
PPTX
Time series Segmentation & Anomaly Detection
PPTX
Application of Masked RCNN for segmentation of brain haemorrhage from Compute...
PPTX
Aditya Bhattacharya - Enterprise DL - Accelerating Deep Learning Solutions to...
PPTX
Aditya Bhattacharya Chest XRay Image Analysis Using Deep Learning
PPTX
Computer vision-must-nit-silchar-ml-hackathon-2019
PPTX
Computer vision-nit-silchar-hackathon
Directive Explanations for Monitoring the Risk of Diabetes Onset - ACM IUI 2023
Accelerating Data Science and Machine Learning Workflow with Azure Machine Le...
Machine learning and Deep learning on edge devices using TensorFlow
Time series Segmentation & Anomaly Detection
Application of Masked RCNN for segmentation of brain haemorrhage from Compute...
Aditya Bhattacharya - Enterprise DL - Accelerating Deep Learning Solutions to...
Aditya Bhattacharya Chest XRay Image Analysis Using Deep Learning
Computer vision-must-nit-silchar-ml-hackathon-2019
Computer vision-nit-silchar-hackathon

Recently uploaded (20)

PPTX
inbound2857676998455010149.pptxmmmmmmmmm
PPTX
PPT for Diseases (1)-2, types of diseases.pptx
PPTX
cyber row.pptx for cyber proffesionals and hackers
PDF
Delhi c@ll girl# cute girls in delhi with travel girls in delhi call now
PDF
PPT nikita containers of the company use
PPTX
9 Bioterrorism.pptxnsbhsjdgdhdvkdbebrkndbd
PDF
2025-08 San Francisco FinOps Meetup: Tiering, Intelligently.
PDF
Teal Blue Futuristic Metaverse Presentation.pdf
PPTX
Stats annual compiled ipd opd ot br 2024
PDF
Hikvision-IR-PPT---EN.pdfSADASDASSAAAAAAAAAAAAAAA
PDF
Book Trusted Companions in Delhi – 24/7 Available Delhi Personal Meeting Ser...
PPTX
langchainpptforbeginners_easy_explanation.pptx
PPTX
cardiac failure and associated notes.pptx
PPT
Classification methods in data analytics.ppt
PPT
Technicalities in writing workshops indigenous language
PDF
Mcdonald's : a half century growth . pdf
PDF
Q1-wK1-Human-and-Cultural-Variation-sy-2024-2025-Copy-1.pdf
PDF
book-34714 (2).pdfhjkkljgfdssawtjiiiiiujj
PPTX
Bussiness Plan S Group of college 2020-23 Final
PDF
Introduction to Database Systems Lec # 1
inbound2857676998455010149.pptxmmmmmmmmm
PPT for Diseases (1)-2, types of diseases.pptx
cyber row.pptx for cyber proffesionals and hackers
Delhi c@ll girl# cute girls in delhi with travel girls in delhi call now
PPT nikita containers of the company use
9 Bioterrorism.pptxnsbhsjdgdhdvkdbebrkndbd
2025-08 San Francisco FinOps Meetup: Tiering, Intelligently.
Teal Blue Futuristic Metaverse Presentation.pdf
Stats annual compiled ipd opd ot br 2024
Hikvision-IR-PPT---EN.pdfSADASDASSAAAAAAAAAAAAAAA
Book Trusted Companions in Delhi – 24/7 Available Delhi Personal Meeting Ser...
langchainpptforbeginners_easy_explanation.pptx
cardiac failure and associated notes.pptx
Classification methods in data analytics.ppt
Technicalities in writing workshops indigenous language
Mcdonald's : a half century growth . pdf
Q1-wK1-Human-and-Cultural-Variation-sy-2024-2025-Copy-1.pdf
book-34714 (2).pdfhjkkljgfdssawtjiiiiiujj
Bussiness Plan S Group of college 2020-23 Final
Introduction to Database Systems Lec # 1

Explainable AI - making ML and DL models more interpretable

  • 1. Explainable AI – Making ML and DL models more interpretable Explainable AI – Making ML and DL models more interpretable
  • 2. About Me E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 2 Aditya Bhattacharya I am currently working as the Lead AI/ML Engineer at West Pharmaceutical Services with the responsibility of leading and managing a global AI team and creating AI products and platforms at West. I am well seasoned in Data Science, Machine Learning, IoT and Software Development. and has established the AI Centre of Excellence and worked towards democratizing AI practice for West Pharmaceuticals and Microsoft. In the Data Science domain, Computer Vision, Time-Series Analysis, Natural Language Processing and Speech analysis are my forte. Apart from my day job, I am an AI Researcher at an NGO called MUST Research, and I am one of the faculty members for the MUST Research Academy : https://must.co.in/acad Website : https://aditya-bhattacharya.net/ LinkedIn: https://www.linkedin.com/in/aditya-bhattacharya-b59155b6/
  • 3. Key Topics 1. Necessity and Principles of Explainable AI 2. Model Agnostic XAI for ML models 3. Model Agnostic XAI for DL models. 4. Popular frameworks for XAI 5. Research Questions to consider E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 3
  • 4. Necessity and Principles of Explainable AI
  • 5. 5 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 6. 6 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 7. 7 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 8. 8 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e XAI Trace model prediction from logic of math to nature of data Understand the reasoning behind each model predictions Understand the model using which AI decision making is based Traceable AI Reasonable AI Understand able AI
  • 9. 9 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 10. 1 0 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 11. Model Agnostic Results Visualizations Influence Methods Example Based Methods Knowledge Extractions 1 1 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Using Surrogate models like linear models or decision trees to explain complex models Estimates the importance or relevant features. Extracting statistical information from input and the output Select instances of the datasets that explains the behaviour of the model
  • 12. 1 2 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Problem, Data, Audience Post Hoc Analysis Model Predictive Accuracy Descriptive Accuracy Iterative Explainability
  • 13. Model Agnostic XAI for ML models
  • 14. 1 4 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 15. 1 5 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 16. 1 6 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Explainer Surrogate Models Predictions Blackbox ML Model
  • 17. 1 7 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e
  • 18. E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 1 8 Prediction: Deny Loan Loan Application Suggestion: Increase your salary by 50K & pay your credit card bills on time for next 3 months Predictive Model Loan Applicant Counterfactual Generation Algorithm
  • 19. Model Agnostic XAI for DL models 1 9
  • 20. 2 0 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Understanding flow of information through gradient flow between the layers of Deep Neural Network model using the following approaches: 1. Saliency Maps 2. Guide Backpropagation 3. Gradient Class Activation Methods • Layer GRAD CAM • Layer Conductance using GRAD CAM • Layer Activation using GRAD CAM Saliency Maps Guided Backprop GRAD CAM Layer Conductance Layer Activation
  • 21. Can such explainability methods be applied for complex models? 2 1 Explain ab l e AI: Making ML and DL models more interpr et a b l e
  • 22. 2 2 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Image Captioning using Attention based Encoder-Decoder Architecture
  • 23. 2 3 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e [Kim et. al., 2018] Zebra (0.97) How important is the notion of “stripes” for this prediction? Testing with Concept Activation Vectors (TCAV) is an interpretability method to understand what signals your neural networks models uses for prediction. https://github.com/tensorflow/tcav Pattern representation plays a key role in decision making from both images and text.
  • 24. 2 4 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e [Tan et. al., 2019] Model Predictions Label 1 Label 1 . Label 2 . v1, v2. v11, v12 . Data Explainer Interpretable Mimic Learning – Compressing information from Deep Networks to Shallow Network
  • 25. 2 5 Explainable AI: Making ML and DL models more interpretable What features need to be changed and by how much to flip a model’s prediction? [Goyal et. al., 2019]
  • 26. Popular frameworks for XAI Explain ab l e AI: Making ML and DL models more interpr et a b l e
  • 27. Popular frameworks for XAI 2 7 LIME Local Interpretable Model-agnostic Explanations is interpretability framework that works on structured data, text and image classifiers. SHAP SHAP (SHapley Additive exPlanations) is a game theoretic approach to explain the output of any machine learning model. ELI5 Explain like I am 5 is another popular framework that helps to debug machine learning classifiers and explain their predictions. SKATER Skater is a unified framework for XAI for all forms of models both globally(inference on the basis of a complete data set) and locally(inference about an individual prediction). TCAV Testing with Concept Activation Vectors (TCAV) is a new interpretability method to understand what signals your neural networks models uses for prediction. Explainable AI: Making ML and DL models more interpretable
  • 28. 2 8 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e • Behind the workings of LIME lies the assumption that every complex model is linear on a local scale. LIME tries to fit a simple model around a single observation that will mimic how the global model behaves at that locality. • Create the perturbed data and predict the output on the perturbed data • Create discretized features and find the Euclidean distance of perturbed data to the original observation • Convert distance to similarity score and select the top n features for the model • Create a linear model and explain the prediction
  • 29. 2 9 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e The lime package is on PyPI. `pip install lime`
  • 30. 3 0 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e There is a high-speed exact algorithm for tree ensemble methods (Tree SHAP arXiv paper). Fast C++ implementations are supported for XGBoost, LightGBM, CatBoost, and scikit-learn tree models! • SHAP assigns each feature an importance value for a particular prediction. • Its novel components include: the identification of a new class of additive feature importance measures, and theoretical results showing there is a unique solution in this class with a set of desirable properties. • Typically, SHAP values try to explain the output of a model (function) as a sum of the effects of each feature being introduced into a conditional expectation. Importantly, for non-linear functions the order in which features are introduced matters. SHAP can be installed from PyPI
  • 31. 3 1 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e The following figure from the KDD 18 paper, Consistent Individualized Feature Attribution for Tree Ensembles summarizes this in a nice way! SHAP Summary Plot SHAP Dependence Plots
  • 32. 3 2 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Available from pypi. pip install eli5 Check docs for more.
  • 33. 3 3 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e SKATER provides an unified framework for both Global and Local Interpretation. Feature Importance Partial Dependency Plots LIME integration for explanability Project Link:
  • 34. 3 4 E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e Testing with Concept Activation Vectors (TCAV) is a new interpretability method to understand what signals your neural networks models uses for prediction. What's special about TCAV compared to other methods? TCAV instead shows importance of high level concepts (e.g., color, gender, race) for a prediction class - this is how humans communicate! TCAV gives an explanation that is generally true for a class of interest, beyond one image (global explanation). For example, for a given class, we can show how much race or gender was important for classifications in InceptionV3. Even though neither race nor gender labels were part of the training input! pip install tcav https://github.com/tensorflow/tcav
  • 35. E x p l a i n a b l e A I : M a k i n g M L a n d D L m o d e l s m o r e i n t e r p r e t a b l e 3 5 The Concept Activation Vectors (CAVs) provide an interpretation of a neural net’s internal state in terms of human-friendly concepts. TCAV uses directional derivatives to quantify the degree to which a user-defined idea is vital to a classification result–for example, how sensitive a prediction of “zebra” is to the presence of stripes. TCAV essentially learns ‘concepts’ from examples. For instance, TCAV needs a couple of examples of ‘female’, and something ‘not female’ to learn a “gender” concept. The goal of TCAV is to determine how much a concept (e.g., gender, race) was necessary for a prediction in a trained model even if the concept was not part of the training.
  • 36. Research question to consider …
  • 37. All these frameworks are great and can bring interpretability to a great extent, but can non- expert consumers of AI models interpret these interpretability methods? 3 7 Explain ab l e AI: Making ML and DL models more interpr et a b l e
  • 38. Summary • Why is Explainable AI (XAI) important? • Commonly used Model Agnostic XAI for ML models • Commonly used Model Agnostic XAI for DL models. • Popular frameworks for XAI • Can we evolve XAI and extend explainability to non-expert users? 3 8 Explain ab l e AI: Making ML and DL models more interpr et a b l e