Professional Documents
Culture Documents
Interpretability Tcav
Interpretability Tcav
While working on my master thesis and trying to get a hold of research, I paused
for a minute and wanted to truly appreciate the breakthrough discoveries in the
field of machine learning. The ideas are just based on some common sense and simple
math.
Local explanation: If we consider a single data point/ a single image of a cat and
explain why is it classified the way it is, then it would be a local explanation.
For suppose, it could be the pixels of the face and body of that cat.
Photo: Hjvannes/Wikimedia Commons
Let’s now talk about a local explanation method namely, saliency maps. For those of
you who don’t know much about saliency maps, it assigns how important each input
feature was for the prediction. Meaning, the derivative of the probability of the
class to each pixel i.e. will a small change of a pixel change the probability of
that particular class. If yes, then by how much?
The problem with saliency maps is confirmation bias, we see only what we think is
true. Hence now instead of human’s subjective judgment, if we have a quantitative
judgment to understand which concept mattered more it would be a better measure of
quality. Also, since humans don’t think in terms of pixels we shall consider high-
level human-understandable concepts. Further, understanding why a model works is
fairly important instead of a local explanation. So we would like to focus on a
global explanation. These desires gave rise to Testing with Concept Activation
Vectors (TCAV).
For CAV, we take images of concepts and a few other random images, then we take
activations of the network we are investigating. Now since we have activations and
the concepts, we train a linear classifier to separate the concepts from the random
images. The vector that is orthogonal to the decision boundary gives us the CAV
which is a vector that moves towards the concept images and away from the random
images.
Now for the TCAV score, we do something similar to what we did in saliency maps.
TCAV score tells us how important each concept was for the prediction. This means
that the derivative of the probability of the class to each concept i.e. will a
small change of a concept change the probability of that particular class.
In the paper, TCAV was applied to the real-world problem of predicting diabetic
retinopathy (DR) which is a diabetes complication that affects eyes. The model was
trained to predict DR level using a 5-point grading scale based on complex
criteria, where level 0 corresponds to no DR and 4 corresponds to proliferative DR.
Doctors diagnosed DR on diagnostic concepts such as microaneurysms (MA) or pan-
retinal laser scars (PRP), with different concepts being more prominent at
different DR levels. [1]
TCAV results for DR level 4 and level 1. Relevant concepts are in green and those
that are not relevant are in red. Source: TCAV Paper
The importance scores of these concepts to the model were tested using TCAV. For
some DR levels, TCAV identified the correct diagnostic concepts as being important.
However, the model often over-predicted level 1 (mild) as level 2 (moderate). Given
this, the doctor said she would like to tell the model to de-emphasize the
importance of HMA for level 1. Hence, TCAV may be useful for helping experts
interpret and fix model errors when they disagree with model predictions. Thus,
making sure that the domain expertise knowledge is reflected in the model. [1]
It is great but this tool requires humans to collect relevant concepts. There is
further research that discusses more on how to do this without human supervision.
References
Every Thursday, the Variable delivers the very best of Towards Data Science: from
hands-on tutorials and cutting-edge research to original features you don't want to
miss. Take a look.
More from Towards Data Science
Follow
Your home for data science. A Medium publication sharing concepts, ideas and codes.
Sukanta Roy
Sukanta Roy
How tutorials and online courses can create an illusion of competence, and how not
to fall into this trap — Online tutorials and courses are great. You can learn
about anything from the best instructors in the world for free or for a reasonable
price (in most cases at least). The rise of the online learning platforms like
Coursera, Udemy, Edx, Udacity etc. has made it possible for anyone to…
Online Courses
6 min read
The Trap of tutorials and online courses
Tarlan Ahadli
10 min read
Naive Bayes Classifier: Bayes Inference, Central Limit Theorem, Python/C++
Implementation
Tim R. Schleicher
Tim R. Schleicher
While most CEOs struggle in the face of COVID-19, some leverage data and do things
differently — The COVID-19 crisis hits organizations with full force. This black
swan imposes a unique leadership challenge to CEOs. Since the outbreak, I have
personally experienced the struggles of leaders and employees alike––many of whom
were not able to adapt to the radically changing environment. Some CEOs we worked
with in…
Machine Learning
4 min read
3 reasons why smart CEOs start Machine Learning projects right now
Wang Shenghao
Wang Shenghao
·Apr 12, 2020
Crack Site Selection Puzzle by Geospatial Analysis (Part 1)
7 min read
Crack Site Selection Puzzle by Geospatial Analysis (Part 1)
Ben Fraser
Ben Fraser
19 min read
A pragmatic dive into Random Forests and Decision Trees with Python
Read more from Towards Data Science
Recommended from Medium
Fred Malack
Fred Malack
in
unpackAI
What’s the Role of Datasets in ML?
yodayoda
yodayoda
in
Rishabh Jain
Pose Estimation in Drone Videos for Identifying Hand Gestures
Bijil Subhash
Bijil Subhash
FastAI: How to pick the optimal learning rate using FastAI?
Gwendolyn Faraday
Gwendolyn Faraday
in
Surakshya Aryal
Learning Continued on Week 6, 7 & 8
Rob Vandenberghe
Rob Vandenberghe
in
ML6team
ML6 is ISO 27001 certified!
Sri Anumakonda
Sri Anumakonda
Pairing Lane Detection with Object Detection
AboutHelpTermsPrivacy