SlideShare a Scribd company logo
Learn more at datascience.com  |  Empower Your Data Scientists
Model evaluation in the land of deep learning
May 2, 2018
Learn more at datascience.com  |  Empower Your Data Scientists 2
Host
● Lead data scientist at DataScience.com.
● Currently, exploring better ways to extract, evaluate, and explain the learned decision policies of
predictive models. Recently started an open source project, Skater, to improve the process of model
interpretation to enable better model evaluation and model security.
● Before joining DataScience.com, used machine learning algorithms to find love for eHarmony
customers.
Pramit Choudhary
@MaverickPramit
www.linkedin.com/in/pramitc/
pramit@datascience.com
Learn more at datascience.com  |  Empower Your Data Scientists
Agenda
● Understand the problem of model opacity
● Define the “what” and “why” of model interpretation
● Define the scope of model interpretation
● Introduce Skater
● How to interpreting Deep Neural Networks(DNNs) model to improve Model
Performance with Skater?
● Demo
● Ability to generate and prevent adversarial attacks with Skater
● Q&A
● References
Learn more at datascience.com  |  Empower Your Data Scientists
The Problem of Model Opacity
(Y|X)
Training Set
{xi
∈ X, yi
∈ Y}
Why I am getting
weird predictions?
Was my model
biased?
I am not 100%
sure what’s in
the box; I didn’t
build the model.
“By 2018, half of business ethics violations will occur through improper use of
big data analytics.” —
Source: https://www.gartner.com/newsroom/id/3144217
PredictorBlack Box Model
Holdout/Test Set
{xi
∈ X, yi
∈ Y}
Learn more at datascience.com  |  Empower Your Data Scientists 5
A collection of visual and/or interactive artifacts that provide
a user with sufficient description of the model behavior to
accurately perform tasks like evaluation, trusting, predicting,
or improving the model.
Assistant Professor Sameer Singh,
University of California, Irvine
QUOTE
___
Learn more at datascience.com  |  Empower Your Data Scientists
What is Model Interpretation?
● Ability to explain and present a model in a way that is understandable to
humans.
● A Model’s result is self descriptive and needs no further explanation;
expressed in terms of input and output.
Empower Your Data Scientists
Why is Model Interpretation Important?
Producer / Model Maker:
● Data scientist/analyst building a model
● Consultants helping clients
Consumer / Model Breaker:
● Business owners or data engineers
● Risk/security assessment managers
● Humans being affected by the model
“Explain the model.”
Learn more at datascience.com  |  Empower Your Data Scientists
Ideas collapse.
Learn more at datascience.com  |  Empower Your Data Scientists 9
While model interpretation is a hard problem, it's within the
role of the data scientist to guide the other stakeholders
through different levels of interpretation, recognize the
caveats, highlight ambiguities, etc
Paco Nathan,
Director Learning Group, O’Reilly
QUOTE
___
Learn more at datascience.com  |  Empower Your Data Scientists 10
Motives for Model Interpretation
1. Debugging and improving an ML system.
2. Exploring and discovering latent or hidden feature
interactions (useful for feature engineering/selection
and resolving preconceptions).
3. Understanding model variability.
4. Helps in model comparison.
5. Building domain knowledge about a particular use
case.
6. Bring transparency to decision making to enable
trust.
1. Explain the model/algorithm.
2. Explain the key features driving the KPI.
3. Verify and validate the accountability of ML
learning systems, e.g., causes for false positives in
credit scoring, insurance claim frauds.
4. Identify blind spots to prevent adversarial attacks
or fix dataset errors.
5. Ability to share the explanations to consumers of
the predictive model.
6. Comply with data protection regulations, e.g., EU’s
GDPR.
● Data Scientist
● Machine Learning Engineer
● Data Analyst
● Statistician
● Data Science Manager
● Business Owner
● Data Engineer
● Auditors/Risk Managers
Producer/Model Maker Consumer/Model Breaker
Learn more at datascience.com  |  Empower Your Data Scientists
With model interpretation, we want to answer the following questions:
○ Why did the model behave in a certain way?
○ What was the reason for false positives? What are the relevant variables driving a model’s
outcome, e.g., customer lifetime value, fraud detection, image classification, spam
detection?
○ How can we trust the predictions of a “black box” model? Is the predictive model biased?
How can we guarantee model’s security against adversarial attacks?
What Do We Want to Achieve?
Learn more at datascience.com  |  Empower Your Data Scientists
Focusing on supervised learning problems.
Learn more at datascience.com  |  Empower Your Data Scientists
Scope of Interpretation
Global Interpretation
Being able to explain the conditional interaction
between dependent (response) variables and
independent (predictor or explanatory) variables
based on the complete dataset
Global
Interpretation
Local Interpretation
Local Interpretation
Being able to explain the conditional interaction
between dependent (response) variables and
independent (predictor or explanatory) variables
with respect to a single prediction
Learn more at datascience.com  |  Empower Your Data Scientists
How Do We Enable Model Interpretation?
Reference: Kim, Been & Doshi-Velez, Finale. (ICML 2017). Interpretable Machine
Learning:
The fuss, the concrete and the questions
( http://people.csail.mit.edu/beenkim/papers/BeenK_FinaleDV_ICML2017_tutorial.pdf )
Visual question answering (VQA): Is this a case of
distracted driving?
Relevance: Insurance fraud
Top predictions include p(seat-belt)=0.75,
p(limousine)=0.051, and p(golf cart) = 0.017
Learn more at datascience.com  |  Empower Your Data Scientists
Introducing Skater
https://github.com/datascienceinc/Skater
If you like the idea, follow
our journey!
Gitter Channel (join us here):
https://gitter.im/datascienceinc-skater
/Lobby
A unified framework to enable Model Interpretation both globally (on the basis of a complete data
set) and locally (in-regards to an individual prediction)
Learn more at datascience.com  |  Empower Your Data Scientists
Machine Learning Workflow
Define
Hypothesis
Use relevant key
performance
indicators
Handle Data
Handle Missing
Data
Data Partitioning
Engineer and
Select
Features
Transform data
Select relevant
features
Build Model
Build a predictive
model
Deploy Model
Operationalize
analytics as
scalable REST APIs
Test and Monitor
Model
1. Log and track behavior
2. Evaluate
3. Conduct A/B or
multi-armed bandit testing
1 2 3 4 5 6
Model Interpretation: In-Memory Models
● Model assessment
● Explain model at a global and local level
● Publish insights, make collaborative and
informed decisions
Model Interpretation: Deployed Models
● Explore and explain model behavior
● Debug and discover errors to improve
performance
RETRAIN
EVALUATE
Improve existing hypothesis or generate a new one
Learn more at datascience.com  |  Empower Your Data Scientists
An Interpretable Machine Learning System
Interpretability with Rule
Extraction
Learn more at datascience.com  |  Empower Your Data Scientists
Skater’s goal
Model Performance (Accuracy)
Interpretability/
Degree of
Opacity
Deep learning models
Support vector machines
Random forest
K-nearest neighbors
Linear/Logistic Regression
Decision trees
Bayesian Rule List
XGBoost
Note: The purpose of the chart is not to mirror any benchmark on model performance, but to articulate the opacity of predictive models
Enable trust and faithfulness by
ability to infer, debug and
understand
Learn more at datascience.com  |  Empower Your Data Scientists
Deep Neural Networks
● Helps build expressive and flexible models by
learning arbitrary non-linear and non-convex
functions easily
● Can be expressed in different architectures;
optimizing for accuracy and computation efficiency
often leads to complex designs
● Need for manual feature engineering is less; lower
layers can extract complex features
● With advancement in software -
Keras/Tensorflow/MXNet and hardware-better
integration with GPU, it’s easier to train DNN’s over
billions of data points optimizing over large
number of parameters.
● But, models are often perceived as black boxes
because of lack of tools to infer them
neurons/
units
connectors
Input Layer
Output Layer
Hidden
Layer 1
Hidden
Layer 2
Learn more at datascience.com  |  Empower Your Data Scientists
Modern DNNs with complex designs
Optimizing on accuracy, has made Modern DNN architectures complex and often difficult to interpret
and understand as humans
Image Source: Canziani, Alfredo, Paszke, Adam & Culurciello, Eugenio (2016). An Analysis of Deep Neural Network Models for Practical Applications
Learn more at datascience.com  |  Empower Your Data Scientists
Layer-wise Relevance Propagation (LRP)
● Decomposes the predictions of a deep neural network to pixel level relevance scores using first
order approximation
● Initially proposed by Bach S. et. al (2015) https://doi.org/10.1371/journal.pone.0130140
● Computed as a backward pass using a modified gradient from the output layer to the input layer
● Skater supports e-LRP (a version of LRP) as proposed by Ancona M., Ceolini E., Cengiz Ö., Gross
M. (2018) in Towards better understanding of gradient-based attribution methods for Deep Neural
Networks using chain rule with a modified gradient
● Scope of Interpretation: Local Interpretation
● Framework supported by Skater:
Learn more at datascience.com  |  Empower Your Data Scientists
Integrated Gradient
● Computes relevance score for Deep Networks for Image and Text using first order approximation
● Proposed by Sundararajan, Mukund, Taly, Ankur & Yan, Qibi (2017) in Axiomatic Attribution for
Deep Networks
● Implementation adopted as suggested by Ancona M., Ceolini E., Cengiz Ö., Gross M. (2018) in
Towards better understanding of gradient-based attribution methods for Deep Neural Networks
● Determines relevance (contribution) of an input X = {x1
, x2
, … xn
} ∈ Rn
relative to baseline input X’
● Compute the average gradient while the input varies along a linear path from a baseline ’ to
● Baseline ’: for Image: ; for Text: zero embedding vector
● Statisfies sensitivity and implementation Invariance
● Scope of Interpretation: Local Interpretation
● Framework supported by Skater:
Learn more at datascience.com  |  Empower Your Data Scientists
Demo
Evaluating Deep Neural Networks with Skater
1. CNN on MNIST dataset
2. Imagenet with pre-trained Inception-V3
3. CNN/LSTM sentiment analysis with IMDB dataset
Learn more at datascience.com  |  Empower Your Data Scientists
Evaluate Model Stability
Figure: An MNIST experiment with CNN model with 98.8% train and 98.6 test
‘Accuracy’. Interpretation CNN model with ‘ReLU activation using e-LRP. Image-6 on the
left is in-correctly classified as 0. Skater provides the ability to infer the cause of
mis-classification ( Pixels colored in Red have a positive influence and Blue negative
influence ). Images share a semantic properties globally. In the above example we can
see 6 and 0 sharing semantic properties around the lower curvy round ‘O’, probably the
reason for misclassification.
Train/Test set “Accuracy”:
98.8/98.6
Learn more at datascience.com  |  Empower Your Data Scientists
Identifying blind spots
Distortion(D)
X + r ∈ [0,
1]m
X ∈ Rm
, where R is a image vector, mapped to a discrete label set, L ∈ {1 … k}. Interpreting CNN model
on MNIST dataset.
Relevant Image pixels
are retained and
correctly identified
Learn more at datascience.com  |  Empower Your Data Scientists
Creating Adversarial Examples
Learn more at datascience.com  |  Empower Your Data Scientists
Conditional adversarial tested against pre-trained Inception-V3
Learn more at datascience.com  |  Empower Your Data Scientists
More Examples
sports car: 0.54%
grille: 0.21%
washbasin: 0.43%
ping-pong ball:
0.14%
Learn more at datascience.com  |  Empower Your Data Scientists
What about text classification?
Trained Model: CNN for sentiment analysis
Dataset: IMDB
For a trained DNN classifier model(F),
● Craft an adversarial attack by adding
perturbation ΔX
X* = X + ΔX
● ΔX = <Insert, delete, replace>
● F(X) ≄ F(X*)
X =
excellent tale of two boys that do whatever they can to get away from there abusive father lord of the rings star elijah wood is
outstanding in this unforgettable role this movie is one of the main reasons i haven't touched a single beer and never will as
long as i live that might make me sound like a nerd but that's what i have to say it is a wonder why this isn't as a classic
american tale
Learn more at datascience.com  |  Empower Your Data Scientists
● Replace [“outstanding”, “excellent”, “classic”, “unforgettable”, “touched”, “never”] with
“<UNK>”
<UNK> tale of two boys that do whatever they can to get away from there abusive father lord of the rings star elijah wood is
<UNK> in this <UNK> role this movie is one of the main reasons i haven't <UNK> a single beer and <UNK> will as long as i live
that might make me sound like a nerd but that's what i have to say it is a wonder why this isn't as a <UNK> american tale
Negative
signals positive
signals
Learn more at datascience.com  |  Empower Your Data Scientists
Evaluate
(Y|X)
Data
Data
Unboxed model
Evaluate
Partial dependence plot
Relative variable importance
Local Interpretable Model
Explanation (LIME)
R or Python model (linear, nonlinear, ensemble, neural networks)
Scikit-learn, caret and rpart packages for CRAN
H20.ai, Algorithmia, etc.
WITHOUT INTERPRETATION ...
WITH SKATER ...
Black box model
How do I understand my
models?
Bayesian rule list (BRL)
DNNs - Integrated Gradient
DNNs - e-Layerwise Relevance
Propagation (e-LRP)
Learn more at datascience.com  |  Empower Your Data Scientists
Special Thanks
● Marco Ancona, Researcher at ETH Zurich-Department of Computer Science, for helping us in
enabling the journey of supporting interpretation for DNNs in Skater
● O’Reilly and AI Conference for allowing us to share our thoughts with all you guys
Learn more at datascience.com  |  Empower Your Data Scientists
Q&A
info@datascience.com
@DataScienceInc
@MaverickPramit
Learn more at datascience.com  |  Empower Your Data Scientists
Future Work and Improvement
● Add better support for generating adversarial examples
● Define and support ways to quantitatively evaluate Model Interpretation
● Implement feature perturbation using Occlusion.
● Add support for other frameworks - PyTorch/MXNet/CNTK
● Explore concept recognition. Xie, Sarker, Doran, Hitzler, & Raymer. (2017). Relating Input
Concepts to Convolutional Neural Network Decisions. arXiv:1711.08006
● More experimentation and notebook examples on inferring DNNs
Learn more at datascience.com  |  Empower Your Data Scientists
References
● Szegedy C. et al. (2014). Intriguing properties of neural networks. arXiv:1312.6199
● Basch S. et al. (2015). On Pixel-Wise Explanations for Non-Linear Classifier Decisions by Layer-Wise
Relevance Propagation. PloS one, 10(7):e0130140
● Canziani A., Paszke A., Culurciello E. (2016). An Analysis of Deep Neural Network Models for
Practical Applications. arXiv:1605.07678
● Jain S., Ghosh R. ( 2017). Visualizing Deep Learning Networks. arXiv:1605.07678
● Liang B. et al. (2017) Deep Text Classification Can be Fooled. arXiv:1704.08006
● Sundararajan M., Taly A., Yan Q. (2017) Axiomatic Attribution for Deep Networks. arXiv:1703.01365
● Ancona M., Ceolini E., Cengiz Ö., Gross M. (2018). Towards better understanding of gradient-based
attribution methods for Deep Neural Networks. arXiv: 1711.06104
● Olah, C. et al. (2018). The Building Blocks of Interpretability.
Learn more at datascience.com  |  Empower Your Data Scientists
END

More Related Content

What's hot

Lecture1 introduction to machine learning
Lecture1 introduction to machine learningLecture1 introduction to machine learning
Lecture1 introduction to machine learning
UmmeSalmaM1
 
Machine Learning Unit 1 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 1 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 1 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 1 Semester 3 MSc IT Part 2 Mumbai University
Madhav Mishra
 
Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...
Madhav Mishra
 
Continual Learning with Deep Architectures - Tutorial ICML 2021
Continual Learning with Deep Architectures - Tutorial ICML 2021Continual Learning with Deep Architectures - Tutorial ICML 2021
Continual Learning with Deep Architectures - Tutorial ICML 2021
Vincenzo Lomonaco
 
User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...
User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...
User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...
Aalto University
 
Introduction to Soft Computing
Introduction to Soft ComputingIntroduction to Soft Computing
Introduction to Soft Computing
Geethika Ramani Ravinutala
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?
Marina Santini
 
Computational Rationality I - a Lecture at Aalto University by Antti Oulasvirta
Computational Rationality I - a Lecture at Aalto University by Antti OulasvirtaComputational Rationality I - a Lecture at Aalto University by Antti Oulasvirta
Computational Rationality I - a Lecture at Aalto University by Antti Oulasvirta
Aalto University
 
Machine learning
Machine learningMachine learning
Machine learning
Rohit Kumar
 
ML Interpretability Inside Out
ML Interpretability Inside OutML Interpretability Inside Out
ML Interpretability Inside Out
Mara Graziani
 
introduction to machine learning and nlp
introduction to machine learning and nlpintroduction to machine learning and nlp
introduction to machine learning and nlp
Mahmoud Farag
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learningbutest
 
Lecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language TechnologyLecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language Technology
Marina Santini
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
Wagston Staehler
 
Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...
Madhav Mishra
 
Application of soft computing techniques in electrical engineering
Application of soft computing techniques in electrical engineeringApplication of soft computing techniques in electrical engineering
Application of soft computing techniques in electrical engineering
Souvik Dutta
 
Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)
ActiveEon
 
Statistical learning intro
Statistical learning introStatistical learning intro
Statistical learning intro
Pei-shen (James) Wu
 
Deep learning 1.0 and Beyond, Part 2
Deep learning 1.0 and Beyond, Part 2Deep learning 1.0 and Beyond, Part 2
Deep learning 1.0 and Beyond, Part 2
Deakin University
 

What's hot (20)

Lecture1 introduction to machine learning
Lecture1 introduction to machine learningLecture1 introduction to machine learning
Lecture1 introduction to machine learning
 
Machine Learning Unit 1 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 1 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 1 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 1 Semester 3 MSc IT Part 2 Mumbai University
 
Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 3 Semester 3 MSc IT Part 2 Mumbai Univer...
 
Continual Learning with Deep Architectures - Tutorial ICML 2021
Continual Learning with Deep Architectures - Tutorial ICML 2021Continual Learning with Deep Architectures - Tutorial ICML 2021
Continual Learning with Deep Architectures - Tutorial ICML 2021
 
User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...
User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...
User Interfaces that Design Themselves: Talk given at Data-Driven Design Day ...
 
Introduction to Soft Computing
Introduction to Soft ComputingIntroduction to Soft Computing
Introduction to Soft Computing
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?
 
Machine learning
Machine learningMachine learning
Machine learning
 
Computational Rationality I - a Lecture at Aalto University by Antti Oulasvirta
Computational Rationality I - a Lecture at Aalto University by Antti OulasvirtaComputational Rationality I - a Lecture at Aalto University by Antti Oulasvirta
Computational Rationality I - a Lecture at Aalto University by Antti Oulasvirta
 
Machine learning
Machine learningMachine learning
Machine learning
 
ML Interpretability Inside Out
ML Interpretability Inside OutML Interpretability Inside Out
ML Interpretability Inside Out
 
introduction to machine learning and nlp
introduction to machine learning and nlpintroduction to machine learning and nlp
introduction to machine learning and nlp
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learning
 
Lecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language TechnologyLecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language Technology
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
 
Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 5 Semester 3 MSc IT Part 2 Mumbai Univer...
 
Application of soft computing techniques in electrical engineering
Application of soft computing techniques in electrical engineeringApplication of soft computing techniques in electrical engineering
Application of soft computing techniques in electrical engineering
 
Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)
 
Statistical learning intro
Statistical learning introStatistical learning intro
Statistical learning intro
 
Deep learning 1.0 and Beyond, Part 2
Deep learning 1.0 and Beyond, Part 2Deep learning 1.0 and Beyond, Part 2
Deep learning 1.0 and Beyond, Part 2
 

Similar to Model evaluation in the land of deep learning

Learning to Learn Model Behavior ( Capital One: data intelligence conference )
Learning to Learn Model Behavior ( Capital One: data intelligence conference )Learning to Learn Model Behavior ( Capital One: data intelligence conference )
Learning to Learn Model Behavior ( Capital One: data intelligence conference )
Pramit Choudhary
 
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
IDEAS - Int'l Data Engineering and Science Association
 
ODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AIODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AI
Aditya Bhattacharya
 
Choosing a Machine Learning technique to solve your need
Choosing a Machine Learning technique to solve your needChoosing a Machine Learning technique to solve your need
Choosing a Machine Learning technique to solve your need
GibDevs
 
Barga Data Science lecture 2
Barga Data Science lecture 2Barga Data Science lecture 2
Barga Data Science lecture 2
Roger Barga
 
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
James Anderson
 
Next generation of data scientist
Next generation of data scientistNext generation of data scientist
Next generation of data scientist
TanujaSomvanshi1
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learning
Yuriy Guts
 
Data Science and Analysis.pptx
Data Science and Analysis.pptxData Science and Analysis.pptx
Data Science and Analysis.pptx
PrashantYadav931011
 
Data Science Highlights
Data Science Highlights Data Science Highlights
Data Science Highlights
Joe Lamantia
 
Data science presentation
Data science presentationData science presentation
Data science presentation
MSDEVMTL
 
The Simple 5-Step Process for Creating a Winning Data Pipeline.pdf
The Simple 5-Step Process for Creating a Winning Data Pipeline.pdfThe Simple 5-Step Process for Creating a Winning Data Pipeline.pdf
The Simple 5-Step Process for Creating a Winning Data Pipeline.pdf
Data Science Council of America
 
Data Science.pptx NEW COURICUUMN IN DATA
Data Science.pptx NEW COURICUUMN IN DATAData Science.pptx NEW COURICUUMN IN DATA
Data Science.pptx NEW COURICUUMN IN DATA
javed75
 
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
Data Science  & AI Road Map by Python & Computer science tutor in MalaysiaData Science  & AI Road Map by Python & Computer science tutor in Malaysia
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
Ahmed Elmalla
 
MLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in ProductionMLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in Production
Provectus
 
Welcome to CS310!
Welcome to CS310!Welcome to CS310!
Welcome to CS310!
Dmitry Zinoviev
 
Data science in business Administration Nagarajan.pptx
Data science in business Administration Nagarajan.pptxData science in business Administration Nagarajan.pptx
Data science in business Administration Nagarajan.pptx
NagarajanG35
 
Data science course in ameerpet Hyderabad
Data science course in ameerpet HyderabadData science course in ameerpet Hyderabad
Data science course in ameerpet Hyderabad
ShivaKanukuntla33
 
best data science course institutes in Hyderabad
best data science course institutes in Hyderabadbest data science course institutes in Hyderabad
best data science course institutes in Hyderabad
rajasrichalamala3zen
 
Data Science course in Hyderabad .
Data Science course in Hyderabad            .Data Science course in Hyderabad            .
Data Science course in Hyderabad .
rajasrichalamala3zen
 

Similar to Model evaluation in the land of deep learning (20)

Learning to Learn Model Behavior ( Capital One: data intelligence conference )
Learning to Learn Model Behavior ( Capital One: data intelligence conference )Learning to Learn Model Behavior ( Capital One: data intelligence conference )
Learning to Learn Model Behavior ( Capital One: data intelligence conference )
 
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
Learning to learn Model Behavior: How to use "human-in-the-loop" to explain d...
 
ODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AIODSC APAC 2022 - Explainable AI
ODSC APAC 2022 - Explainable AI
 
Choosing a Machine Learning technique to solve your need
Choosing a Machine Learning technique to solve your needChoosing a Machine Learning technique to solve your need
Choosing a Machine Learning technique to solve your need
 
Barga Data Science lecture 2
Barga Data Science lecture 2Barga Data Science lecture 2
Barga Data Science lecture 2
 
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
 
Next generation of data scientist
Next generation of data scientistNext generation of data scientist
Next generation of data scientist
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learning
 
Data Science and Analysis.pptx
Data Science and Analysis.pptxData Science and Analysis.pptx
Data Science and Analysis.pptx
 
Data Science Highlights
Data Science Highlights Data Science Highlights
Data Science Highlights
 
Data science presentation
Data science presentationData science presentation
Data science presentation
 
The Simple 5-Step Process for Creating a Winning Data Pipeline.pdf
The Simple 5-Step Process for Creating a Winning Data Pipeline.pdfThe Simple 5-Step Process for Creating a Winning Data Pipeline.pdf
The Simple 5-Step Process for Creating a Winning Data Pipeline.pdf
 
Data Science.pptx NEW COURICUUMN IN DATA
Data Science.pptx NEW COURICUUMN IN DATAData Science.pptx NEW COURICUUMN IN DATA
Data Science.pptx NEW COURICUUMN IN DATA
 
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
Data Science  & AI Road Map by Python & Computer science tutor in MalaysiaData Science  & AI Road Map by Python & Computer science tutor in Malaysia
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
 
MLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in ProductionMLOps and Data Quality: Deploying Reliable ML Models in Production
MLOps and Data Quality: Deploying Reliable ML Models in Production
 
Welcome to CS310!
Welcome to CS310!Welcome to CS310!
Welcome to CS310!
 
Data science in business Administration Nagarajan.pptx
Data science in business Administration Nagarajan.pptxData science in business Administration Nagarajan.pptx
Data science in business Administration Nagarajan.pptx
 
Data science course in ameerpet Hyderabad
Data science course in ameerpet HyderabadData science course in ameerpet Hyderabad
Data science course in ameerpet Hyderabad
 
best data science course institutes in Hyderabad
best data science course institutes in Hyderabadbest data science course institutes in Hyderabad
best data science course institutes in Hyderabad
 
Data Science course in Hyderabad .
Data Science course in Hyderabad            .Data Science course in Hyderabad            .
Data Science course in Hyderabad .
 

Recently uploaded

Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
StarCompliance.io
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
theahmadsaood
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 

Recently uploaded (20)

Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 

Model evaluation in the land of deep learning

  • 1. Learn more at datascience.com  |  Empower Your Data Scientists Model evaluation in the land of deep learning May 2, 2018
  • 2. Learn more at datascience.com  |  Empower Your Data Scientists 2 Host ● Lead data scientist at DataScience.com. ● Currently, exploring better ways to extract, evaluate, and explain the learned decision policies of predictive models. Recently started an open source project, Skater, to improve the process of model interpretation to enable better model evaluation and model security. ● Before joining DataScience.com, used machine learning algorithms to find love for eHarmony customers. Pramit Choudhary @MaverickPramit www.linkedin.com/in/pramitc/ pramit@datascience.com
  • 3. Learn more at datascience.com  |  Empower Your Data Scientists Agenda ● Understand the problem of model opacity ● Define the “what” and “why” of model interpretation ● Define the scope of model interpretation ● Introduce Skater ● How to interpreting Deep Neural Networks(DNNs) model to improve Model Performance with Skater? ● Demo ● Ability to generate and prevent adversarial attacks with Skater ● Q&A ● References
  • 4. Learn more at datascience.com  |  Empower Your Data Scientists The Problem of Model Opacity (Y|X) Training Set {xi ∈ X, yi ∈ Y} Why I am getting weird predictions? Was my model biased? I am not 100% sure what’s in the box; I didn’t build the model. “By 2018, half of business ethics violations will occur through improper use of big data analytics.” — Source: https://www.gartner.com/newsroom/id/3144217 PredictorBlack Box Model Holdout/Test Set {xi ∈ X, yi ∈ Y}
  • 5. Learn more at datascience.com  |  Empower Your Data Scientists 5 A collection of visual and/or interactive artifacts that provide a user with sufficient description of the model behavior to accurately perform tasks like evaluation, trusting, predicting, or improving the model. Assistant Professor Sameer Singh, University of California, Irvine QUOTE ___
  • 6. Learn more at datascience.com  |  Empower Your Data Scientists What is Model Interpretation? ● Ability to explain and present a model in a way that is understandable to humans. ● A Model’s result is self descriptive and needs no further explanation; expressed in terms of input and output.
  • 7. Empower Your Data Scientists Why is Model Interpretation Important? Producer / Model Maker: ● Data scientist/analyst building a model ● Consultants helping clients Consumer / Model Breaker: ● Business owners or data engineers ● Risk/security assessment managers ● Humans being affected by the model “Explain the model.”
  • 8. Learn more at datascience.com  |  Empower Your Data Scientists Ideas collapse.
  • 9. Learn more at datascience.com  |  Empower Your Data Scientists 9 While model interpretation is a hard problem, it's within the role of the data scientist to guide the other stakeholders through different levels of interpretation, recognize the caveats, highlight ambiguities, etc Paco Nathan, Director Learning Group, O’Reilly QUOTE ___
  • 10. Learn more at datascience.com  |  Empower Your Data Scientists 10 Motives for Model Interpretation 1. Debugging and improving an ML system. 2. Exploring and discovering latent or hidden feature interactions (useful for feature engineering/selection and resolving preconceptions). 3. Understanding model variability. 4. Helps in model comparison. 5. Building domain knowledge about a particular use case. 6. Bring transparency to decision making to enable trust. 1. Explain the model/algorithm. 2. Explain the key features driving the KPI. 3. Verify and validate the accountability of ML learning systems, e.g., causes for false positives in credit scoring, insurance claim frauds. 4. Identify blind spots to prevent adversarial attacks or fix dataset errors. 5. Ability to share the explanations to consumers of the predictive model. 6. Comply with data protection regulations, e.g., EU’s GDPR. ● Data Scientist ● Machine Learning Engineer ● Data Analyst ● Statistician ● Data Science Manager ● Business Owner ● Data Engineer ● Auditors/Risk Managers Producer/Model Maker Consumer/Model Breaker
  • 11. Learn more at datascience.com  |  Empower Your Data Scientists With model interpretation, we want to answer the following questions: ○ Why did the model behave in a certain way? ○ What was the reason for false positives? What are the relevant variables driving a model’s outcome, e.g., customer lifetime value, fraud detection, image classification, spam detection? ○ How can we trust the predictions of a “black box” model? Is the predictive model biased? How can we guarantee model’s security against adversarial attacks? What Do We Want to Achieve?
  • 12. Learn more at datascience.com  |  Empower Your Data Scientists Focusing on supervised learning problems.
  • 13. Learn more at datascience.com  |  Empower Your Data Scientists Scope of Interpretation Global Interpretation Being able to explain the conditional interaction between dependent (response) variables and independent (predictor or explanatory) variables based on the complete dataset Global Interpretation Local Interpretation Local Interpretation Being able to explain the conditional interaction between dependent (response) variables and independent (predictor or explanatory) variables with respect to a single prediction
  • 14. Learn more at datascience.com  |  Empower Your Data Scientists How Do We Enable Model Interpretation? Reference: Kim, Been & Doshi-Velez, Finale. (ICML 2017). Interpretable Machine Learning: The fuss, the concrete and the questions ( http://people.csail.mit.edu/beenkim/papers/BeenK_FinaleDV_ICML2017_tutorial.pdf ) Visual question answering (VQA): Is this a case of distracted driving? Relevance: Insurance fraud Top predictions include p(seat-belt)=0.75, p(limousine)=0.051, and p(golf cart) = 0.017
  • 15. Learn more at datascience.com  |  Empower Your Data Scientists Introducing Skater https://github.com/datascienceinc/Skater If you like the idea, follow our journey! Gitter Channel (join us here): https://gitter.im/datascienceinc-skater /Lobby A unified framework to enable Model Interpretation both globally (on the basis of a complete data set) and locally (in-regards to an individual prediction)
  • 16. Learn more at datascience.com  |  Empower Your Data Scientists Machine Learning Workflow Define Hypothesis Use relevant key performance indicators Handle Data Handle Missing Data Data Partitioning Engineer and Select Features Transform data Select relevant features Build Model Build a predictive model Deploy Model Operationalize analytics as scalable REST APIs Test and Monitor Model 1. Log and track behavior 2. Evaluate 3. Conduct A/B or multi-armed bandit testing 1 2 3 4 5 6 Model Interpretation: In-Memory Models ● Model assessment ● Explain model at a global and local level ● Publish insights, make collaborative and informed decisions Model Interpretation: Deployed Models ● Explore and explain model behavior ● Debug and discover errors to improve performance RETRAIN EVALUATE Improve existing hypothesis or generate a new one
  • 17. Learn more at datascience.com  |  Empower Your Data Scientists An Interpretable Machine Learning System Interpretability with Rule Extraction
  • 18. Learn more at datascience.com  |  Empower Your Data Scientists Skater’s goal Model Performance (Accuracy) Interpretability/ Degree of Opacity Deep learning models Support vector machines Random forest K-nearest neighbors Linear/Logistic Regression Decision trees Bayesian Rule List XGBoost Note: The purpose of the chart is not to mirror any benchmark on model performance, but to articulate the opacity of predictive models Enable trust and faithfulness by ability to infer, debug and understand
  • 19. Learn more at datascience.com  |  Empower Your Data Scientists Deep Neural Networks ● Helps build expressive and flexible models by learning arbitrary non-linear and non-convex functions easily ● Can be expressed in different architectures; optimizing for accuracy and computation efficiency often leads to complex designs ● Need for manual feature engineering is less; lower layers can extract complex features ● With advancement in software - Keras/Tensorflow/MXNet and hardware-better integration with GPU, it’s easier to train DNN’s over billions of data points optimizing over large number of parameters. ● But, models are often perceived as black boxes because of lack of tools to infer them neurons/ units connectors Input Layer Output Layer Hidden Layer 1 Hidden Layer 2
  • 20. Learn more at datascience.com  |  Empower Your Data Scientists Modern DNNs with complex designs Optimizing on accuracy, has made Modern DNN architectures complex and often difficult to interpret and understand as humans Image Source: Canziani, Alfredo, Paszke, Adam & Culurciello, Eugenio (2016). An Analysis of Deep Neural Network Models for Practical Applications
  • 21. Learn more at datascience.com  |  Empower Your Data Scientists Layer-wise Relevance Propagation (LRP) ● Decomposes the predictions of a deep neural network to pixel level relevance scores using first order approximation ● Initially proposed by Bach S. et. al (2015) https://doi.org/10.1371/journal.pone.0130140 ● Computed as a backward pass using a modified gradient from the output layer to the input layer ● Skater supports e-LRP (a version of LRP) as proposed by Ancona M., Ceolini E., Cengiz Ö., Gross M. (2018) in Towards better understanding of gradient-based attribution methods for Deep Neural Networks using chain rule with a modified gradient ● Scope of Interpretation: Local Interpretation ● Framework supported by Skater:
  • 22. Learn more at datascience.com  |  Empower Your Data Scientists Integrated Gradient ● Computes relevance score for Deep Networks for Image and Text using first order approximation ● Proposed by Sundararajan, Mukund, Taly, Ankur & Yan, Qibi (2017) in Axiomatic Attribution for Deep Networks ● Implementation adopted as suggested by Ancona M., Ceolini E., Cengiz Ö., Gross M. (2018) in Towards better understanding of gradient-based attribution methods for Deep Neural Networks ● Determines relevance (contribution) of an input X = {x1 , x2 , … xn } ∈ Rn relative to baseline input X’ ● Compute the average gradient while the input varies along a linear path from a baseline ’ to ● Baseline ’: for Image: ; for Text: zero embedding vector ● Statisfies sensitivity and implementation Invariance ● Scope of Interpretation: Local Interpretation ● Framework supported by Skater:
  • 23. Learn more at datascience.com  |  Empower Your Data Scientists Demo Evaluating Deep Neural Networks with Skater 1. CNN on MNIST dataset 2. Imagenet with pre-trained Inception-V3 3. CNN/LSTM sentiment analysis with IMDB dataset
  • 24. Learn more at datascience.com  |  Empower Your Data Scientists Evaluate Model Stability Figure: An MNIST experiment with CNN model with 98.8% train and 98.6 test ‘Accuracy’. Interpretation CNN model with ‘ReLU activation using e-LRP. Image-6 on the left is in-correctly classified as 0. Skater provides the ability to infer the cause of mis-classification ( Pixels colored in Red have a positive influence and Blue negative influence ). Images share a semantic properties globally. In the above example we can see 6 and 0 sharing semantic properties around the lower curvy round ‘O’, probably the reason for misclassification. Train/Test set “Accuracy”: 98.8/98.6
  • 25. Learn more at datascience.com  |  Empower Your Data Scientists Identifying blind spots Distortion(D) X + r ∈ [0, 1]m X ∈ Rm , where R is a image vector, mapped to a discrete label set, L ∈ {1 … k}. Interpreting CNN model on MNIST dataset. Relevant Image pixels are retained and correctly identified
  • 26. Learn more at datascience.com  |  Empower Your Data Scientists Creating Adversarial Examples
  • 27. Learn more at datascience.com  |  Empower Your Data Scientists Conditional adversarial tested against pre-trained Inception-V3
  • 28. Learn more at datascience.com  |  Empower Your Data Scientists More Examples sports car: 0.54% grille: 0.21% washbasin: 0.43% ping-pong ball: 0.14%
  • 29. Learn more at datascience.com  |  Empower Your Data Scientists What about text classification? Trained Model: CNN for sentiment analysis Dataset: IMDB For a trained DNN classifier model(F), ● Craft an adversarial attack by adding perturbation ΔX X* = X + ΔX ● ΔX = <Insert, delete, replace> ● F(X) ≄ F(X*) X = excellent tale of two boys that do whatever they can to get away from there abusive father lord of the rings star elijah wood is outstanding in this unforgettable role this movie is one of the main reasons i haven't touched a single beer and never will as long as i live that might make me sound like a nerd but that's what i have to say it is a wonder why this isn't as a classic american tale
  • 30. Learn more at datascience.com  |  Empower Your Data Scientists ● Replace [“outstanding”, “excellent”, “classic”, “unforgettable”, “touched”, “never”] with “<UNK>” <UNK> tale of two boys that do whatever they can to get away from there abusive father lord of the rings star elijah wood is <UNK> in this <UNK> role this movie is one of the main reasons i haven't <UNK> a single beer and <UNK> will as long as i live that might make me sound like a nerd but that's what i have to say it is a wonder why this isn't as a <UNK> american tale Negative signals positive signals
  • 31. Learn more at datascience.com  |  Empower Your Data Scientists Evaluate (Y|X) Data Data Unboxed model Evaluate Partial dependence plot Relative variable importance Local Interpretable Model Explanation (LIME) R or Python model (linear, nonlinear, ensemble, neural networks) Scikit-learn, caret and rpart packages for CRAN H20.ai, Algorithmia, etc. WITHOUT INTERPRETATION ... WITH SKATER ... Black box model How do I understand my models? Bayesian rule list (BRL) DNNs - Integrated Gradient DNNs - e-Layerwise Relevance Propagation (e-LRP)
  • 32. Learn more at datascience.com  |  Empower Your Data Scientists Special Thanks ● Marco Ancona, Researcher at ETH Zurich-Department of Computer Science, for helping us in enabling the journey of supporting interpretation for DNNs in Skater ● O’Reilly and AI Conference for allowing us to share our thoughts with all you guys
  • 33. Learn more at datascience.com  |  Empower Your Data Scientists Q&A info@datascience.com @DataScienceInc @MaverickPramit
  • 34. Learn more at datascience.com  |  Empower Your Data Scientists Future Work and Improvement ● Add better support for generating adversarial examples ● Define and support ways to quantitatively evaluate Model Interpretation ● Implement feature perturbation using Occlusion. ● Add support for other frameworks - PyTorch/MXNet/CNTK ● Explore concept recognition. Xie, Sarker, Doran, Hitzler, & Raymer. (2017). Relating Input Concepts to Convolutional Neural Network Decisions. arXiv:1711.08006 ● More experimentation and notebook examples on inferring DNNs
  • 35. Learn more at datascience.com  |  Empower Your Data Scientists References ● Szegedy C. et al. (2014). Intriguing properties of neural networks. arXiv:1312.6199 ● Basch S. et al. (2015). On Pixel-Wise Explanations for Non-Linear Classifier Decisions by Layer-Wise Relevance Propagation. PloS one, 10(7):e0130140 ● Canziani A., Paszke A., Culurciello E. (2016). An Analysis of Deep Neural Network Models for Practical Applications. arXiv:1605.07678 ● Jain S., Ghosh R. ( 2017). Visualizing Deep Learning Networks. arXiv:1605.07678 ● Liang B. et al. (2017) Deep Text Classification Can be Fooled. arXiv:1704.08006 ● Sundararajan M., Taly A., Yan Q. (2017) Axiomatic Attribution for Deep Networks. arXiv:1703.01365 ● Ancona M., Ceolini E., Cengiz Ö., Gross M. (2018). Towards better understanding of gradient-based attribution methods for Deep Neural Networks. arXiv: 1711.06104 ● Olah, C. et al. (2018). The Building Blocks of Interpretability.
  • 36. Learn more at datascience.com  |  Empower Your Data Scientists END